generated-configure.sh revision 1866:1751a5004274
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
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649JOBS
650MEMORY_SIZE
651NUM_CORES
652ENABLE_INTREE_EC
653SALIB_NAME
654HOTSPOT_MAKE_ARGS
655LIBZIP_CAN_USE_MMAP
656LIBDL
657LIBM
658USE_EXTERNAL_LCMS
659LCMS_LIBS
660LCMS_CFLAGS
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LIBGIF
666USE_EXTERNAL_LIBJPEG
667LLVM_LIBS
668LLVM_LDFLAGS
669LLVM_CFLAGS
670LLVM_CONFIG
671LIBFFI_LIBS
672LIBFFI_CFLAGS
673ALSA_LIBS
674ALSA_CFLAGS
675FREETYPE_BUNDLE_LIB_PATH
676FREETYPE_LIBS
677FREETYPE_CFLAGS
678CUPS_CFLAGS
679X_EXTRA_LIBS
680X_LIBS
681X_PRE_LIBS
682X_CFLAGS
683XMKMF
684MSVCP_DLL
685MSVCR_DLL
686LIBCXX
687STATIC_CXX_SETTING
688FIXPATH_DETACH_FLAG
689FIXPATH
690GCOV_ENABLED
691ZIP_DEBUGINFO_FILES
692ENABLE_DEBUG_SYMBOLS
693STRIP_POLICY
694DEBUG_BINARIES
695NATIVE_DEBUG_SYMBOLS
696CFLAGS_WARNINGS_ARE_ERRORS
697DISABLE_WARNING_PREFIX
698HOTSPOT_SET_WARNINGS_AS_ERRORS
699WARNINGS_AS_ERRORS
700COMPILER_SUPPORTS_TARGET_BITS_FLAG
701ZERO_ARCHFLAG
702LDFLAGS_TESTEXE
703LDFLAGS_TESTLIB
704LDFLAGS_CXX_JDK
705JDKEXE_LIBS
706JDKLIB_LIBS
707LDFLAGS_JDKEXE
708LDFLAGS_JDKLIB
709CXXFLAGS_TESTEXE
710CXXFLAGS_TESTLIB
711CFLAGS_TESTEXE
712CFLAGS_TESTLIB
713CXXFLAGS_JDKEXE
714CXXFLAGS_JDKLIB
715CFLAGS_JDKEXE
716CFLAGS_JDKLIB
717MACOSX_VERSION_MIN
718CXX_O_FLAG_NONE
719CXX_O_FLAG_DEBUG
720CXX_O_FLAG_NORM
721CXX_O_FLAG_HI
722CXX_O_FLAG_HIGHEST
723C_O_FLAG_NONE
724C_O_FLAG_DEBUG
725C_O_FLAG_NORM
726C_O_FLAG_HI
727C_O_FLAG_HIGHEST
728CXXFLAGS_DEBUG_SYMBOLS
729CFLAGS_DEBUG_SYMBOLS
730CXX_FLAG_DEPS
731C_FLAG_DEPS
732SET_SHARED_LIBRARY_MAPFILE
733SET_SHARED_LIBRARY_NAME
734SET_SHARED_LIBRARY_ORIGIN
735SET_EXECUTABLE_ORIGIN
736CXX_FLAG_REORDER
737C_FLAG_REORDER
738RC_FLAGS
739AR_OUT_OPTION
740LD_OUT_OPTION
741EXE_OUT_OPTION
742CC_OUT_OPTION
743STRIPFLAGS
744ARFLAGS
745COMPILER_TARGET_BITS_FLAG
746JT_HOME
747JTREGEXE
748USING_BROKEN_SUSE_LD
749PACKAGE_PATH
750USE_CLANG
751HOTSPOT_LD
752HOTSPOT_CXX
753HOTSPOT_RC
754HOTSPOT_MT
755BUILD_AS
756BUILD_LD
757BUILD_AR
758BUILD_NM
759BUILD_CXX
760BUILD_CC
761BUILD_SYSROOT_LDFLAGS
762BUILD_SYSROOT_CFLAGS
763ac_ct_OBJDUMP
764OBJDUMP
765ac_ct_OBJCOPY
766OBJCOPY
767ac_ct_NM
768ac_ct_STRIP
769GNM
770NM
771STRIP
772MSBUILD
773DUMPBIN
774RC
775MT
776LIPO
777ac_ct_AR
778AR
779AS
780LDCXX
781LD
782CXXCPP
783CPP
784ac_ct_CXX
785CXXFLAGS
786CXX
787ac_ct_PROPER_COMPILER_CXX
788PROPER_COMPILER_CXX
789TOOLCHAIN_PATH_CXX
790POTENTIAL_CXX
791OBJEXT
792EXEEXT
793ac_ct_CC
794CPPFLAGS
795LDFLAGS
796CFLAGS
797CC
798ac_ct_PROPER_COMPILER_CC
799PROPER_COMPILER_CC
800TOOLCHAIN_PATH_CC
801POTENTIAL_CC
802VS_LIB
803VS_INCLUDE
804VS_PATH
805CYGWIN_LINK
806SYSROOT_LDFLAGS
807SYSROOT_CFLAGS
808LEGACY_EXTRA_LDFLAGS
809LEGACY_EXTRA_CXXFLAGS
810LEGACY_EXTRA_CFLAGS
811EXE_SUFFIX
812OBJ_SUFFIX
813STATIC_LIBRARY
814SHARED_LIBRARY
815STATIC_LIBRARY_SUFFIX
816SHARED_LIBRARY_SUFFIX
817LIBRARY_PREFIX
818TOOLCHAIN_TYPE
819STATIC_BUILD
820BUILD_HOTSPOT
821HOTSPOT_DIST
822BUILD_OUTPUT
823JDK_TOPDIR
824NASHORN_TOPDIR
825HOTSPOT_TOPDIR
826JAXWS_TOPDIR
827JAXP_TOPDIR
828CORBA_TOPDIR
829LANGTOOLS_TOPDIR
830BOOT_JDK_BITS
831JAVAC_FLAGS
832BOOT_JDK_SOURCETARGET
833JARSIGNER
834JAR
835JAVAH
836JAVAC
837JAVA
838BOOT_JDK
839JAVA_CHECK
840JAVAC_CHECK
841VERSION_IS_GA
842VERSION_SHORT
843VERSION_STRING
844VERSION_NUMBER_FOUR_POSITIONS
845VERSION_NUMBER
846VERSION_OPT
847VERSION_BUILD
848VERSION_PRE
849VERSION_PATCH
850VERSION_SECURITY
851VERSION_MINOR
852VERSION_MAJOR
853MACOSX_BUNDLE_ID_BASE
854MACOSX_BUNDLE_NAME_BASE
855COMPANY_NAME
856JDK_RC_PLATFORM_NAME
857PRODUCT_SUFFIX
858PRODUCT_NAME
859LAUNCHER_NAME
860COPYRIGHT_YEAR
861COMPRESS_JARS
862UNLIMITED_CRYPTO
863CACERTS_FILE
864TEST_IN_BUILD
865BUILD_HEADLESS
866SUPPORT_HEADFUL
867SUPPORT_HEADLESS
868DEFAULT_MAKE_TARGET
869OS_VERSION_MICRO
870OS_VERSION_MINOR
871OS_VERSION_MAJOR
872PKG_CONFIG
873BASH_ARGS
874SETFILE
875CODESIGN
876XATTR
877DSYMUTIL
878IS_GNU_TIME
879PATCH
880TIME
881STAT
882HG
883READELF
884OTOOL
885LDD
886ZIP
887UNZIP
888FIND_DELETE
889OUTPUT_SYNC
890OUTPUT_SYNC_SUPPORTED
891CHECK_TOOLSDIR_MAKE
892CHECK_TOOLSDIR_GMAKE
893CHECK_MAKE
894CHECK_GMAKE
895MAKE
896PKGHANDLER
897CONFIGURESUPPORT_OUTPUTDIR
898OUTPUT_ROOT
899CONF_NAME
900SPEC
901SDKROOT
902XCODEBUILD
903BUILD_VARIANT_RELEASE
904DEBUG_CLASSFILES
905FASTDEBUG
906VARIANT
907DEBUG_LEVEL
908MACOSX_UNIVERSAL
909INCLUDE_SA
910JVM_VARIANT_CORE
911JVM_VARIANT_ZEROSHARK
912JVM_VARIANT_ZERO
913JVM_VARIANT_KERNEL
914JVM_VARIANT_MINIMAL1
915JVM_VARIANT_CLIENT
916JVM_VARIANT_SERVER
917JVM_VARIANTS
918JVM_INTERPRETER
919JDK_VARIANT
920SET_OPENJDK
921CANONICAL_TOPDIR
922ORIGINAL_TOPDIR
923TOPDIR
924PATH_SEP
925ZERO_ARCHDEF
926DEFINE_CROSS_COMPILE_ARCH
927LP64
928OPENJDK_TARGET_OS_EXPORT_DIR
929OPENJDK_TARGET_CPU_JLI_CFLAGS
930OPENJDK_TARGET_CPU_OSARCH
931OPENJDK_TARGET_CPU_ISADIR
932OPENJDK_TARGET_CPU_LIBDIR
933OPENJDK_TARGET_CPU_LEGACY_LIB
934OPENJDK_TARGET_CPU_LEGACY
935REQUIRED_OS_VERSION
936REQUIRED_OS_NAME
937COMPILE_TYPE
938OPENJDK_TARGET_CPU_ENDIAN
939OPENJDK_TARGET_CPU_BITS
940OPENJDK_TARGET_CPU_ARCH
941OPENJDK_TARGET_CPU
942OPENJDK_TARGET_OS_ENV
943OPENJDK_TARGET_OS_TYPE
944OPENJDK_TARGET_OS
945OPENJDK_BUILD_CPU_ENDIAN
946OPENJDK_BUILD_CPU_BITS
947OPENJDK_BUILD_CPU_ARCH
948OPENJDK_BUILD_CPU
949OPENJDK_BUILD_OS_ENV
950OPENJDK_BUILD_OS_TYPE
951OPENJDK_BUILD_OS
952OPENJDK_BUILD_AUTOCONF_NAME
953OPENJDK_TARGET_AUTOCONF_NAME
954target_os
955target_vendor
956target_cpu
957target
958host_os
959host_vendor
960host_cpu
961host
962build_os
963build_vendor
964build_cpu
965build
966NICE
967CPIO
968DF
969READLINK
970CYGPATH
971SED
972FGREP
973EGREP
974GREP
975AWK
976XARGS
977WHICH
978WC
979UNIQ
980UNAME
981TR
982TOUCH
983TEE
984TAR
985TAIL
986SORT
987SH
988RMDIR
989RM
990PRINTF
991NAWK
992MV
993MKTEMP
994MKDIR
995LS
996LN
997HEAD
998FIND
999FILE
1000EXPR
1001ECHO
1002DIRNAME
1003DIFF
1004DATE
1005CUT
1006CP
1007COMM
1008CMP
1009CHMOD
1010CAT
1011BASH
1012BASENAME
1013DATE_WHEN_CONFIGURED
1014ORIGINAL_PATH
1015CONFIGURE_COMMAND_LINE
1016target_alias
1017host_alias
1018build_alias
1019LIBS
1020ECHO_T
1021ECHO_N
1022ECHO_C
1023DEFS
1024mandir
1025localedir
1026libdir
1027psdir
1028pdfdir
1029dvidir
1030htmldir
1031infodir
1032docdir
1033oldincludedir
1034includedir
1035localstatedir
1036sharedstatedir
1037sysconfdir
1038datadir
1039datarootdir
1040libexecdir
1041sbindir
1042bindir
1043program_transform_name
1044prefix
1045exec_prefix
1046PACKAGE_URL
1047PACKAGE_BUGREPORT
1048PACKAGE_STRING
1049PACKAGE_VERSION
1050PACKAGE_TARNAME
1051PACKAGE_NAME
1052PATH_SEPARATOR
1053SHELL'
1054ac_subst_files=''
1055ac_user_opts='
1056enable_option_checking
1057with_target_bits
1058enable_openjdk_only
1059with_custom_make_dir
1060with_jdk_variant
1061with_jvm_interpreter
1062with_jvm_variants
1063enable_debug
1064with_debug_level
1065with_devkit
1066with_sys_root
1067with_sysroot
1068with_tools_dir
1069with_toolchain_path
1070with_extra_path
1071with_sdk_name
1072with_conf_name
1073with_output_sync
1074with_default_make_target
1075enable_headful
1076enable_hotspot_test_in_build
1077with_cacerts_file
1078enable_unlimited_crypto
1079with_copyright_year
1080with_milestone
1081with_update_version
1082with_user_release_suffix
1083with_build_number
1084with_version_string
1085with_version_pre
1086with_version_opt
1087with_version_build
1088with_version_major
1089with_version_minor
1090with_version_security
1091with_version_patch
1092with_boot_jdk
1093with_add_source_root
1094with_override_source_root
1095with_adds_and_overrides
1096with_override_langtools
1097with_override_corba
1098with_override_jaxp
1099with_override_jaxws
1100with_override_hotspot
1101with_override_nashorn
1102with_override_jdk
1103with_import_hotspot
1104enable_static_build
1105with_toolchain_type
1106with_extra_cflags
1107with_extra_cxxflags
1108with_extra_ldflags
1109with_toolchain_version
1110with_build_devkit
1111with_jtreg
1112enable_warnings_as_errors
1113with_native_debug_symbols
1114enable_debug_symbols
1115enable_zip_debug_info
1116enable_native_coverage
1117with_stdc__lib
1118with_msvcr_dll
1119with_msvcp_dll
1120with_x
1121with_cups
1122with_cups_include
1123with_freetype
1124with_freetype_include
1125with_freetype_lib
1126with_freetype_src
1127enable_freetype_bundling
1128with_alsa
1129with_alsa_include
1130with_alsa_lib
1131with_libffi
1132with_libffi_include
1133with_libffi_lib
1134with_libjpeg
1135with_giflib
1136with_libpng
1137with_zlib
1138with_lcms
1139with_dxsdk
1140with_dxsdk_lib
1141with_dxsdk_include
1142with_num_cores
1143with_memory_size
1144with_jobs
1145with_boot_jdk_jvmargs
1146with_sjavac_server_java
1147enable_sjavac
1148enable_javac_server
1149enable_icecc
1150enable_precompiled_headers
1151enable_ccache
1152with_ccache_dir
1153'
1154      ac_precious_vars='build_alias
1155host_alias
1156target_alias
1157BASENAME
1158BASH
1159CAT
1160CHMOD
1161CMP
1162COMM
1163CP
1164CUT
1165DATE
1166DIFF
1167DIRNAME
1168ECHO
1169EXPR
1170FILE
1171FIND
1172HEAD
1173LN
1174LS
1175MKDIR
1176MKTEMP
1177MV
1178NAWK
1179PRINTF
1180RM
1181RMDIR
1182SH
1183SORT
1184TAIL
1185TAR
1186TEE
1187TOUCH
1188TR
1189UNAME
1190UNIQ
1191WC
1192WHICH
1193XARGS
1194AWK
1195GREP
1196EGREP
1197FGREP
1198SED
1199CYGPATH
1200READLINK
1201DF
1202CPIO
1203NICE
1204MAKE
1205UNZIP
1206ZIP
1207LDD
1208OTOOL
1209READELF
1210HG
1211STAT
1212TIME
1213PATCH
1214DSYMUTIL
1215XATTR
1216CODESIGN
1217SETFILE
1218PKG_CONFIG
1219JAVA
1220JAVAC
1221JAVAH
1222JAR
1223JARSIGNER
1224CC
1225CFLAGS
1226LDFLAGS
1227LIBS
1228CPPFLAGS
1229CXX
1230CXXFLAGS
1231CCC
1232CPP
1233CXXCPP
1234AS
1235AR
1236LIPO
1237STRIP
1238NM
1239GNM
1240OBJCOPY
1241OBJDUMP
1242BUILD_CC
1243BUILD_CXX
1244BUILD_NM
1245BUILD_AR
1246JTREGEXE
1247XMKMF
1248FREETYPE_CFLAGS
1249FREETYPE_LIBS
1250ALSA_CFLAGS
1251ALSA_LIBS
1252LIBFFI_CFLAGS
1253LIBFFI_LIBS
1254PNG_CFLAGS
1255PNG_LIBS
1256LCMS_CFLAGS
1257LCMS_LIBS
1258ICECC_CMD
1259ICECC_CREATE_ENV
1260ICECC_WRAPPER
1261CCACHE'
1262
1263
1264# Initialize some variables set by options.
1265ac_init_help=
1266ac_init_version=false
1267ac_unrecognized_opts=
1268ac_unrecognized_sep=
1269# The variables have the same names as the options, with
1270# dashes changed to underlines.
1271cache_file=/dev/null
1272exec_prefix=NONE
1273no_create=
1274no_recursion=
1275prefix=NONE
1276program_prefix=NONE
1277program_suffix=NONE
1278program_transform_name=s,x,x,
1279silent=
1280site=
1281srcdir=
1282verbose=
1283x_includes=NONE
1284x_libraries=NONE
1285
1286# Installation directory options.
1287# These are left unexpanded so users can "make install exec_prefix=/foo"
1288# and all the variables that are supposed to be based on exec_prefix
1289# by default will actually change.
1290# Use braces instead of parens because sh, perl, etc. also accept them.
1291# (The list follows the same order as the GNU Coding Standards.)
1292bindir='${exec_prefix}/bin'
1293sbindir='${exec_prefix}/sbin'
1294libexecdir='${exec_prefix}/libexec'
1295datarootdir='${prefix}/share'
1296datadir='${datarootdir}'
1297sysconfdir='${prefix}/etc'
1298sharedstatedir='${prefix}/com'
1299localstatedir='${prefix}/var'
1300includedir='${prefix}/include'
1301oldincludedir='/usr/include'
1302docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1303infodir='${datarootdir}/info'
1304htmldir='${docdir}'
1305dvidir='${docdir}'
1306pdfdir='${docdir}'
1307psdir='${docdir}'
1308libdir='${exec_prefix}/lib'
1309localedir='${datarootdir}/locale'
1310mandir='${datarootdir}/man'
1311
1312ac_prev=
1313ac_dashdash=
1314for ac_option
1315do
1316  # If the previous option needs an argument, assign it.
1317  if test -n "$ac_prev"; then
1318    eval $ac_prev=\$ac_option
1319    ac_prev=
1320    continue
1321  fi
1322
1323  case $ac_option in
1324  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1325  *=)   ac_optarg= ;;
1326  *)    ac_optarg=yes ;;
1327  esac
1328
1329  # Accept the important Cygnus configure options, so we can diagnose typos.
1330
1331  case $ac_dashdash$ac_option in
1332  --)
1333    ac_dashdash=yes ;;
1334
1335  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1336    ac_prev=bindir ;;
1337  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1338    bindir=$ac_optarg ;;
1339
1340  -build | --build | --buil | --bui | --bu)
1341    ac_prev=build_alias ;;
1342  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1343    build_alias=$ac_optarg ;;
1344
1345  -cache-file | --cache-file | --cache-fil | --cache-fi \
1346  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1347    ac_prev=cache_file ;;
1348  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1349  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1350    cache_file=$ac_optarg ;;
1351
1352  --config-cache | -C)
1353    cache_file=config.cache ;;
1354
1355  -datadir | --datadir | --datadi | --datad)
1356    ac_prev=datadir ;;
1357  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1358    datadir=$ac_optarg ;;
1359
1360  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1361  | --dataroo | --dataro | --datar)
1362    ac_prev=datarootdir ;;
1363  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1364  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1365    datarootdir=$ac_optarg ;;
1366
1367  -disable-* | --disable-*)
1368    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1369    # Reject names that are not valid shell variable names.
1370    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1371      as_fn_error $? "invalid feature name: $ac_useropt"
1372    ac_useropt_orig=$ac_useropt
1373    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1374    case $ac_user_opts in
1375      *"
1376"enable_$ac_useropt"
1377"*) ;;
1378      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1379	 ac_unrecognized_sep=', ';;
1380    esac
1381    eval enable_$ac_useropt=no ;;
1382
1383  -docdir | --docdir | --docdi | --doc | --do)
1384    ac_prev=docdir ;;
1385  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1386    docdir=$ac_optarg ;;
1387
1388  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1389    ac_prev=dvidir ;;
1390  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1391    dvidir=$ac_optarg ;;
1392
1393  -enable-* | --enable-*)
1394    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1395    # Reject names that are not valid shell variable names.
1396    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1397      as_fn_error $? "invalid feature name: $ac_useropt"
1398    ac_useropt_orig=$ac_useropt
1399    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1400    case $ac_user_opts in
1401      *"
1402"enable_$ac_useropt"
1403"*) ;;
1404      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1405	 ac_unrecognized_sep=', ';;
1406    esac
1407    eval enable_$ac_useropt=\$ac_optarg ;;
1408
1409  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1410  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1411  | --exec | --exe | --ex)
1412    ac_prev=exec_prefix ;;
1413  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1414  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1415  | --exec=* | --exe=* | --ex=*)
1416    exec_prefix=$ac_optarg ;;
1417
1418  -gas | --gas | --ga | --g)
1419    # Obsolete; use --with-gas.
1420    with_gas=yes ;;
1421
1422  -help | --help | --hel | --he | -h)
1423    ac_init_help=long ;;
1424  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1425    ac_init_help=recursive ;;
1426  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1427    ac_init_help=short ;;
1428
1429  -host | --host | --hos | --ho)
1430    ac_prev=host_alias ;;
1431  -host=* | --host=* | --hos=* | --ho=*)
1432    host_alias=$ac_optarg ;;
1433
1434  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1435    ac_prev=htmldir ;;
1436  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1437  | --ht=*)
1438    htmldir=$ac_optarg ;;
1439
1440  -includedir | --includedir | --includedi | --included | --include \
1441  | --includ | --inclu | --incl | --inc)
1442    ac_prev=includedir ;;
1443  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1444  | --includ=* | --inclu=* | --incl=* | --inc=*)
1445    includedir=$ac_optarg ;;
1446
1447  -infodir | --infodir | --infodi | --infod | --info | --inf)
1448    ac_prev=infodir ;;
1449  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1450    infodir=$ac_optarg ;;
1451
1452  -libdir | --libdir | --libdi | --libd)
1453    ac_prev=libdir ;;
1454  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1455    libdir=$ac_optarg ;;
1456
1457  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1458  | --libexe | --libex | --libe)
1459    ac_prev=libexecdir ;;
1460  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1461  | --libexe=* | --libex=* | --libe=*)
1462    libexecdir=$ac_optarg ;;
1463
1464  -localedir | --localedir | --localedi | --localed | --locale)
1465    ac_prev=localedir ;;
1466  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1467    localedir=$ac_optarg ;;
1468
1469  -localstatedir | --localstatedir | --localstatedi | --localstated \
1470  | --localstate | --localstat | --localsta | --localst | --locals)
1471    ac_prev=localstatedir ;;
1472  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1473  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1474    localstatedir=$ac_optarg ;;
1475
1476  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1477    ac_prev=mandir ;;
1478  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1479    mandir=$ac_optarg ;;
1480
1481  -nfp | --nfp | --nf)
1482    # Obsolete; use --without-fp.
1483    with_fp=no ;;
1484
1485  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1486  | --no-cr | --no-c | -n)
1487    no_create=yes ;;
1488
1489  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1490  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1491    no_recursion=yes ;;
1492
1493  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1494  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1495  | --oldin | --oldi | --old | --ol | --o)
1496    ac_prev=oldincludedir ;;
1497  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1498  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1499  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1500    oldincludedir=$ac_optarg ;;
1501
1502  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1503    ac_prev=prefix ;;
1504  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1505    prefix=$ac_optarg ;;
1506
1507  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1508  | --program-pre | --program-pr | --program-p)
1509    ac_prev=program_prefix ;;
1510  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1511  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1512    program_prefix=$ac_optarg ;;
1513
1514  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1515  | --program-suf | --program-su | --program-s)
1516    ac_prev=program_suffix ;;
1517  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1518  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1519    program_suffix=$ac_optarg ;;
1520
1521  -program-transform-name | --program-transform-name \
1522  | --program-transform-nam | --program-transform-na \
1523  | --program-transform-n | --program-transform- \
1524  | --program-transform | --program-transfor \
1525  | --program-transfo | --program-transf \
1526  | --program-trans | --program-tran \
1527  | --progr-tra | --program-tr | --program-t)
1528    ac_prev=program_transform_name ;;
1529  -program-transform-name=* | --program-transform-name=* \
1530  | --program-transform-nam=* | --program-transform-na=* \
1531  | --program-transform-n=* | --program-transform-=* \
1532  | --program-transform=* | --program-transfor=* \
1533  | --program-transfo=* | --program-transf=* \
1534  | --program-trans=* | --program-tran=* \
1535  | --progr-tra=* | --program-tr=* | --program-t=*)
1536    program_transform_name=$ac_optarg ;;
1537
1538  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1539    ac_prev=pdfdir ;;
1540  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1541    pdfdir=$ac_optarg ;;
1542
1543  -psdir | --psdir | --psdi | --psd | --ps)
1544    ac_prev=psdir ;;
1545  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1546    psdir=$ac_optarg ;;
1547
1548  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1549  | -silent | --silent | --silen | --sile | --sil)
1550    silent=yes ;;
1551
1552  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1553    ac_prev=sbindir ;;
1554  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1555  | --sbi=* | --sb=*)
1556    sbindir=$ac_optarg ;;
1557
1558  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1559  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1560  | --sharedst | --shareds | --shared | --share | --shar \
1561  | --sha | --sh)
1562    ac_prev=sharedstatedir ;;
1563  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1564  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1565  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1566  | --sha=* | --sh=*)
1567    sharedstatedir=$ac_optarg ;;
1568
1569  -site | --site | --sit)
1570    ac_prev=site ;;
1571  -site=* | --site=* | --sit=*)
1572    site=$ac_optarg ;;
1573
1574  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1575    ac_prev=srcdir ;;
1576  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1577    srcdir=$ac_optarg ;;
1578
1579  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1580  | --syscon | --sysco | --sysc | --sys | --sy)
1581    ac_prev=sysconfdir ;;
1582  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1583  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1584    sysconfdir=$ac_optarg ;;
1585
1586  -target | --target | --targe | --targ | --tar | --ta | --t)
1587    ac_prev=target_alias ;;
1588  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1589    target_alias=$ac_optarg ;;
1590
1591  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1592    verbose=yes ;;
1593
1594  -version | --version | --versio | --versi | --vers | -V)
1595    ac_init_version=: ;;
1596
1597  -with-* | --with-*)
1598    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1599    # Reject names that are not valid shell variable names.
1600    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1601      as_fn_error $? "invalid package name: $ac_useropt"
1602    ac_useropt_orig=$ac_useropt
1603    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1604    case $ac_user_opts in
1605      *"
1606"with_$ac_useropt"
1607"*) ;;
1608      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1609	 ac_unrecognized_sep=', ';;
1610    esac
1611    eval with_$ac_useropt=\$ac_optarg ;;
1612
1613  -without-* | --without-*)
1614    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1615    # Reject names that are not valid shell variable names.
1616    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1617      as_fn_error $? "invalid package name: $ac_useropt"
1618    ac_useropt_orig=$ac_useropt
1619    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1620    case $ac_user_opts in
1621      *"
1622"with_$ac_useropt"
1623"*) ;;
1624      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1625	 ac_unrecognized_sep=', ';;
1626    esac
1627    eval with_$ac_useropt=no ;;
1628
1629  --x)
1630    # Obsolete; use --with-x.
1631    with_x=yes ;;
1632
1633  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1634  | --x-incl | --x-inc | --x-in | --x-i)
1635    ac_prev=x_includes ;;
1636  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1637  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1638    x_includes=$ac_optarg ;;
1639
1640  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1641  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1642    ac_prev=x_libraries ;;
1643  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1644  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1645    x_libraries=$ac_optarg ;;
1646
1647  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1648Try \`$0 --help' for more information"
1649    ;;
1650
1651  *=*)
1652    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1653    # Reject names that are not valid shell variable names.
1654    case $ac_envvar in #(
1655      '' | [0-9]* | *[!_$as_cr_alnum]* )
1656      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1657    esac
1658    eval $ac_envvar=\$ac_optarg
1659    export $ac_envvar ;;
1660
1661  *)
1662    # FIXME: should be removed in autoconf 3.0.
1663    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1664    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1665      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1666    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1667    ;;
1668
1669  esac
1670done
1671
1672if test -n "$ac_prev"; then
1673  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1674  as_fn_error $? "missing argument to $ac_option"
1675fi
1676
1677if test -n "$ac_unrecognized_opts"; then
1678  case $enable_option_checking in
1679    no) ;;
1680    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1681    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1682  esac
1683fi
1684
1685# Check all directory arguments for consistency.
1686for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1687		datadir sysconfdir sharedstatedir localstatedir includedir \
1688		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1689		libdir localedir mandir
1690do
1691  eval ac_val=\$$ac_var
1692  # Remove trailing slashes.
1693  case $ac_val in
1694    */ )
1695      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1696      eval $ac_var=\$ac_val;;
1697  esac
1698  # Be sure to have absolute directory names.
1699  case $ac_val in
1700    [\\/$]* | ?:[\\/]* )  continue;;
1701    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1702  esac
1703  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1704done
1705
1706# There might be people who depend on the old broken behavior: `$host'
1707# used to hold the argument of --host etc.
1708# FIXME: To remove some day.
1709build=$build_alias
1710host=$host_alias
1711target=$target_alias
1712
1713# FIXME: To remove some day.
1714if test "x$host_alias" != x; then
1715  if test "x$build_alias" = x; then
1716    cross_compiling=maybe
1717  elif test "x$build_alias" != "x$host_alias"; then
1718    cross_compiling=yes
1719  fi
1720fi
1721
1722ac_tool_prefix=
1723test -n "$host_alias" && ac_tool_prefix=$host_alias-
1724
1725test "$silent" = yes && exec 6>/dev/null
1726
1727
1728ac_pwd=`pwd` && test -n "$ac_pwd" &&
1729ac_ls_di=`ls -di .` &&
1730ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1731  as_fn_error $? "working directory cannot be determined"
1732test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1733  as_fn_error $? "pwd does not report name of working directory"
1734
1735
1736# Find the source files, if location was not specified.
1737if test -z "$srcdir"; then
1738  ac_srcdir_defaulted=yes
1739  # Try the directory containing this script, then the parent directory.
1740  ac_confdir=`$as_dirname -- "$as_myself" ||
1741$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1742	 X"$as_myself" : 'X\(//\)[^/]' \| \
1743	 X"$as_myself" : 'X\(//\)$' \| \
1744	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1745$as_echo X"$as_myself" |
1746    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1747	    s//\1/
1748	    q
1749	  }
1750	  /^X\(\/\/\)[^/].*/{
1751	    s//\1/
1752	    q
1753	  }
1754	  /^X\(\/\/\)$/{
1755	    s//\1/
1756	    q
1757	  }
1758	  /^X\(\/\).*/{
1759	    s//\1/
1760	    q
1761	  }
1762	  s/.*/./; q'`
1763  srcdir=$ac_confdir
1764  if test ! -r "$srcdir/$ac_unique_file"; then
1765    srcdir=..
1766  fi
1767else
1768  ac_srcdir_defaulted=no
1769fi
1770if test ! -r "$srcdir/$ac_unique_file"; then
1771  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1772  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1773fi
1774ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1775ac_abs_confdir=`(
1776	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1777	pwd)`
1778# When building in place, set srcdir=.
1779if test "$ac_abs_confdir" = "$ac_pwd"; then
1780  srcdir=.
1781fi
1782# Remove unnecessary trailing slashes from srcdir.
1783# Double slashes in file names in object file debugging info
1784# mess up M-x gdb in Emacs.
1785case $srcdir in
1786*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1787esac
1788for ac_var in $ac_precious_vars; do
1789  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1790  eval ac_env_${ac_var}_value=\$${ac_var}
1791  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1792  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1793done
1794
1795#
1796# Report the --help message.
1797#
1798if test "$ac_init_help" = "long"; then
1799  # Omit some internal or obsolete options to make the list less imposing.
1800  # This message is too long to be a string in the A/UX 3.1 sh.
1801  cat <<_ACEOF
1802\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1803
1804Usage: $0 [OPTION]... [VAR=VALUE]...
1805
1806To assign environment variables (e.g., CC, CFLAGS...), specify them as
1807VAR=VALUE.  See below for descriptions of some of the useful variables.
1808
1809Defaults for the options are specified in brackets.
1810
1811Configuration:
1812  -h, --help              display this help and exit
1813      --help=short        display options specific to this package
1814      --help=recursive    display the short help of all the included packages
1815  -V, --version           display version information and exit
1816  -q, --quiet, --silent   do not print \`checking ...' messages
1817      --cache-file=FILE   cache test results in FILE [disabled]
1818  -C, --config-cache      alias for \`--cache-file=config.cache'
1819  -n, --no-create         do not create output files
1820      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1821
1822Installation directories:
1823  --prefix=PREFIX         install architecture-independent files in PREFIX
1824                          [$ac_default_prefix]
1825  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1826                          [PREFIX]
1827
1828By default, \`make install' will install all the files in
1829\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1830an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1831for instance \`--prefix=\$HOME'.
1832
1833For better control, use the options below.
1834
1835Fine tuning of the installation directories:
1836  --bindir=DIR            user executables [EPREFIX/bin]
1837  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1838  --libexecdir=DIR        program executables [EPREFIX/libexec]
1839  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1840  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1841  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1842  --libdir=DIR            object code libraries [EPREFIX/lib]
1843  --includedir=DIR        C header files [PREFIX/include]
1844  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1845  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1846  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1847  --infodir=DIR           info documentation [DATAROOTDIR/info]
1848  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1849  --mandir=DIR            man documentation [DATAROOTDIR/man]
1850  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1851  --htmldir=DIR           html documentation [DOCDIR]
1852  --dvidir=DIR            dvi documentation [DOCDIR]
1853  --pdfdir=DIR            pdf documentation [DOCDIR]
1854  --psdir=DIR             ps documentation [DOCDIR]
1855_ACEOF
1856
1857  cat <<\_ACEOF
1858
1859X features:
1860  --x-includes=DIR    X include files are in DIR
1861  --x-libraries=DIR   X library files are in DIR
1862
1863System types:
1864  --build=BUILD     configure for building on BUILD [guessed]
1865  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1866  --target=TARGET   configure for building compilers for TARGET [HOST]
1867_ACEOF
1868fi
1869
1870if test -n "$ac_init_help"; then
1871  case $ac_init_help in
1872     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1873   esac
1874  cat <<\_ACEOF
1875
1876Optional Features:
1877  --disable-option-checking  ignore unrecognized --enable/--with options
1878  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1879  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1880  --enable-openjdk-only   suppress building custom source even if present
1881                          [disabled]
1882  --enable-debug          set the debug level to fastdebug (shorthand for
1883                          --with-debug-level=fastdebug) [disabled]
1884  --disable-headful       disable building headful support (graphical UI
1885                          support) [enabled]
1886  --enable-hotspot-test-in-build
1887                          run the Queens test after Hotspot build [disabled]
1888  --enable-unlimited-crypto
1889                          Enable unlimited crypto policy [disabled]
1890  --enable-static-build   enable static library build [disabled]
1891  --disable-warnings-as-errors
1892                          do not consider native warnings to be an error
1893                          [enabled]
1894  --enable-debug-symbols  Deprecated. Option is kept for backwards
1895                          compatibility and is ignored
1896  --enable-zip-debug-info Deprecated. Option is kept for backwards
1897                          compatibility and is ignored
1898  --enable-native-coverage
1899                          enable native compilation with code coverage
1900                          data[disabled]
1901  --disable-freetype-bundling
1902                          disable bundling of the freetype library with the
1903                          build result [enabled on Windows or when using
1904                          --with-freetype, disabled otherwise]
1905  --enable-sjavac         use sjavac to do fast incremental compiles
1906                          [disabled]
1907  --disable-javac-server  disable javac server [enabled]
1908  --enable-icecc          enable distribted compilation of native code using
1909                          icecc/icecream [disabled]
1910  --disable-precompiled-headers
1911                          disable using precompiled headers when compiling C++
1912                          [enabled]
1913  --enable-ccache         enable using ccache to speed up recompilations
1914                          [disabled]
1915
1916Optional Packages:
1917  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1918  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1919  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1920                          support it), e.g. --with-target-bits=32 [guessed]
1921  --with-custom-make-dir  Deprecated. Option is kept for backwards
1922                          compatibility and is ignored
1923  --with-jdk-variant      JDK variant to build (normal) [normal]
1924  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1925  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1926                          client, minimal1, kernel, zero, zeroshark, core)
1927                          [server]
1928  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1929                          optimized (HotSpot build only)) [release]
1930  --with-devkit           use this devkit for compilers, tools and resources
1931  --with-sys-root         alias for --with-sysroot for backwards compatability
1932  --with-sysroot          use this directory as sysroot
1933  --with-tools-dir        alias for --with-toolchain-path for backwards
1934                          compatibility
1935  --with-toolchain-path   prepend these directories when searching for
1936                          toolchain binaries (compilers etc)
1937  --with-extra-path       prepend these directories to the default path
1938  --with-sdk-name         use the platform SDK of the given name. [macosx]
1939  --with-conf-name        use this as the name of the configuration [generated
1940                          from important configuration options]
1941  --with-output-sync      set make output sync type if supported by make.
1942                          [recurse]
1943  --with-default-make-target
1944                          set the default make target [exploded-image]
1945  --with-cacerts-file     specify alternative cacerts file
1946  --with-copyright-year   Set copyright year value for build [current year]
1947  --with-milestone        Deprecated. Option is kept for backwards
1948                          compatibility and is ignored
1949  --with-update-version   Deprecated. Option is kept for backwards
1950                          compatibility and is ignored
1951  --with-user-release-suffix
1952                          Deprecated. Option is kept for backwards
1953                          compatibility and is ignored
1954  --with-build-number     Deprecated. Option is kept for backwards
1955                          compatibility and is ignored
1956  --with-version-string   Set version string [calculated]
1957  --with-version-pre      Set the base part of the version 'PRE' field
1958                          (pre-release identifier) ['internal']
1959  --with-version-opt      Set version 'OPT' field (build metadata)
1960                          [<timestamp>.<user>.<dirname>]
1961  --with-version-build    Set version 'BUILD' field (build number) [not
1962                          specified]
1963  --with-version-major    Set version 'MAJOR' field (first number) [current
1964                          source value]
1965  --with-version-minor    Set version 'MINOR' field (second number) [current
1966                          source value]
1967  --with-version-security Set version 'SECURITY' field (third number) [current
1968                          source value]
1969  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1970                          specified]
1971  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1972  --with-add-source-root  Deprecated. Option is kept for backwards
1973                          compatibility and is ignored
1974  --with-override-source-root
1975                          Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --with-adds-and-overrides
1978                          Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --with-override-langtools
1981                          Deprecated. Option is kept for backwards
1982                          compatibility and is ignored
1983  --with-override-corba   Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-override-jaxp    Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-override-jaxws   Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-override-hotspot Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --with-override-nashorn Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --with-override-jdk     Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --with-import-hotspot   import hotspot binaries from this jdk image or
1996                          hotspot build dist dir instead of building from
1997                          source
1998  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1999                          to show possible values [platform dependent]
2000  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2001  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2002  --with-extra-ldflags    extra flags to be used when linking jdk
2003  --with-toolchain-version
2004                          the version of the toolchain to look for, use
2005                          '--help' to show possible values [platform
2006                          dependent]
2007  --with-build-devkit     Devkit to use for the build platform toolchain
2008  --with-jtreg            Regression Test Harness [probed]
2009  --with-native-debug-symbols
2010                          set the native debug symbol configuration (none,
2011                          internal, external, zipped) [zipped]
2012  --with-stdc++lib=<static>,<dynamic>,<default>
2013                          force linking of the C++ runtime on Linux to either
2014                          static or dynamic, default is static with dynamic as
2015                          fallback
2016  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2017                          (Windows only) [probed]
2018  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2019                          (Windows only) [probed]
2020  --with-x                use the X Window System
2021  --with-cups             specify prefix directory for the cups package
2022                          (expecting the headers under PATH/include)
2023  --with-cups-include     specify directory for the cups include files
2024  --with-freetype         specify prefix directory for the freetype package
2025                          (expecting the libraries under PATH/lib and the
2026                          headers under PATH/include)
2027  --with-freetype-include specify directory for the freetype include files
2028  --with-freetype-lib     specify directory for the freetype library
2029  --with-freetype-src     specify directory with freetype sources to
2030                          automatically build the library (experimental,
2031                          Windows-only)
2032  --with-alsa             specify prefix directory for the alsa package
2033                          (expecting the libraries under PATH/lib and the
2034                          headers under PATH/include)
2035  --with-alsa-include     specify directory for the alsa include files
2036  --with-alsa-lib         specify directory for the alsa library
2037  --with-libffi           specify prefix directory for the libffi package
2038                          (expecting the libraries under PATH/lib and the
2039                          headers under PATH/include)
2040  --with-libffi-include   specify directory for the libffi include files
2041  --with-libffi-lib       specify directory for the libffi library
2042  --with-libjpeg          use libjpeg from build system or OpenJDK source
2043                          (system, bundled) [bundled]
2044  --with-giflib           use giflib from build system or OpenJDK source
2045                          (system, bundled) [bundled]
2046  --with-libpng           use libpng from build system or OpenJDK source
2047                          (system, bundled) [bundled]
2048  --with-zlib             use zlib from build system or OpenJDK source
2049                          (system, bundled) [bundled]
2050  --with-lcms             use lcms2 from build system or OpenJDK source
2051                          (system, bundled) [bundled]
2052  --with-dxsdk            Deprecated. Option is kept for backwards
2053                          compatibility and is ignored
2054  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2055                          compatibility and is ignored
2056  --with-dxsdk-include    Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-num-cores        number of cores in the build system, e.g.
2059                          --with-num-cores=8 [probed]
2060  --with-memory-size      memory (in MB) available in the build system, e.g.
2061                          --with-memory-size=1024 [probed]
2062  --with-jobs             number of parallel jobs to let make run [calculated
2063                          based on cores and memory]
2064  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2065                          invocations of boot JDK, overriding the default
2066                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2067                          -enableassertions"
2068  --with-sjavac-server-java
2069                          use this java binary for running the sjavac
2070                          background server [Boot JDK java]
2071  --with-ccache-dir       where to store ccache files [~/.ccache]
2072
2073Some influential environment variables:
2074  BASENAME    Override default value for BASENAME
2075  BASH        Override default value for BASH
2076  CAT         Override default value for CAT
2077  CHMOD       Override default value for CHMOD
2078  CMP         Override default value for CMP
2079  COMM        Override default value for COMM
2080  CP          Override default value for CP
2081  CUT         Override default value for CUT
2082  DATE        Override default value for DATE
2083  DIFF        Override default value for DIFF
2084  DIRNAME     Override default value for DIRNAME
2085  ECHO        Override default value for ECHO
2086  EXPR        Override default value for EXPR
2087  FILE        Override default value for FILE
2088  FIND        Override default value for FIND
2089  HEAD        Override default value for HEAD
2090  LN          Override default value for LN
2091  LS          Override default value for LS
2092  MKDIR       Override default value for MKDIR
2093  MKTEMP      Override default value for MKTEMP
2094  MV          Override default value for MV
2095  NAWK        Override default value for NAWK
2096  PRINTF      Override default value for PRINTF
2097  RM          Override default value for RM
2098  RMDIR       Override default value for RMDIR
2099  SH          Override default value for SH
2100  SORT        Override default value for SORT
2101  TAIL        Override default value for TAIL
2102  TAR         Override default value for TAR
2103  TEE         Override default value for TEE
2104  TOUCH       Override default value for TOUCH
2105  TR          Override default value for TR
2106  UNAME       Override default value for UNAME
2107  UNIQ        Override default value for UNIQ
2108  WC          Override default value for WC
2109  WHICH       Override default value for WHICH
2110  XARGS       Override default value for XARGS
2111  AWK         Override default value for AWK
2112  GREP        Override default value for GREP
2113  EGREP       Override default value for EGREP
2114  FGREP       Override default value for FGREP
2115  SED         Override default value for SED
2116  CYGPATH     Override default value for CYGPATH
2117  READLINK    Override default value for READLINK
2118  DF          Override default value for DF
2119  CPIO        Override default value for CPIO
2120  NICE        Override default value for NICE
2121  MAKE        Override default value for MAKE
2122  UNZIP       Override default value for UNZIP
2123  ZIP         Override default value for ZIP
2124  LDD         Override default value for LDD
2125  OTOOL       Override default value for OTOOL
2126  READELF     Override default value for READELF
2127  HG          Override default value for HG
2128  STAT        Override default value for STAT
2129  TIME        Override default value for TIME
2130  PATCH       Override default value for PATCH
2131  DSYMUTIL    Override default value for DSYMUTIL
2132  XATTR       Override default value for XATTR
2133  CODESIGN    Override default value for CODESIGN
2134  SETFILE     Override default value for SETFILE
2135  PKG_CONFIG  path to pkg-config utility
2136  JAVA        Override default value for JAVA
2137  JAVAC       Override default value for JAVAC
2138  JAVAH       Override default value for JAVAH
2139  JAR         Override default value for JAR
2140  JARSIGNER   Override default value for JARSIGNER
2141  CC          C compiler command
2142  CFLAGS      C compiler flags
2143  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2144              nonstandard directory <lib dir>
2145  LIBS        libraries to pass to the linker, e.g. -l<library>
2146  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2147              you have headers in a nonstandard directory <include dir>
2148  CXX         C++ compiler command
2149  CXXFLAGS    C++ compiler flags
2150  CPP         C preprocessor
2151  CXXCPP      C++ preprocessor
2152  AS          Override default value for AS
2153  AR          Override default value for AR
2154  LIPO        Override default value for LIPO
2155  STRIP       Override default value for STRIP
2156  NM          Override default value for NM
2157  GNM         Override default value for GNM
2158  OBJCOPY     Override default value for OBJCOPY
2159  OBJDUMP     Override default value for OBJDUMP
2160  BUILD_CC    Override default value for BUILD_CC
2161  BUILD_CXX   Override default value for BUILD_CXX
2162  BUILD_NM    Override default value for BUILD_NM
2163  BUILD_AR    Override default value for BUILD_AR
2164  JTREGEXE    Override default value for JTREGEXE
2165  XMKMF       Path to xmkmf, Makefile generator for X Window System
2166  FREETYPE_CFLAGS
2167              C compiler flags for FREETYPE, overriding pkg-config
2168  FREETYPE_LIBS
2169              linker flags for FREETYPE, overriding pkg-config
2170  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2171  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2172  LIBFFI_CFLAGS
2173              C compiler flags for LIBFFI, overriding pkg-config
2174  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2175  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2176  PNG_LIBS    linker flags for PNG, overriding pkg-config
2177  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2178  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2179  ICECC_CMD   Override default value for ICECC_CMD
2180  ICECC_CREATE_ENV
2181              Override default value for ICECC_CREATE_ENV
2182  ICECC_WRAPPER
2183              Override default value for ICECC_WRAPPER
2184  CCACHE      Override default value for CCACHE
2185
2186Use these variables to override the choices made by `configure' or to help
2187it to find libraries and programs with nonstandard names/locations.
2188
2189Report bugs to <build-dev@openjdk.java.net>.
2190OpenJDK home page: <http://openjdk.java.net>.
2191_ACEOF
2192ac_status=$?
2193fi
2194
2195if test "$ac_init_help" = "recursive"; then
2196  # If there are subdirs, report their specific --help.
2197  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2198    test -d "$ac_dir" ||
2199      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2200      continue
2201    ac_builddir=.
2202
2203case "$ac_dir" in
2204.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2205*)
2206  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2207  # A ".." for each directory in $ac_dir_suffix.
2208  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2209  case $ac_top_builddir_sub in
2210  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2211  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2212  esac ;;
2213esac
2214ac_abs_top_builddir=$ac_pwd
2215ac_abs_builddir=$ac_pwd$ac_dir_suffix
2216# for backward compatibility:
2217ac_top_builddir=$ac_top_build_prefix
2218
2219case $srcdir in
2220  .)  # We are building in place.
2221    ac_srcdir=.
2222    ac_top_srcdir=$ac_top_builddir_sub
2223    ac_abs_top_srcdir=$ac_pwd ;;
2224  [\\/]* | ?:[\\/]* )  # Absolute name.
2225    ac_srcdir=$srcdir$ac_dir_suffix;
2226    ac_top_srcdir=$srcdir
2227    ac_abs_top_srcdir=$srcdir ;;
2228  *) # Relative name.
2229    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2230    ac_top_srcdir=$ac_top_build_prefix$srcdir
2231    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2232esac
2233ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2234
2235    cd "$ac_dir" || { ac_status=$?; continue; }
2236    # Check for guested configure.
2237    if test -f "$ac_srcdir/configure.gnu"; then
2238      echo &&
2239      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2240    elif test -f "$ac_srcdir/configure"; then
2241      echo &&
2242      $SHELL "$ac_srcdir/configure" --help=recursive
2243    else
2244      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2245    fi || ac_status=$?
2246    cd "$ac_pwd" || { ac_status=$?; break; }
2247  done
2248fi
2249
2250test -n "$ac_init_help" && exit $ac_status
2251if $ac_init_version; then
2252  cat <<\_ACEOF
2253OpenJDK configure jdk9
2254generated by GNU Autoconf 2.69
2255
2256Copyright (C) 2012 Free Software Foundation, Inc.
2257This configure script is free software; the Free Software Foundation
2258gives unlimited permission to copy, distribute and modify it.
2259_ACEOF
2260  exit
2261fi
2262
2263## ------------------------ ##
2264## Autoconf initialization. ##
2265## ------------------------ ##
2266
2267# ac_fn_c_try_compile LINENO
2268# --------------------------
2269# Try to compile conftest.$ac_ext, and return whether this succeeded.
2270ac_fn_c_try_compile ()
2271{
2272  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273  rm -f conftest.$ac_objext
2274  if { { ac_try="$ac_compile"
2275case "(($ac_try" in
2276  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2277  *) ac_try_echo=$ac_try;;
2278esac
2279eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2280$as_echo "$ac_try_echo"; } >&5
2281  (eval "$ac_compile") 2>conftest.err
2282  ac_status=$?
2283  if test -s conftest.err; then
2284    grep -v '^ *+' conftest.err >conftest.er1
2285    cat conftest.er1 >&5
2286    mv -f conftest.er1 conftest.err
2287  fi
2288  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2289  test $ac_status = 0; } && {
2290	 test -z "$ac_c_werror_flag" ||
2291	 test ! -s conftest.err
2292       } && test -s conftest.$ac_objext; then :
2293  ac_retval=0
2294else
2295  $as_echo "$as_me: failed program was:" >&5
2296sed 's/^/| /' conftest.$ac_ext >&5
2297
2298	ac_retval=1
2299fi
2300  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2301  as_fn_set_status $ac_retval
2302
2303} # ac_fn_c_try_compile
2304
2305# ac_fn_cxx_try_compile LINENO
2306# ----------------------------
2307# Try to compile conftest.$ac_ext, and return whether this succeeded.
2308ac_fn_cxx_try_compile ()
2309{
2310  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2311  rm -f conftest.$ac_objext
2312  if { { ac_try="$ac_compile"
2313case "(($ac_try" in
2314  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2315  *) ac_try_echo=$ac_try;;
2316esac
2317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2318$as_echo "$ac_try_echo"; } >&5
2319  (eval "$ac_compile") 2>conftest.err
2320  ac_status=$?
2321  if test -s conftest.err; then
2322    grep -v '^ *+' conftest.err >conftest.er1
2323    cat conftest.er1 >&5
2324    mv -f conftest.er1 conftest.err
2325  fi
2326  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2327  test $ac_status = 0; } && {
2328	 test -z "$ac_cxx_werror_flag" ||
2329	 test ! -s conftest.err
2330       } && test -s conftest.$ac_objext; then :
2331  ac_retval=0
2332else
2333  $as_echo "$as_me: failed program was:" >&5
2334sed 's/^/| /' conftest.$ac_ext >&5
2335
2336	ac_retval=1
2337fi
2338  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2339  as_fn_set_status $ac_retval
2340
2341} # ac_fn_cxx_try_compile
2342
2343# ac_fn_c_try_cpp LINENO
2344# ----------------------
2345# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2346ac_fn_c_try_cpp ()
2347{
2348  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349  if { { ac_try="$ac_cpp conftest.$ac_ext"
2350case "(($ac_try" in
2351  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2352  *) ac_try_echo=$ac_try;;
2353esac
2354eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2355$as_echo "$ac_try_echo"; } >&5
2356  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2357  ac_status=$?
2358  if test -s conftest.err; then
2359    grep -v '^ *+' conftest.err >conftest.er1
2360    cat conftest.er1 >&5
2361    mv -f conftest.er1 conftest.err
2362  fi
2363  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2364  test $ac_status = 0; } > conftest.i && {
2365	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2366	 test ! -s conftest.err
2367       }; then :
2368  ac_retval=0
2369else
2370  $as_echo "$as_me: failed program was:" >&5
2371sed 's/^/| /' conftest.$ac_ext >&5
2372
2373    ac_retval=1
2374fi
2375  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2376  as_fn_set_status $ac_retval
2377
2378} # ac_fn_c_try_cpp
2379
2380# ac_fn_cxx_try_cpp LINENO
2381# ------------------------
2382# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2383ac_fn_cxx_try_cpp ()
2384{
2385  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386  if { { ac_try="$ac_cpp conftest.$ac_ext"
2387case "(($ac_try" in
2388  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2389  *) ac_try_echo=$ac_try;;
2390esac
2391eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2392$as_echo "$ac_try_echo"; } >&5
2393  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2394  ac_status=$?
2395  if test -s conftest.err; then
2396    grep -v '^ *+' conftest.err >conftest.er1
2397    cat conftest.er1 >&5
2398    mv -f conftest.er1 conftest.err
2399  fi
2400  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2401  test $ac_status = 0; } > conftest.i && {
2402	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2403	 test ! -s conftest.err
2404       }; then :
2405  ac_retval=0
2406else
2407  $as_echo "$as_me: failed program was:" >&5
2408sed 's/^/| /' conftest.$ac_ext >&5
2409
2410    ac_retval=1
2411fi
2412  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2413  as_fn_set_status $ac_retval
2414
2415} # ac_fn_cxx_try_cpp
2416
2417# ac_fn_c_try_link LINENO
2418# -----------------------
2419# Try to link conftest.$ac_ext, and return whether this succeeded.
2420ac_fn_c_try_link ()
2421{
2422  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423  rm -f conftest.$ac_objext conftest$ac_exeext
2424  if { { ac_try="$ac_link"
2425case "(($ac_try" in
2426  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2427  *) ac_try_echo=$ac_try;;
2428esac
2429eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2430$as_echo "$ac_try_echo"; } >&5
2431  (eval "$ac_link") 2>conftest.err
2432  ac_status=$?
2433  if test -s conftest.err; then
2434    grep -v '^ *+' conftest.err >conftest.er1
2435    cat conftest.er1 >&5
2436    mv -f conftest.er1 conftest.err
2437  fi
2438  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2439  test $ac_status = 0; } && {
2440	 test -z "$ac_c_werror_flag" ||
2441	 test ! -s conftest.err
2442       } && test -s conftest$ac_exeext && {
2443	 test "$cross_compiling" = yes ||
2444	 test -x conftest$ac_exeext
2445       }; then :
2446  ac_retval=0
2447else
2448  $as_echo "$as_me: failed program was:" >&5
2449sed 's/^/| /' conftest.$ac_ext >&5
2450
2451	ac_retval=1
2452fi
2453  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2454  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2455  # interfere with the next link command; also delete a directory that is
2456  # left behind by Apple's compiler.  We do this before executing the actions.
2457  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2458  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459  as_fn_set_status $ac_retval
2460
2461} # ac_fn_c_try_link
2462
2463# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2464# ---------------------------------------------------------
2465# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2466# the include files in INCLUDES and setting the cache variable VAR
2467# accordingly.
2468ac_fn_cxx_check_header_mongrel ()
2469{
2470  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471  if eval \${$3+:} false; then :
2472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2473$as_echo_n "checking for $2... " >&6; }
2474if eval \${$3+:} false; then :
2475  $as_echo_n "(cached) " >&6
2476fi
2477eval ac_res=\$$3
2478	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2479$as_echo "$ac_res" >&6; }
2480else
2481  # Is the header compilable?
2482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2483$as_echo_n "checking $2 usability... " >&6; }
2484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485/* end confdefs.h.  */
2486$4
2487#include <$2>
2488_ACEOF
2489if ac_fn_cxx_try_compile "$LINENO"; then :
2490  ac_header_compiler=yes
2491else
2492  ac_header_compiler=no
2493fi
2494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2496$as_echo "$ac_header_compiler" >&6; }
2497
2498# Is the header present?
2499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2500$as_echo_n "checking $2 presence... " >&6; }
2501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2502/* end confdefs.h.  */
2503#include <$2>
2504_ACEOF
2505if ac_fn_cxx_try_cpp "$LINENO"; then :
2506  ac_header_preproc=yes
2507else
2508  ac_header_preproc=no
2509fi
2510rm -f conftest.err conftest.i conftest.$ac_ext
2511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2512$as_echo "$ac_header_preproc" >&6; }
2513
2514# So?  What about this header?
2515case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2516  yes:no: )
2517    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2518$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2519    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2520$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2521    ;;
2522  no:yes:* )
2523    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2524$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2525    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2526$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2527    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2528$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2529    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2530$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2531    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2532$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2533( $as_echo "## ----------------------------------------- ##
2534## Report this to build-dev@openjdk.java.net ##
2535## ----------------------------------------- ##"
2536     ) | sed "s/^/$as_me: WARNING:     /" >&2
2537    ;;
2538esac
2539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2540$as_echo_n "checking for $2... " >&6; }
2541if eval \${$3+:} false; then :
2542  $as_echo_n "(cached) " >&6
2543else
2544  eval "$3=\$ac_header_compiler"
2545fi
2546eval ac_res=\$$3
2547	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2548$as_echo "$ac_res" >&6; }
2549fi
2550  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2551
2552} # ac_fn_cxx_check_header_mongrel
2553
2554# ac_fn_cxx_try_run LINENO
2555# ------------------------
2556# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2557# that executables *can* be run.
2558ac_fn_cxx_try_run ()
2559{
2560  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561  if { { ac_try="$ac_link"
2562case "(($ac_try" in
2563  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2564  *) ac_try_echo=$ac_try;;
2565esac
2566eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2567$as_echo "$ac_try_echo"; } >&5
2568  (eval "$ac_link") 2>&5
2569  ac_status=$?
2570  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2571  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2572  { { case "(($ac_try" in
2573  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2574  *) ac_try_echo=$ac_try;;
2575esac
2576eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2577$as_echo "$ac_try_echo"; } >&5
2578  (eval "$ac_try") 2>&5
2579  ac_status=$?
2580  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2581  test $ac_status = 0; }; }; then :
2582  ac_retval=0
2583else
2584  $as_echo "$as_me: program exited with status $ac_status" >&5
2585       $as_echo "$as_me: failed program was:" >&5
2586sed 's/^/| /' conftest.$ac_ext >&5
2587
2588       ac_retval=$ac_status
2589fi
2590  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2591  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2592  as_fn_set_status $ac_retval
2593
2594} # ac_fn_cxx_try_run
2595
2596# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2597# ---------------------------------------------------------
2598# Tests whether HEADER exists and can be compiled using the include files in
2599# INCLUDES, setting the cache variable VAR accordingly.
2600ac_fn_cxx_check_header_compile ()
2601{
2602  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2604$as_echo_n "checking for $2... " >&6; }
2605if eval \${$3+:} false; then :
2606  $as_echo_n "(cached) " >&6
2607else
2608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609/* end confdefs.h.  */
2610$4
2611#include <$2>
2612_ACEOF
2613if ac_fn_cxx_try_compile "$LINENO"; then :
2614  eval "$3=yes"
2615else
2616  eval "$3=no"
2617fi
2618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2619fi
2620eval ac_res=\$$3
2621	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2622$as_echo "$ac_res" >&6; }
2623  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2624
2625} # ac_fn_cxx_check_header_compile
2626
2627# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2628# ----------------------------------------------
2629# Tries to find the compile-time value of EXPR in a program that includes
2630# INCLUDES, setting VAR accordingly. Returns whether the value could be
2631# computed
2632ac_fn_cxx_compute_int ()
2633{
2634  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2635  if test "$cross_compiling" = yes; then
2636    # Depending upon the size, compute the lo and hi bounds.
2637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2638/* end confdefs.h.  */
2639$4
2640int
2641main ()
2642{
2643static int test_array [1 - 2 * !(($2) >= 0)];
2644test_array [0] = 0;
2645return test_array [0];
2646
2647  ;
2648  return 0;
2649}
2650_ACEOF
2651if ac_fn_cxx_try_compile "$LINENO"; then :
2652  ac_lo=0 ac_mid=0
2653  while :; do
2654    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2655/* end confdefs.h.  */
2656$4
2657int
2658main ()
2659{
2660static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2661test_array [0] = 0;
2662return test_array [0];
2663
2664  ;
2665  return 0;
2666}
2667_ACEOF
2668if ac_fn_cxx_try_compile "$LINENO"; then :
2669  ac_hi=$ac_mid; break
2670else
2671  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2672			if test $ac_lo -le $ac_mid; then
2673			  ac_lo= ac_hi=
2674			  break
2675			fi
2676			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2677fi
2678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2679  done
2680else
2681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2682/* end confdefs.h.  */
2683$4
2684int
2685main ()
2686{
2687static int test_array [1 - 2 * !(($2) < 0)];
2688test_array [0] = 0;
2689return test_array [0];
2690
2691  ;
2692  return 0;
2693}
2694_ACEOF
2695if ac_fn_cxx_try_compile "$LINENO"; then :
2696  ac_hi=-1 ac_mid=-1
2697  while :; do
2698    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2699/* end confdefs.h.  */
2700$4
2701int
2702main ()
2703{
2704static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2705test_array [0] = 0;
2706return test_array [0];
2707
2708  ;
2709  return 0;
2710}
2711_ACEOF
2712if ac_fn_cxx_try_compile "$LINENO"; then :
2713  ac_lo=$ac_mid; break
2714else
2715  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2716			if test $ac_mid -le $ac_hi; then
2717			  ac_lo= ac_hi=
2718			  break
2719			fi
2720			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2721fi
2722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2723  done
2724else
2725  ac_lo= ac_hi=
2726fi
2727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2728fi
2729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2730# Binary search between lo and hi bounds.
2731while test "x$ac_lo" != "x$ac_hi"; do
2732  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2733  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2734/* end confdefs.h.  */
2735$4
2736int
2737main ()
2738{
2739static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2740test_array [0] = 0;
2741return test_array [0];
2742
2743  ;
2744  return 0;
2745}
2746_ACEOF
2747if ac_fn_cxx_try_compile "$LINENO"; then :
2748  ac_hi=$ac_mid
2749else
2750  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2751fi
2752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2753done
2754case $ac_lo in #((
2755?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2756'') ac_retval=1 ;;
2757esac
2758  else
2759    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2760/* end confdefs.h.  */
2761$4
2762static long int longval () { return $2; }
2763static unsigned long int ulongval () { return $2; }
2764#include <stdio.h>
2765#include <stdlib.h>
2766int
2767main ()
2768{
2769
2770  FILE *f = fopen ("conftest.val", "w");
2771  if (! f)
2772    return 1;
2773  if (($2) < 0)
2774    {
2775      long int i = longval ();
2776      if (i != ($2))
2777	return 1;
2778      fprintf (f, "%ld", i);
2779    }
2780  else
2781    {
2782      unsigned long int i = ulongval ();
2783      if (i != ($2))
2784	return 1;
2785      fprintf (f, "%lu", i);
2786    }
2787  /* Do not output a trailing newline, as this causes \r\n confusion
2788     on some platforms.  */
2789  return ferror (f) || fclose (f) != 0;
2790
2791  ;
2792  return 0;
2793}
2794_ACEOF
2795if ac_fn_cxx_try_run "$LINENO"; then :
2796  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2797else
2798  ac_retval=1
2799fi
2800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2801  conftest.$ac_objext conftest.beam conftest.$ac_ext
2802rm -f conftest.val
2803
2804  fi
2805  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2806  as_fn_set_status $ac_retval
2807
2808} # ac_fn_cxx_compute_int
2809
2810# ac_fn_cxx_try_link LINENO
2811# -------------------------
2812# Try to link conftest.$ac_ext, and return whether this succeeded.
2813ac_fn_cxx_try_link ()
2814{
2815  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2816  rm -f conftest.$ac_objext conftest$ac_exeext
2817  if { { ac_try="$ac_link"
2818case "(($ac_try" in
2819  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2820  *) ac_try_echo=$ac_try;;
2821esac
2822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2823$as_echo "$ac_try_echo"; } >&5
2824  (eval "$ac_link") 2>conftest.err
2825  ac_status=$?
2826  if test -s conftest.err; then
2827    grep -v '^ *+' conftest.err >conftest.er1
2828    cat conftest.er1 >&5
2829    mv -f conftest.er1 conftest.err
2830  fi
2831  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2832  test $ac_status = 0; } && {
2833	 test -z "$ac_cxx_werror_flag" ||
2834	 test ! -s conftest.err
2835       } && test -s conftest$ac_exeext && {
2836	 test "$cross_compiling" = yes ||
2837	 test -x conftest$ac_exeext
2838       }; then :
2839  ac_retval=0
2840else
2841  $as_echo "$as_me: failed program was:" >&5
2842sed 's/^/| /' conftest.$ac_ext >&5
2843
2844	ac_retval=1
2845fi
2846  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2847  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2848  # interfere with the next link command; also delete a directory that is
2849  # left behind by Apple's compiler.  We do this before executing the actions.
2850  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2851  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2852  as_fn_set_status $ac_retval
2853
2854} # ac_fn_cxx_try_link
2855
2856# ac_fn_cxx_check_func LINENO FUNC VAR
2857# ------------------------------------
2858# Tests whether FUNC exists, setting the cache variable VAR accordingly
2859ac_fn_cxx_check_func ()
2860{
2861  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2863$as_echo_n "checking for $2... " >&6; }
2864if eval \${$3+:} false; then :
2865  $as_echo_n "(cached) " >&6
2866else
2867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2868/* end confdefs.h.  */
2869/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2870   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2871#define $2 innocuous_$2
2872
2873/* System header to define __stub macros and hopefully few prototypes,
2874    which can conflict with char $2 (); below.
2875    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2876    <limits.h> exists even on freestanding compilers.  */
2877
2878#ifdef __STDC__
2879# include <limits.h>
2880#else
2881# include <assert.h>
2882#endif
2883
2884#undef $2
2885
2886/* Override any GCC internal prototype to avoid an error.
2887   Use char because int might match the return type of a GCC
2888   builtin and then its argument prototype would still apply.  */
2889#ifdef __cplusplus
2890extern "C"
2891#endif
2892char $2 ();
2893/* The GNU C library defines this for functions which it implements
2894    to always fail with ENOSYS.  Some functions are actually named
2895    something starting with __ and the normal name is an alias.  */
2896#if defined __stub_$2 || defined __stub___$2
2897choke me
2898#endif
2899
2900int
2901main ()
2902{
2903return $2 ();
2904  ;
2905  return 0;
2906}
2907_ACEOF
2908if ac_fn_cxx_try_link "$LINENO"; then :
2909  eval "$3=yes"
2910else
2911  eval "$3=no"
2912fi
2913rm -f core conftest.err conftest.$ac_objext \
2914    conftest$ac_exeext conftest.$ac_ext
2915fi
2916eval ac_res=\$$3
2917	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2918$as_echo "$ac_res" >&6; }
2919  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2920
2921} # ac_fn_cxx_check_func
2922
2923# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2924# -------------------------------------------------------
2925# Tests whether HEADER exists and can be compiled using the include files in
2926# INCLUDES, setting the cache variable VAR accordingly.
2927ac_fn_c_check_header_compile ()
2928{
2929  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2931$as_echo_n "checking for $2... " >&6; }
2932if eval \${$3+:} false; then :
2933  $as_echo_n "(cached) " >&6
2934else
2935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2936/* end confdefs.h.  */
2937$4
2938#include <$2>
2939_ACEOF
2940if ac_fn_c_try_compile "$LINENO"; then :
2941  eval "$3=yes"
2942else
2943  eval "$3=no"
2944fi
2945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2946fi
2947eval ac_res=\$$3
2948	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2949$as_echo "$ac_res" >&6; }
2950  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2951
2952} # ac_fn_c_check_header_compile
2953cat >config.log <<_ACEOF
2954This file contains any messages produced by compilers while
2955running configure, to aid debugging if configure makes a mistake.
2956
2957It was created by OpenJDK $as_me jdk9, which was
2958generated by GNU Autoconf 2.69.  Invocation command line was
2959
2960  $ $0 $@
2961
2962_ACEOF
2963exec 5>>config.log
2964{
2965cat <<_ASUNAME
2966## --------- ##
2967## Platform. ##
2968## --------- ##
2969
2970hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2971uname -m = `(uname -m) 2>/dev/null || echo unknown`
2972uname -r = `(uname -r) 2>/dev/null || echo unknown`
2973uname -s = `(uname -s) 2>/dev/null || echo unknown`
2974uname -v = `(uname -v) 2>/dev/null || echo unknown`
2975
2976/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2977/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2978
2979/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2980/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2981/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2982/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2983/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2984/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2985/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2986
2987_ASUNAME
2988
2989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2990for as_dir in $PATH
2991do
2992  IFS=$as_save_IFS
2993  test -z "$as_dir" && as_dir=.
2994    $as_echo "PATH: $as_dir"
2995  done
2996IFS=$as_save_IFS
2997
2998} >&5
2999
3000cat >&5 <<_ACEOF
3001
3002
3003## ----------- ##
3004## Core tests. ##
3005## ----------- ##
3006
3007_ACEOF
3008
3009
3010# Keep a trace of the command line.
3011# Strip out --no-create and --no-recursion so they do not pile up.
3012# Strip out --silent because we don't want to record it for future runs.
3013# Also quote any args containing shell meta-characters.
3014# Make two passes to allow for proper duplicate-argument suppression.
3015ac_configure_args=
3016ac_configure_args0=
3017ac_configure_args1=
3018ac_must_keep_next=false
3019for ac_pass in 1 2
3020do
3021  for ac_arg
3022  do
3023    case $ac_arg in
3024    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3025    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3026    | -silent | --silent | --silen | --sile | --sil)
3027      continue ;;
3028    *\'*)
3029      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3030    esac
3031    case $ac_pass in
3032    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3033    2)
3034      as_fn_append ac_configure_args1 " '$ac_arg'"
3035      if test $ac_must_keep_next = true; then
3036	ac_must_keep_next=false # Got value, back to normal.
3037      else
3038	case $ac_arg in
3039	  *=* | --config-cache | -C | -disable-* | --disable-* \
3040	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3041	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3042	  | -with-* | --with-* | -without-* | --without-* | --x)
3043	    case "$ac_configure_args0 " in
3044	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3045	    esac
3046	    ;;
3047	  -* ) ac_must_keep_next=true ;;
3048	esac
3049      fi
3050      as_fn_append ac_configure_args " '$ac_arg'"
3051      ;;
3052    esac
3053  done
3054done
3055{ ac_configure_args0=; unset ac_configure_args0;}
3056{ ac_configure_args1=; unset ac_configure_args1;}
3057
3058# When interrupted or exit'd, cleanup temporary files, and complete
3059# config.log.  We remove comments because anyway the quotes in there
3060# would cause problems or look ugly.
3061# WARNING: Use '\'' to represent an apostrophe within the trap.
3062# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3063trap 'exit_status=$?
3064  # Save into config.log some information that might help in debugging.
3065  {
3066    echo
3067
3068    $as_echo "## ---------------- ##
3069## Cache variables. ##
3070## ---------------- ##"
3071    echo
3072    # The following way of writing the cache mishandles newlines in values,
3073(
3074  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3075    eval ac_val=\$$ac_var
3076    case $ac_val in #(
3077    *${as_nl}*)
3078      case $ac_var in #(
3079      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3080$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3081      esac
3082      case $ac_var in #(
3083      _ | IFS | as_nl) ;; #(
3084      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3085      *) { eval $ac_var=; unset $ac_var;} ;;
3086      esac ;;
3087    esac
3088  done
3089  (set) 2>&1 |
3090    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3091    *${as_nl}ac_space=\ *)
3092      sed -n \
3093	"s/'\''/'\''\\\\'\'''\''/g;
3094	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3095      ;; #(
3096    *)
3097      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3098      ;;
3099    esac |
3100    sort
3101)
3102    echo
3103
3104    $as_echo "## ----------------- ##
3105## Output variables. ##
3106## ----------------- ##"
3107    echo
3108    for ac_var in $ac_subst_vars
3109    do
3110      eval ac_val=\$$ac_var
3111      case $ac_val in
3112      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3113      esac
3114      $as_echo "$ac_var='\''$ac_val'\''"
3115    done | sort
3116    echo
3117
3118    if test -n "$ac_subst_files"; then
3119      $as_echo "## ------------------- ##
3120## File substitutions. ##
3121## ------------------- ##"
3122      echo
3123      for ac_var in $ac_subst_files
3124      do
3125	eval ac_val=\$$ac_var
3126	case $ac_val in
3127	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3128	esac
3129	$as_echo "$ac_var='\''$ac_val'\''"
3130      done | sort
3131      echo
3132    fi
3133
3134    if test -s confdefs.h; then
3135      $as_echo "## ----------- ##
3136## confdefs.h. ##
3137## ----------- ##"
3138      echo
3139      cat confdefs.h
3140      echo
3141    fi
3142    test "$ac_signal" != 0 &&
3143      $as_echo "$as_me: caught signal $ac_signal"
3144    $as_echo "$as_me: exit $exit_status"
3145  } >&5
3146  rm -f core *.core core.conftest.* &&
3147    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3148    exit $exit_status
3149' 0
3150for ac_signal in 1 2 13 15; do
3151  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3152done
3153ac_signal=0
3154
3155# confdefs.h avoids OS command line length limits that DEFS can exceed.
3156rm -f -r conftest* confdefs.h
3157
3158$as_echo "/* confdefs.h */" > confdefs.h
3159
3160# Predefined preprocessor variables.
3161
3162cat >>confdefs.h <<_ACEOF
3163#define PACKAGE_NAME "$PACKAGE_NAME"
3164_ACEOF
3165
3166cat >>confdefs.h <<_ACEOF
3167#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3168_ACEOF
3169
3170cat >>confdefs.h <<_ACEOF
3171#define PACKAGE_VERSION "$PACKAGE_VERSION"
3172_ACEOF
3173
3174cat >>confdefs.h <<_ACEOF
3175#define PACKAGE_STRING "$PACKAGE_STRING"
3176_ACEOF
3177
3178cat >>confdefs.h <<_ACEOF
3179#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3180_ACEOF
3181
3182cat >>confdefs.h <<_ACEOF
3183#define PACKAGE_URL "$PACKAGE_URL"
3184_ACEOF
3185
3186
3187# Let the site file select an alternate cache file if it wants to.
3188# Prefer an explicitly selected file to automatically selected ones.
3189ac_site_file1=NONE
3190ac_site_file2=NONE
3191if test -n "$CONFIG_SITE"; then
3192  # We do not want a PATH search for config.site.
3193  case $CONFIG_SITE in #((
3194    -*)  ac_site_file1=./$CONFIG_SITE;;
3195    */*) ac_site_file1=$CONFIG_SITE;;
3196    *)   ac_site_file1=./$CONFIG_SITE;;
3197  esac
3198elif test "x$prefix" != xNONE; then
3199  ac_site_file1=$prefix/share/config.site
3200  ac_site_file2=$prefix/etc/config.site
3201else
3202  ac_site_file1=$ac_default_prefix/share/config.site
3203  ac_site_file2=$ac_default_prefix/etc/config.site
3204fi
3205for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3206do
3207  test "x$ac_site_file" = xNONE && continue
3208  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3209    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3210$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3211    sed 's/^/| /' "$ac_site_file" >&5
3212    . "$ac_site_file" \
3213      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3214$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3215as_fn_error $? "failed to load site script $ac_site_file
3216See \`config.log' for more details" "$LINENO" 5; }
3217  fi
3218done
3219
3220if test -r "$cache_file"; then
3221  # Some versions of bash will fail to source /dev/null (special files
3222  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3223  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3224    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3225$as_echo "$as_me: loading cache $cache_file" >&6;}
3226    case $cache_file in
3227      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3228      *)                      . "./$cache_file";;
3229    esac
3230  fi
3231else
3232  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3233$as_echo "$as_me: creating cache $cache_file" >&6;}
3234  >$cache_file
3235fi
3236
3237# Check that the precious variables saved in the cache have kept the same
3238# value.
3239ac_cache_corrupted=false
3240for ac_var in $ac_precious_vars; do
3241  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3242  eval ac_new_set=\$ac_env_${ac_var}_set
3243  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3244  eval ac_new_val=\$ac_env_${ac_var}_value
3245  case $ac_old_set,$ac_new_set in
3246    set,)
3247      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3248$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3249      ac_cache_corrupted=: ;;
3250    ,set)
3251      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3252$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3253      ac_cache_corrupted=: ;;
3254    ,);;
3255    *)
3256      if test "x$ac_old_val" != "x$ac_new_val"; then
3257	# differences in whitespace do not lead to failure.
3258	ac_old_val_w=`echo x $ac_old_val`
3259	ac_new_val_w=`echo x $ac_new_val`
3260	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3261	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3262$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3263	  ac_cache_corrupted=:
3264	else
3265	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3266$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3267	  eval $ac_var=\$ac_old_val
3268	fi
3269	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3270$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3271	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3272$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3273      fi;;
3274  esac
3275  # Pass precious variables to config.status.
3276  if test "$ac_new_set" = set; then
3277    case $ac_new_val in
3278    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3279    *) ac_arg=$ac_var=$ac_new_val ;;
3280    esac
3281    case " $ac_configure_args " in
3282      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3283      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3284    esac
3285  fi
3286done
3287if $ac_cache_corrupted; then
3288  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3289$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3290  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3291$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3292  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3293fi
3294## -------------------- ##
3295## Main body of script. ##
3296## -------------------- ##
3297
3298ac_ext=c
3299ac_cpp='$CPP $CPPFLAGS'
3300ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3301ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3302ac_compiler_gnu=$ac_cv_c_compiler_gnu
3303
3304
3305
3306ac_aux_dir=
3307for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3308  if test -f "$ac_dir/install-sh"; then
3309    ac_aux_dir=$ac_dir
3310    ac_install_sh="$ac_aux_dir/install-sh -c"
3311    break
3312  elif test -f "$ac_dir/install.sh"; then
3313    ac_aux_dir=$ac_dir
3314    ac_install_sh="$ac_aux_dir/install.sh -c"
3315    break
3316  elif test -f "$ac_dir/shtool"; then
3317    ac_aux_dir=$ac_dir
3318    ac_install_sh="$ac_aux_dir/shtool install -c"
3319    break
3320  fi
3321done
3322if test -z "$ac_aux_dir"; then
3323  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
3324fi
3325
3326# These three variables are undocumented and unsupported,
3327# and are intended to be withdrawn in a future Autoconf release.
3328# They can cause serious problems if a builder's source tree is in a directory
3329# whose full name contains unusual characters.
3330ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3331ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3332ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3333
3334
3335# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3336
3337#
3338# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3339# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3340#
3341# This code is free software; you can redistribute it and/or modify it
3342# under the terms of the GNU General Public License version 2 only, as
3343# published by the Free Software Foundation.  Oracle designates this
3344# particular file as subject to the "Classpath" exception as provided
3345# by Oracle in the LICENSE file that accompanied this code.
3346#
3347# This code is distributed in the hope that it will be useful, but WITHOUT
3348# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3349# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3350# version 2 for more details (a copy is included in the LICENSE file that
3351# accompanied this code).
3352#
3353# You should have received a copy of the GNU General Public License version
3354# 2 along with this work; if not, write to the Free Software Foundation,
3355# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3356#
3357# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3358# or visit www.oracle.com if you need additional information or have any
3359# questions.
3360#
3361
3362#
3363# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3364#
3365# This program is free software; you can redistribute it and/or modify
3366# it under the terms of the GNU General Public License as published by
3367# the Free Software Foundation; either version 2 of the License, or
3368# (at your option) any later version.
3369#
3370# This program is distributed in the hope that it will be useful, but
3371# WITHOUT ANY WARRANTY; without even the implied warranty of
3372# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3373# General Public License for more details.
3374#
3375# You should have received a copy of the GNU General Public License
3376# along with this program; if not, write to the Free Software
3377# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3378#
3379# As a special exception to the GNU General Public License, if you
3380# distribute this file as part of a program that contains a
3381# configuration script generated by Autoconf, you may include it under
3382# the same distribution terms that you use for the rest of that program.
3383
3384# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3385# ----------------------------------
3386# PKG_PROG_PKG_CONFIG
3387
3388# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3389#
3390# Check to see whether a particular set of modules exists.  Similar
3391# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3392#
3393#
3394# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3395# this or PKG_CHECK_MODULES is called, or make sure to call
3396# PKG_CHECK_EXISTS manually
3397# --------------------------------------------------------------
3398
3399
3400
3401# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3402# ---------------------------------------------
3403# _PKG_CONFIG
3404
3405# _PKG_SHORT_ERRORS_SUPPORTED
3406# -----------------------------
3407# _PKG_SHORT_ERRORS_SUPPORTED
3408
3409
3410# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3411# [ACTION-IF-NOT-FOUND])
3412#
3413#
3414# Note that if there is a possibility the first call to
3415# PKG_CHECK_MODULES might not happen, you should be sure to include an
3416# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3417#
3418#
3419# --------------------------------------------------------------
3420# PKG_CHECK_MODULES
3421
3422
3423# Include these first...
3424#
3425# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3426# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3427#
3428# This code is free software; you can redistribute it and/or modify it
3429# under the terms of the GNU General Public License version 2 only, as
3430# published by the Free Software Foundation.  Oracle designates this
3431# particular file as subject to the "Classpath" exception as provided
3432# by Oracle in the LICENSE file that accompanied this code.
3433#
3434# This code is distributed in the hope that it will be useful, but WITHOUT
3435# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3436# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3437# version 2 for more details (a copy is included in the LICENSE file that
3438# accompanied this code).
3439#
3440# You should have received a copy of the GNU General Public License version
3441# 2 along with this work; if not, write to the Free Software Foundation,
3442# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3443#
3444# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3445# or visit www.oracle.com if you need additional information or have any
3446# questions.
3447#
3448
3449# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3450# If so, then append $1 to $2 \
3451# Also set JVM_ARG_OK to true/false depending on outcome.
3452
3453
3454# Appends a string to a path variable, only adding the : when needed.
3455
3456
3457# Prepends a string to a path variable, only adding the : when needed.
3458
3459
3460# This will make sure the given variable points to a full and proper
3461# path. This means:
3462# 1) There will be no spaces in the path. On unix platforms,
3463#    spaces in the path will result in an error. On Windows,
3464#    the path will be rewritten using short-style to be space-free.
3465# 2) The path will be absolute, and it will be in unix-style (on
3466#     cygwin).
3467# $1: The name of the variable to fix
3468
3469
3470# This will make sure the given variable points to a executable
3471# with a full and proper path. This means:
3472# 1) There will be no spaces in the path. On unix platforms,
3473#    spaces in the path will result in an error. On Windows,
3474#    the path will be rewritten using short-style to be space-free.
3475# 2) The path will be absolute, and it will be in unix-style (on
3476#     cygwin).
3477# Any arguments given to the executable is preserved.
3478# If the input variable does not have a directory specification, then
3479# it need to be in the PATH.
3480# $1: The name of the variable to fix
3481
3482
3483
3484
3485# Register a --with argument but mark it as deprecated
3486# $1: The name of the with argument to deprecate, not including --with-
3487
3488
3489# Register a --enable argument but mark it as deprecated
3490# $1: The name of the with argument to deprecate, not including --enable-
3491# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3492# $3: Messages to user.
3493
3494
3495
3496
3497# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3498# $1: variable to check
3499
3500
3501# Check that there are no unprocessed overridden variables left.
3502# If so, they are an incorrect argument and we will exit with an error.
3503
3504
3505# Setup a tool for the given variable. If correctly specified by the user,
3506# use that value, otherwise search for the tool using the supplied code snippet.
3507# $1: variable to set
3508# $2: code snippet to call to look for the tool
3509# $3: code snippet to call if variable was used to find tool
3510
3511
3512# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3513# $1: variable to set
3514# $2: executable name (or list of names) to look for
3515
3516
3517# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3518# $1: variable to set
3519# $2: executable name (or list of names) to look for
3520
3521
3522# Like BASIC_PATH_PROGS but fails if no tool was found.
3523# $1: variable to set
3524# $2: executable name (or list of names) to look for
3525
3526
3527# Like BASIC_SETUP_TOOL but fails if no tool was found.
3528# $1: variable to set
3529# $2: autoconf macro to call to look for the special tool
3530
3531
3532# Setup the most fundamental tools that relies on not much else to set up,
3533# but is used by much of the early bootstrap code.
3534
3535
3536# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3537
3538
3539# Evaluates platform specific overrides for devkit variables.
3540# $1: Name of variable
3541
3542
3543
3544
3545
3546
3547#%%% Simple tools %%%
3548
3549# Check if we have found a usable version of make
3550# $1: the path to a potential make binary (or empty)
3551# $2: the description on how we found this
3552
3553
3554
3555
3556# Goes looking for a usable version of GNU make.
3557
3558
3559
3560
3561
3562
3563# Check if build directory is on local disk. If not possible to determine,
3564# we prefer to claim it's local.
3565# Argument 1: directory to test
3566# Argument 2: what to do if it is on local disk
3567# Argument 3: what to do otherwise (remote disk or failure)
3568
3569
3570# Check that source files have basic read permissions set. This might
3571# not be the case in cygwin in certain conditions.
3572
3573
3574
3575
3576# Check for support for specific options in bash
3577
3578
3579################################################################################
3580#
3581# Default make target
3582#
3583
3584
3585# Code to run after AC_OUTPUT
3586
3587
3588#
3589# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3590# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3591#
3592# This code is free software; you can redistribute it and/or modify it
3593# under the terms of the GNU General Public License version 2 only, as
3594# published by the Free Software Foundation.  Oracle designates this
3595# particular file as subject to the "Classpath" exception as provided
3596# by Oracle in the LICENSE file that accompanied this code.
3597#
3598# This code is distributed in the hope that it will be useful, but WITHOUT
3599# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3600# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3601# version 2 for more details (a copy is included in the LICENSE file that
3602# accompanied this code).
3603#
3604# You should have received a copy of the GNU General Public License version
3605# 2 along with this work; if not, write to the Free Software Foundation,
3606# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3607#
3608# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3609# or visit www.oracle.com if you need additional information or have any
3610# questions.
3611#
3612
3613
3614
3615
3616
3617# Helper function which possibly converts a path using DOS-style short mode.
3618# If so, the updated path is stored in $new_path.
3619# $1: The path to check
3620
3621
3622# Helper function which possibly converts a path using DOS-style short mode.
3623# If so, the updated path is stored in $new_path.
3624# $1: The path to check
3625
3626
3627# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3628# and could probably be heavily simplified. However, all changes in this
3629# area tend to need lot of testing in different scenarios, and in lack of
3630# proper unit testing, cleaning this up has not been deemed worth the effort
3631# at the moment.
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3642
3643
3644
3645
3646# ... then the rest
3647#
3648# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3649# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3650#
3651# This code is free software; you can redistribute it and/or modify it
3652# under the terms of the GNU General Public License version 2 only, as
3653# published by the Free Software Foundation.  Oracle designates this
3654# particular file as subject to the "Classpath" exception as provided
3655# by Oracle in the LICENSE file that accompanied this code.
3656#
3657# This code is distributed in the hope that it will be useful, but WITHOUT
3658# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3659# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3660# version 2 for more details (a copy is included in the LICENSE file that
3661# accompanied this code).
3662#
3663# You should have received a copy of the GNU General Public License version
3664# 2 along with this work; if not, write to the Free Software Foundation,
3665# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3666#
3667# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3668# or visit www.oracle.com if you need additional information or have any
3669# questions.
3670#
3671
3672########################################################################
3673# This file handles detection of the Boot JDK. The Boot JDK detection
3674# process has been developed as a response to solve a complex real-world
3675# problem. Initially, it was simple, but it has grown as platform after
3676# platform, idiosyncracy after idiosyncracy has been supported.
3677#
3678# The basic idea is this:
3679# 1) You need an acceptable *) JDK to use as a Boot JDK
3680# 2) There are several ways to locate a JDK, that are mostly platform
3681#    dependent **)
3682# 3) You can have multiple JDKs installed
3683# 4) If possible, configure should try to dig out an acceptable JDK
3684#    automatically, without having to resort to command-line options
3685#
3686# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3687#     javac) and not a JRE, etc.
3688#
3689# **) On Windows we typically use a well-known path.
3690#     On MacOSX we typically use the tool java_home.
3691#     On Linux we typically find javac in the $PATH, and then follow a
3692#     chain of symlinks that often ends up in a real JDK.
3693#
3694# This leads to the code where we check in different ways to locate a
3695# JDK, and if one is found, check if it is acceptable. If not, we print
3696# our reasons for rejecting it (useful when debugging non-working
3697# configure situations) and continue checking the next one.
3698########################################################################
3699
3700# Execute the check given as argument, and verify the result
3701# If the Boot JDK was previously found, do nothing
3702# $1 A command line (typically autoconf macro) to execute
3703
3704
3705# Test: Is bootjdk explicitely set by command line arguments?
3706
3707
3708# Test: Is $JAVA_HOME set?
3709
3710
3711# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3712
3713
3714# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3715# $1: Argument to the java_home binary (optional)
3716
3717
3718# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3719
3720
3721# Look for a jdk in the given path. If there are multiple, try to select the newest.
3722# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3723# $1 = Path to directory containing jdk installations.
3724# $2 = String to append to the found JDK directory to get the proper JDK home
3725
3726
3727# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3728# environmental variable as base for where to look.
3729# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3730
3731
3732# Test: Is there a JDK installed in default, well-known locations?
3733
3734
3735# Check that a command-line tool in the Boot JDK is correct
3736# $1 = name of variable to assign
3737# $2 = name of binary
3738
3739
3740###############################################################################
3741#
3742# We need a Boot JDK to bootstrap the build.
3743#
3744
3745
3746
3747
3748
3749#
3750# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3751# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3752#
3753# This code is free software; you can redistribute it and/or modify it
3754# under the terms of the GNU General Public License version 2 only, as
3755# published by the Free Software Foundation.  Oracle designates this
3756# particular file as subject to the "Classpath" exception as provided
3757# by Oracle in the LICENSE file that accompanied this code.
3758#
3759# This code is distributed in the hope that it will be useful, but WITHOUT
3760# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3761# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3762# version 2 for more details (a copy is included in the LICENSE file that
3763# accompanied this code).
3764#
3765# You should have received a copy of the GNU General Public License version
3766# 2 along with this work; if not, write to the Free Software Foundation,
3767# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3768#
3769# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3770# or visit www.oracle.com if you need additional information or have any
3771# questions.
3772#
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788################################################################################
3789#
3790# Optionally enable distributed compilation of native code using icecc/icecream
3791#
3792
3793
3794
3795
3796
3797
3798
3799#
3800# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3801# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3802#
3803# This code is free software; you can redistribute it and/or modify it
3804# under the terms of the GNU General Public License version 2 only, as
3805# published by the Free Software Foundation.  Oracle designates this
3806# particular file as subject to the "Classpath" exception as provided
3807# by Oracle in the LICENSE file that accompanied this code.
3808#
3809# This code is distributed in the hope that it will be useful, but WITHOUT
3810# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3811# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3812# version 2 for more details (a copy is included in the LICENSE file that
3813# accompanied this code).
3814#
3815# You should have received a copy of the GNU General Public License version
3816# 2 along with this work; if not, write to the Free Software Foundation,
3817# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3818#
3819# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3820# or visit www.oracle.com if you need additional information or have any
3821# questions.
3822#
3823
3824# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3825# corresponding configure arguments instead
3826
3827
3828# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3829# that configure can use them while detecting compilers.
3830# TOOLCHAIN_TYPE is available here.
3831# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3832
3833
3834
3835
3836
3837
3838# Documentation on common flags used for solstudio in HIGHEST.
3839#
3840# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3841#          done with care, there are some assumptions below that need to
3842#          be understood about the use of pointers, and IEEE behavior.
3843#
3844# -fns: Use non-standard floating point mode (not IEEE 754)
3845# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3846# -fsingle: Use single precision floating point with 'float'
3847# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3848#   (Source with excessing pointer casting and data access with mixed
3849#    pointer types are not recommended)
3850# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3851#   (If you expect perfect errno behavior, do not use this)
3852# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3853# -xrestrict: Pointer parameters to functions do not overlap
3854#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3855#    If you pass in multiple pointers to the same data, do not use this)
3856# -xlibmil: Inline some library routines
3857#   (If you expect perfect errno behavior, do not use this)
3858# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3859#   (If you expect perfect errno behavior, do not use this)
3860#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3861
3862    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3863    # Bug?
3864    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3865    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3866    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3867    #fi
3868
3869
3870
3871
3872
3873# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3874#                                   [RUN-IF-FALSE])
3875# ------------------------------------------------------------
3876# Check that the c and c++ compilers support an argument
3877
3878
3879# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3880#                                    [RUN-IF-FALSE])
3881# ------------------------------------------------------------
3882# Check that the linker support an argument
3883
3884
3885
3886
3887#
3888# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3889# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3890#
3891# This code is free software; you can redistribute it and/or modify it
3892# under the terms of the GNU General Public License version 2 only, as
3893# published by the Free Software Foundation.  Oracle designates this
3894# particular file as subject to the "Classpath" exception as provided
3895# by Oracle in the LICENSE file that accompanied this code.
3896#
3897# This code is distributed in the hope that it will be useful, but WITHOUT
3898# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3899# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3900# version 2 for more details (a copy is included in the LICENSE file that
3901# accompanied this code).
3902#
3903# You should have received a copy of the GNU General Public License version
3904# 2 along with this work; if not, write to the Free Software Foundation,
3905# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3906#
3907# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3908# or visit www.oracle.com if you need additional information or have any
3909# questions.
3910#
3911
3912
3913
3914
3915
3916cygwin_help() {
3917  case $1 in
3918    unzip)
3919      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3920      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3921      ;;
3922    zip)
3923      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3924      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3925      ;;
3926    make)
3927      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3928      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3929      ;;
3930    freetype)
3931      HELP_MSG="
3932The freetype library can now be build during the configure process.
3933Download the freetype sources and unpack them into an arbitrary directory:
3934
3935wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3936tar -xzf freetype-2.5.3.tar.gz
3937
3938Then run configure with '--with-freetype-src=<freetype_src>'. This will
3939automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3940builds or into '<freetype_src>/lib32' for 32-bit builds.
3941Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3942and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3943      ;;
3944  esac
3945}
3946
3947msys_help() {
3948  PKGHANDLER_COMMAND=""
3949}
3950
3951apt_help() {
3952  case $1 in
3953    reduced)
3954      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3955    devkit)
3956      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3957    openjdk)
3958      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3959    alsa)
3960      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3961    cups)
3962      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3963    freetype)
3964      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3965    ffi)
3966      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3967    x11)
3968      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3969    ccache)
3970      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3971  esac
3972}
3973
3974yum_help() {
3975  case $1 in
3976    devkit)
3977      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3978    openjdk)
3979      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3980    alsa)
3981      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3982    cups)
3983      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3984    freetype)
3985      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3986    x11)
3987      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3988    ccache)
3989      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3990  esac
3991}
3992
3993port_help() {
3994  PKGHANDLER_COMMAND=""
3995}
3996
3997pkgutil_help() {
3998  PKGHANDLER_COMMAND=""
3999}
4000
4001pkgadd_help() {
4002  PKGHANDLER_COMMAND=""
4003}
4004
4005# This function will check if we're called from the "configure" wrapper while
4006# printing --help. If so, we will print out additional information that can
4007# only be extracted within the autoconf script, and then exit. This must be
4008# called at the very beginning in configure.ac.
4009
4010
4011
4012
4013
4014
4015#
4016# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4017# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4018#
4019# This code is free software; you can redistribute it and/or modify it
4020# under the terms of the GNU General Public License version 2 only, as
4021# published by the Free Software Foundation.  Oracle designates this
4022# particular file as subject to the "Classpath" exception as provided
4023# by Oracle in the LICENSE file that accompanied this code.
4024#
4025# This code is distributed in the hope that it will be useful, but WITHOUT
4026# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4027# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4028# version 2 for more details (a copy is included in the LICENSE file that
4029# accompanied this code).
4030#
4031# You should have received a copy of the GNU General Public License version
4032# 2 along with this work; if not, write to the Free Software Foundation,
4033# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4034#
4035# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4036# or visit www.oracle.com if you need additional information or have any
4037# questions.
4038#
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049###############################################################################
4050#
4051# Should we build only OpenJDK even if closed sources are present?
4052#
4053
4054
4055
4056
4057
4058
4059###############################################################################
4060#
4061# Enable or disable the elliptic curve crypto implementation
4062#
4063
4064
4065
4066
4067
4068################################################################################
4069#
4070# Gcov coverage data for hotspot
4071#
4072
4073
4074################################################################################
4075#
4076# Static build support.  When enabled will generate static
4077# libraries instead of shared libraries for all JDK libs.
4078#
4079
4080
4081
4082
4083#
4084# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4085# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4086#
4087# This code is free software; you can redistribute it and/or modify it
4088# under the terms of the GNU General Public License version 2 only, as
4089# published by the Free Software Foundation.  Oracle designates this
4090# particular file as subject to the "Classpath" exception as provided
4091# by Oracle in the LICENSE file that accompanied this code.
4092#
4093# This code is distributed in the hope that it will be useful, but WITHOUT
4094# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4095# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4096# version 2 for more details (a copy is included in the LICENSE file that
4097# accompanied this code).
4098#
4099# You should have received a copy of the GNU General Public License version
4100# 2 along with this work; if not, write to the Free Software Foundation,
4101# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4102#
4103# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4104# or visit www.oracle.com if you need additional information or have any
4105# questions.
4106#
4107
4108###############################################################################
4109#
4110# Setup version numbers
4111#
4112
4113# Verify that a given string represents a valid version number, and assign it
4114# to a variable.
4115
4116# Argument 1: the variable to assign to
4117# Argument 2: the value given by the user
4118
4119
4120
4121
4122#
4123# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4124# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4125#
4126# This code is free software; you can redistribute it and/or modify it
4127# under the terms of the GNU General Public License version 2 only, as
4128# published by the Free Software Foundation.  Oracle designates this
4129# particular file as subject to the "Classpath" exception as provided
4130# by Oracle in the LICENSE file that accompanied this code.
4131#
4132# This code is distributed in the hope that it will be useful, but WITHOUT
4133# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4134# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4135# version 2 for more details (a copy is included in the LICENSE file that
4136# accompanied this code).
4137#
4138# You should have received a copy of the GNU General Public License version
4139# 2 along with this work; if not, write to the Free Software Foundation,
4140# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4141#
4142# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4143# or visit www.oracle.com if you need additional information or have any
4144# questions.
4145#
4146
4147# Major library component reside in separate files.
4148#
4149# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4150# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4151#
4152# This code is free software; you can redistribute it and/or modify it
4153# under the terms of the GNU General Public License version 2 only, as
4154# published by the Free Software Foundation.  Oracle designates this
4155# particular file as subject to the "Classpath" exception as provided
4156# by Oracle in the LICENSE file that accompanied this code.
4157#
4158# This code is distributed in the hope that it will be useful, but WITHOUT
4159# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4160# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4161# version 2 for more details (a copy is included in the LICENSE file that
4162# accompanied this code).
4163#
4164# You should have received a copy of the GNU General Public License version
4165# 2 along with this work; if not, write to the Free Software Foundation,
4166# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4167#
4168# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4169# or visit www.oracle.com if you need additional information or have any
4170# questions.
4171#
4172
4173################################################################################
4174# Setup alsa (Advanced Linux Sound Architecture)
4175################################################################################
4176
4177
4178#
4179# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4180# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4181#
4182# This code is free software; you can redistribute it and/or modify it
4183# under the terms of the GNU General Public License version 2 only, as
4184# published by the Free Software Foundation.  Oracle designates this
4185# particular file as subject to the "Classpath" exception as provided
4186# by Oracle in the LICENSE file that accompanied this code.
4187#
4188# This code is distributed in the hope that it will be useful, but WITHOUT
4189# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4190# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4191# version 2 for more details (a copy is included in the LICENSE file that
4192# accompanied this code).
4193#
4194# You should have received a copy of the GNU General Public License version
4195# 2 along with this work; if not, write to the Free Software Foundation,
4196# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4197#
4198# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4199# or visit www.oracle.com if you need additional information or have any
4200# questions.
4201#
4202
4203################################################################################
4204# Setup bundled libraries.
4205#
4206# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4207# OpenJDK repository. Default is to use these libraries as bundled, but they
4208# might be replaced by en external version by the user.
4209################################################################################
4210
4211
4212################################################################################
4213# Setup libjpeg
4214################################################################################
4215
4216
4217################################################################################
4218# Setup giflib
4219################################################################################
4220
4221
4222################################################################################
4223# Setup libpng
4224################################################################################
4225
4226
4227################################################################################
4228# Setup zlib
4229################################################################################
4230
4231
4232################################################################################
4233# Setup lcms (Little CMS)
4234################################################################################
4235
4236
4237#
4238# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4239# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4240#
4241# This code is free software; you can redistribute it and/or modify it
4242# under the terms of the GNU General Public License version 2 only, as
4243# published by the Free Software Foundation.  Oracle designates this
4244# particular file as subject to the "Classpath" exception as provided
4245# by Oracle in the LICENSE file that accompanied this code.
4246#
4247# This code is distributed in the hope that it will be useful, but WITHOUT
4248# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4249# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4250# version 2 for more details (a copy is included in the LICENSE file that
4251# accompanied this code).
4252#
4253# You should have received a copy of the GNU General Public License version
4254# 2 along with this work; if not, write to the Free Software Foundation,
4255# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4256#
4257# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4258# or visit www.oracle.com if you need additional information or have any
4259# questions.
4260#
4261
4262################################################################################
4263# Setup cups (Common Unix Printing System)
4264################################################################################
4265
4266
4267#
4268# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4269# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4270#
4271# This code is free software; you can redistribute it and/or modify it
4272# under the terms of the GNU General Public License version 2 only, as
4273# published by the Free Software Foundation.  Oracle designates this
4274# particular file as subject to the "Classpath" exception as provided
4275# by Oracle in the LICENSE file that accompanied this code.
4276#
4277# This code is distributed in the hope that it will be useful, but WITHOUT
4278# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4279# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4280# version 2 for more details (a copy is included in the LICENSE file that
4281# accompanied this code).
4282#
4283# You should have received a copy of the GNU General Public License version
4284# 2 along with this work; if not, write to the Free Software Foundation,
4285# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4286#
4287# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4288# or visit www.oracle.com if you need additional information or have any
4289# questions.
4290#
4291
4292################################################################################
4293# Setup libffi (Foreign Function Interface)
4294################################################################################
4295
4296
4297#
4298# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4299# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4300#
4301# This code is free software; you can redistribute it and/or modify it
4302# under the terms of the GNU General Public License version 2 only, as
4303# published by the Free Software Foundation.  Oracle designates this
4304# particular file as subject to the "Classpath" exception as provided
4305# by Oracle in the LICENSE file that accompanied this code.
4306#
4307# This code is distributed in the hope that it will be useful, but WITHOUT
4308# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4309# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4310# version 2 for more details (a copy is included in the LICENSE file that
4311# accompanied this code).
4312#
4313# You should have received a copy of the GNU General Public License version
4314# 2 along with this work; if not, write to the Free Software Foundation,
4315# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4316#
4317# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4318# or visit www.oracle.com if you need additional information or have any
4319# questions.
4320#
4321
4322################################################################################
4323# Build the freetype lib from source
4324################################################################################
4325
4326
4327################################################################################
4328# Check if a potential freeype library match is correct and usable
4329################################################################################
4330
4331
4332################################################################################
4333# Setup freetype (The FreeType2 font rendering library)
4334################################################################################
4335
4336
4337#
4338# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4339# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4340#
4341# This code is free software; you can redistribute it and/or modify it
4342# under the terms of the GNU General Public License version 2 only, as
4343# published by the Free Software Foundation.  Oracle designates this
4344# particular file as subject to the "Classpath" exception as provided
4345# by Oracle in the LICENSE file that accompanied this code.
4346#
4347# This code is distributed in the hope that it will be useful, but WITHOUT
4348# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4349# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4350# version 2 for more details (a copy is included in the LICENSE file that
4351# accompanied this code).
4352#
4353# You should have received a copy of the GNU General Public License version
4354# 2 along with this work; if not, write to the Free Software Foundation,
4355# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4356#
4357# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4358# or visit www.oracle.com if you need additional information or have any
4359# questions.
4360#
4361
4362################################################################################
4363# Setup the standard C/C++ runtime libraries.
4364#
4365# Most importantly, determine if stdc++ should be linked statically or
4366# dynamically.
4367################################################################################
4368
4369
4370#
4371# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4372# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4373#
4374# This code is free software; you can redistribute it and/or modify it
4375# under the terms of the GNU General Public License version 2 only, as
4376# published by the Free Software Foundation.  Oracle designates this
4377# particular file as subject to the "Classpath" exception as provided
4378# by Oracle in the LICENSE file that accompanied this code.
4379#
4380# This code is distributed in the hope that it will be useful, but WITHOUT
4381# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4382# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4383# version 2 for more details (a copy is included in the LICENSE file that
4384# accompanied this code).
4385#
4386# You should have received a copy of the GNU General Public License version
4387# 2 along with this work; if not, write to the Free Software Foundation,
4388# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4389#
4390# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4391# or visit www.oracle.com if you need additional information or have any
4392# questions.
4393#
4394
4395################################################################################
4396# Setup X11 Windows system
4397################################################################################
4398
4399
4400
4401################################################################################
4402# Determine which libraries are needed for this configuration
4403################################################################################
4404
4405
4406################################################################################
4407# Parse library options, and setup needed libraries
4408################################################################################
4409
4410
4411################################################################################
4412# Setup llvm (Low-Level VM)
4413################################################################################
4414
4415
4416################################################################################
4417# Setup various libraries, typically small system libraries
4418################################################################################
4419
4420
4421#
4422# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4423# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4424#
4425# This code is free software; you can redistribute it and/or modify it
4426# under the terms of the GNU General Public License version 2 only, as
4427# published by the Free Software Foundation.  Oracle designates this
4428# particular file as subject to the "Classpath" exception as provided
4429# by Oracle in the LICENSE file that accompanied this code.
4430#
4431# This code is distributed in the hope that it will be useful, but WITHOUT
4432# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4433# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4434# version 2 for more details (a copy is included in the LICENSE file that
4435# accompanied this code).
4436#
4437# You should have received a copy of the GNU General Public License version
4438# 2 along with this work; if not, write to the Free Software Foundation,
4439# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4440#
4441# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4442# or visit www.oracle.com if you need additional information or have any
4443# questions.
4444#
4445
4446# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4447# Converts autoconf style CPU name to OpenJDK style, into
4448# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4449
4450
4451# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4452# Converts autoconf style OS name to OpenJDK style, into
4453# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4454
4455
4456# Expects $host_os $host_cpu $build_os and $build_cpu
4457# and $with_target_bits to have been setup!
4458#
4459# Translate the standard triplet(quadruplet) definition
4460# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4461# OPENJDK_BUILD_OS, etc.
4462
4463
4464# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4465# accordingly. Must be done after setting up build and target system, but before
4466# doing anything else with these values.
4467
4468
4469# Setup the legacy variables, for controlling the old makefiles.
4470#
4471
4472
4473
4474
4475#%%% Build and target systems %%%
4476
4477
4478
4479
4480# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4481# Add -mX to various FLAGS variables.
4482
4483
4484
4485
4486
4487
4488#
4489# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4490# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4491#
4492# This code is free software; you can redistribute it and/or modify it
4493# under the terms of the GNU General Public License version 2 only, as
4494# published by the Free Software Foundation.  Oracle designates this
4495# particular file as subject to the "Classpath" exception as provided
4496# by Oracle in the LICENSE file that accompanied this code.
4497#
4498# This code is distributed in the hope that it will be useful, but WITHOUT
4499# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4500# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4501# version 2 for more details (a copy is included in the LICENSE file that
4502# accompanied this code).
4503#
4504# You should have received a copy of the GNU General Public License version
4505# 2 along with this work; if not, write to the Free Software Foundation,
4506# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4507#
4508# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4509# or visit www.oracle.com if you need additional information or have any
4510# questions.
4511#
4512
4513
4514
4515
4516
4517
4518
4519#
4520# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4521# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4522#
4523# This code is free software; you can redistribute it and/or modify it
4524# under the terms of the GNU General Public License version 2 only, as
4525# published by the Free Software Foundation.  Oracle designates this
4526# particular file as subject to the "Classpath" exception as provided
4527# by Oracle in the LICENSE file that accompanied this code.
4528#
4529# This code is distributed in the hope that it will be useful, but WITHOUT
4530# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4531# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4532# version 2 for more details (a copy is included in the LICENSE file that
4533# accompanied this code).
4534#
4535# You should have received a copy of the GNU General Public License version
4536# 2 along with this work; if not, write to the Free Software Foundation,
4537# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4538#
4539# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4540# or visit www.oracle.com if you need additional information or have any
4541# questions.
4542#
4543
4544########################################################################
4545# This file is responsible for detecting, verifying and setting up the
4546# toolchain, i.e. the compiler, linker and related utilities. It will setup
4547# proper paths to the binaries, but it will not setup any flags.
4548#
4549# The binaries used is determined by the toolchain type, which is the family of
4550# compilers and related tools that are used.
4551########################################################################
4552
4553
4554# All valid toolchains, regardless of platform (used by help.m4)
4555VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4556
4557# These toolchains are valid on different platforms
4558VALID_TOOLCHAINS_linux="gcc clang"
4559VALID_TOOLCHAINS_solaris="solstudio"
4560VALID_TOOLCHAINS_macosx="gcc clang"
4561VALID_TOOLCHAINS_aix="xlc"
4562VALID_TOOLCHAINS_windows="microsoft"
4563
4564# Toolchain descriptions
4565TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4566TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4567TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4568TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4569TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4570
4571# Setup a number of variables describing how native output files are
4572# named on this platform/toolchain.
4573
4574
4575# Determine which toolchain type to use, and make sure it is valid for this
4576# platform. Setup various information about the selected toolchain.
4577
4578
4579# Before we start detecting the toolchain executables, we might need some
4580# special setup, e.g. additional paths etc.
4581
4582
4583# Restore path, etc
4584
4585
4586# Check if a compiler is of the toolchain type we expect, and save the version
4587# information from it. If the compiler does not match the expected type,
4588# this function will abort using AC_MSG_ERROR. If it matches, the version will
4589# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4590# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4591#
4592# $1 = compiler to test (CC or CXX)
4593# $2 = human readable name of compiler (C or C++)
4594
4595
4596# Try to locate the given C or C++ compiler in the path, or otherwise.
4597#
4598# $1 = compiler to test (CC or CXX)
4599# $2 = human readable name of compiler (C or C++)
4600# $3 = list of compiler names to search for
4601
4602
4603# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4604# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4605# archiver (AR). Verify that the compilers are correct according to the
4606# toolchain type.
4607
4608
4609# Setup additional tools that is considered a part of the toolchain, but not the
4610# core part. Many of these are highly platform-specific and do not exist,
4611# and/or are not needed on all platforms.
4612
4613
4614# Setup the build tools (i.e, the compiler and linker used to build programs
4615# that should be run on the build platform, not the target platform, as a build
4616# helper). Since the non-cross-compile case uses the normal, target compilers
4617# for this, we can only do this after these have been setup.
4618
4619
4620# Setup legacy variables that are still needed as alternative ways to refer to
4621# parts of the toolchain.
4622
4623
4624# Do some additional checks on the detected tools.
4625
4626
4627# Setup the JTReg Regression Test Harness.
4628
4629
4630#
4631# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4632# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4633#
4634# This code is free software; you can redistribute it and/or modify it
4635# under the terms of the GNU General Public License version 2 only, as
4636# published by the Free Software Foundation.  Oracle designates this
4637# particular file as subject to the "Classpath" exception as provided
4638# by Oracle in the LICENSE file that accompanied this code.
4639#
4640# This code is distributed in the hope that it will be useful, but WITHOUT
4641# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4642# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4643# version 2 for more details (a copy is included in the LICENSE file that
4644# accompanied this code).
4645#
4646# You should have received a copy of the GNU General Public License version
4647# 2 along with this work; if not, write to the Free Software Foundation,
4648# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4649#
4650# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4651# or visit www.oracle.com if you need additional information or have any
4652# questions.
4653#
4654
4655################################################################################
4656# The order of these defines the priority by which we try to find them.
4657VALID_VS_VERSIONS="2013 2012 2010"
4658
4659VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4660VS_VERSION_INTERNAL_2010=100
4661VS_MSVCR_2010=msvcr100.dll
4662# We don't use msvcp on Visual Studio 2010
4663#VS_MSVCP_2010=msvcp100.dll
4664VS_ENVVAR_2010="VS100COMNTOOLS"
4665VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4666VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4667VS_VS_PLATFORM_NAME_2010="v100"
4668VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4669
4670VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4671VS_VERSION_INTERNAL_2012=110
4672VS_MSVCR_2012=msvcr110.dll
4673VS_MSVCP_2012=msvcp110.dll
4674VS_ENVVAR_2012="VS110COMNTOOLS"
4675VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4676VS_SDK_INSTALLDIR_2012=
4677VS_VS_PLATFORM_NAME_2012="v110"
4678VS_SDK_PLATFORM_NAME_2012=
4679
4680VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4681VS_VERSION_INTERNAL_2013=120
4682VS_MSVCR_2013=msvcr120.dll
4683VS_MSVCP_2013=msvcp120.dll
4684VS_ENVVAR_2013="VS120COMNTOOLS"
4685VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4686VS_SDK_INSTALLDIR_2013=
4687VS_VS_PLATFORM_NAME_2013="v120"
4688VS_SDK_PLATFORM_NAME_2013=
4689
4690################################################################################
4691
4692
4693
4694################################################################################
4695
4696
4697
4698################################################################################
4699# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4700# build environment and assigns it to VS_ENV_CMD
4701
4702
4703################################################################################
4704
4705
4706
4707################################################################################
4708# Check if the VS env variables were setup prior to running configure.
4709# If not, then find vcvarsall.bat and run it automatically, and integrate
4710# the set env variables into the spec file.
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725# This line needs to be here, verbatim, after all includes and the dummy hook
4726# definitions. It is replaced with custom functionality when building
4727# custom sources.
4728#CUSTOM_AUTOCONF_INCLUDE
4729
4730# Do not change or remove the following line, it is needed for consistency checks:
4731DATE_WHEN_GENERATED=1449859210
4732
4733###############################################################################
4734#
4735# Initialization / Boot-strapping
4736#
4737# The bootstrapping process needs to solve the "chicken or the egg" problem,
4738# thus it jumps back and forth, each time gaining something needed later on.
4739#
4740###############################################################################
4741
4742# If we are requested to print additional help, do that and then exit.
4743# This must be the very first call.
4744
4745  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4746    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4747    $PRINTF "Which are valid to use depends on the build platform.\n"
4748    for toolchain in $VALID_TOOLCHAINS_all; do
4749      # Use indirect variable referencing
4750      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4751      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4752      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4753    done
4754
4755    # And now exit directly
4756    exit 0
4757  fi
4758
4759
4760# Basic initialization that must happen first of all in the normal process.
4761
4762  # Save the original command line. This is passed to us by the wrapper configure script.
4763
4764  # Save the path variable before it gets changed
4765  ORIGINAL_PATH="$PATH"
4766
4767  DATE_WHEN_CONFIGURED=`LANG=C date`
4768
4769  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4770$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4771  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4772$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4773
4774
4775  # Start with tools that do not need have cross compilation support
4776  # and can be expected to be found in the default PATH. These tools are
4777  # used by configure.
4778
4779  # First are all the simple required tools.
4780
4781
4782
4783  # Publish this variable in the help.
4784
4785
4786  if [ -z "${BASENAME+x}" ]; then
4787    # The variable is not set by user, try to locate tool using the code snippet
4788    for ac_prog in basename
4789do
4790  # Extract the first word of "$ac_prog", so it can be a program name with args.
4791set dummy $ac_prog; ac_word=$2
4792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4793$as_echo_n "checking for $ac_word... " >&6; }
4794if ${ac_cv_path_BASENAME+:} false; then :
4795  $as_echo_n "(cached) " >&6
4796else
4797  case $BASENAME in
4798  [\\/]* | ?:[\\/]*)
4799  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4800  ;;
4801  *)
4802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4803for as_dir in $PATH
4804do
4805  IFS=$as_save_IFS
4806  test -z "$as_dir" && as_dir=.
4807    for ac_exec_ext in '' $ac_executable_extensions; do
4808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4809    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4811    break 2
4812  fi
4813done
4814  done
4815IFS=$as_save_IFS
4816
4817  ;;
4818esac
4819fi
4820BASENAME=$ac_cv_path_BASENAME
4821if test -n "$BASENAME"; then
4822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4823$as_echo "$BASENAME" >&6; }
4824else
4825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4826$as_echo "no" >&6; }
4827fi
4828
4829
4830  test -n "$BASENAME" && break
4831done
4832
4833  else
4834    # The variable is set, but is it from the command line or the environment?
4835
4836    # Try to remove the string !BASENAME! from our list.
4837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4839      # If it failed, the variable was not from the command line. Ignore it,
4840      # but warn the user (except for BASH, which is always set by the calling BASH).
4841      if test "xBASENAME" != xBASH; then
4842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4843$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4844      fi
4845      # Try to locate tool using the code snippet
4846      for ac_prog in basename
4847do
4848  # Extract the first word of "$ac_prog", so it can be a program name with args.
4849set dummy $ac_prog; ac_word=$2
4850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4851$as_echo_n "checking for $ac_word... " >&6; }
4852if ${ac_cv_path_BASENAME+:} false; then :
4853  $as_echo_n "(cached) " >&6
4854else
4855  case $BASENAME in
4856  [\\/]* | ?:[\\/]*)
4857  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4858  ;;
4859  *)
4860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4861for as_dir in $PATH
4862do
4863  IFS=$as_save_IFS
4864  test -z "$as_dir" && as_dir=.
4865    for ac_exec_ext in '' $ac_executable_extensions; do
4866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4867    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4869    break 2
4870  fi
4871done
4872  done
4873IFS=$as_save_IFS
4874
4875  ;;
4876esac
4877fi
4878BASENAME=$ac_cv_path_BASENAME
4879if test -n "$BASENAME"; then
4880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4881$as_echo "$BASENAME" >&6; }
4882else
4883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4884$as_echo "no" >&6; }
4885fi
4886
4887
4888  test -n "$BASENAME" && break
4889done
4890
4891    else
4892      # If it succeeded, then it was overridden by the user. We will use it
4893      # for the tool.
4894
4895      # First remove it from the list of overridden variables, so we can test
4896      # for unknown variables in the end.
4897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4898
4899      # Check if we try to supply an empty value
4900      if test "x$BASENAME" = x; then
4901        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4902$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4904$as_echo_n "checking for BASENAME... " >&6; }
4905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4906$as_echo "disabled" >&6; }
4907      else
4908        # Check if the provided tool contains a complete path.
4909        tool_specified="$BASENAME"
4910        tool_basename="${tool_specified##*/}"
4911        if test "x$tool_basename" = "x$tool_specified"; then
4912          # A command without a complete path is provided, search $PATH.
4913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4914$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4915          # Extract the first word of "$tool_basename", so it can be a program name with args.
4916set dummy $tool_basename; ac_word=$2
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4918$as_echo_n "checking for $ac_word... " >&6; }
4919if ${ac_cv_path_BASENAME+:} false; then :
4920  $as_echo_n "(cached) " >&6
4921else
4922  case $BASENAME in
4923  [\\/]* | ?:[\\/]*)
4924  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4925  ;;
4926  *)
4927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4928for as_dir in $PATH
4929do
4930  IFS=$as_save_IFS
4931  test -z "$as_dir" && as_dir=.
4932    for ac_exec_ext in '' $ac_executable_extensions; do
4933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4934    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4936    break 2
4937  fi
4938done
4939  done
4940IFS=$as_save_IFS
4941
4942  ;;
4943esac
4944fi
4945BASENAME=$ac_cv_path_BASENAME
4946if test -n "$BASENAME"; then
4947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4948$as_echo "$BASENAME" >&6; }
4949else
4950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951$as_echo "no" >&6; }
4952fi
4953
4954
4955          if test "x$BASENAME" = x; then
4956            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4957          fi
4958        else
4959          # Otherwise we believe it is a complete path. Use it as it is.
4960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4961$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4963$as_echo_n "checking for BASENAME... " >&6; }
4964          if test ! -x "$tool_specified"; then
4965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4966$as_echo "not found" >&6; }
4967            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4968          fi
4969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4970$as_echo "$tool_specified" >&6; }
4971        fi
4972      fi
4973    fi
4974
4975  fi
4976
4977
4978
4979  if test "x$BASENAME" = x; then
4980    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4981  fi
4982
4983
4984
4985
4986
4987  # Publish this variable in the help.
4988
4989
4990  if [ -z "${BASH+x}" ]; then
4991    # The variable is not set by user, try to locate tool using the code snippet
4992    for ac_prog in bash
4993do
4994  # Extract the first word of "$ac_prog", so it can be a program name with args.
4995set dummy $ac_prog; ac_word=$2
4996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4997$as_echo_n "checking for $ac_word... " >&6; }
4998if ${ac_cv_path_BASH+:} false; then :
4999  $as_echo_n "(cached) " >&6
5000else
5001  case $BASH in
5002  [\\/]* | ?:[\\/]*)
5003  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5004  ;;
5005  *)
5006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5007for as_dir in $PATH
5008do
5009  IFS=$as_save_IFS
5010  test -z "$as_dir" && as_dir=.
5011    for ac_exec_ext in '' $ac_executable_extensions; do
5012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5013    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5015    break 2
5016  fi
5017done
5018  done
5019IFS=$as_save_IFS
5020
5021  ;;
5022esac
5023fi
5024BASH=$ac_cv_path_BASH
5025if test -n "$BASH"; then
5026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5027$as_echo "$BASH" >&6; }
5028else
5029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5030$as_echo "no" >&6; }
5031fi
5032
5033
5034  test -n "$BASH" && break
5035done
5036
5037  else
5038    # The variable is set, but is it from the command line or the environment?
5039
5040    # Try to remove the string !BASH! from our list.
5041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5043      # If it failed, the variable was not from the command line. Ignore it,
5044      # but warn the user (except for BASH, which is always set by the calling BASH).
5045      if test "xBASH" != xBASH; then
5046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5047$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5048      fi
5049      # Try to locate tool using the code snippet
5050      for ac_prog in bash
5051do
5052  # Extract the first word of "$ac_prog", so it can be a program name with args.
5053set dummy $ac_prog; ac_word=$2
5054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5055$as_echo_n "checking for $ac_word... " >&6; }
5056if ${ac_cv_path_BASH+:} false; then :
5057  $as_echo_n "(cached) " >&6
5058else
5059  case $BASH in
5060  [\\/]* | ?:[\\/]*)
5061  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5062  ;;
5063  *)
5064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5065for as_dir in $PATH
5066do
5067  IFS=$as_save_IFS
5068  test -z "$as_dir" && as_dir=.
5069    for ac_exec_ext in '' $ac_executable_extensions; do
5070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5071    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5073    break 2
5074  fi
5075done
5076  done
5077IFS=$as_save_IFS
5078
5079  ;;
5080esac
5081fi
5082BASH=$ac_cv_path_BASH
5083if test -n "$BASH"; then
5084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5085$as_echo "$BASH" >&6; }
5086else
5087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5088$as_echo "no" >&6; }
5089fi
5090
5091
5092  test -n "$BASH" && break
5093done
5094
5095    else
5096      # If it succeeded, then it was overridden by the user. We will use it
5097      # for the tool.
5098
5099      # First remove it from the list of overridden variables, so we can test
5100      # for unknown variables in the end.
5101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5102
5103      # Check if we try to supply an empty value
5104      if test "x$BASH" = x; then
5105        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5106$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5107        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5108$as_echo_n "checking for BASH... " >&6; }
5109        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5110$as_echo "disabled" >&6; }
5111      else
5112        # Check if the provided tool contains a complete path.
5113        tool_specified="$BASH"
5114        tool_basename="${tool_specified##*/}"
5115        if test "x$tool_basename" = "x$tool_specified"; then
5116          # A command without a complete path is provided, search $PATH.
5117          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5118$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5119          # Extract the first word of "$tool_basename", so it can be a program name with args.
5120set dummy $tool_basename; ac_word=$2
5121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5122$as_echo_n "checking for $ac_word... " >&6; }
5123if ${ac_cv_path_BASH+:} false; then :
5124  $as_echo_n "(cached) " >&6
5125else
5126  case $BASH in
5127  [\\/]* | ?:[\\/]*)
5128  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5129  ;;
5130  *)
5131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5132for as_dir in $PATH
5133do
5134  IFS=$as_save_IFS
5135  test -z "$as_dir" && as_dir=.
5136    for ac_exec_ext in '' $ac_executable_extensions; do
5137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5138    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5140    break 2
5141  fi
5142done
5143  done
5144IFS=$as_save_IFS
5145
5146  ;;
5147esac
5148fi
5149BASH=$ac_cv_path_BASH
5150if test -n "$BASH"; then
5151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5152$as_echo "$BASH" >&6; }
5153else
5154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5155$as_echo "no" >&6; }
5156fi
5157
5158
5159          if test "x$BASH" = x; then
5160            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5161          fi
5162        else
5163          # Otherwise we believe it is a complete path. Use it as it is.
5164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5165$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5166          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5167$as_echo_n "checking for BASH... " >&6; }
5168          if test ! -x "$tool_specified"; then
5169            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5170$as_echo "not found" >&6; }
5171            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5172          fi
5173          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5174$as_echo "$tool_specified" >&6; }
5175        fi
5176      fi
5177    fi
5178
5179  fi
5180
5181
5182
5183  if test "x$BASH" = x; then
5184    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5185  fi
5186
5187
5188
5189
5190
5191  # Publish this variable in the help.
5192
5193
5194  if [ -z "${CAT+x}" ]; then
5195    # The variable is not set by user, try to locate tool using the code snippet
5196    for ac_prog in cat
5197do
5198  # Extract the first word of "$ac_prog", so it can be a program name with args.
5199set dummy $ac_prog; ac_word=$2
5200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5201$as_echo_n "checking for $ac_word... " >&6; }
5202if ${ac_cv_path_CAT+:} false; then :
5203  $as_echo_n "(cached) " >&6
5204else
5205  case $CAT in
5206  [\\/]* | ?:[\\/]*)
5207  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5208  ;;
5209  *)
5210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5211for as_dir in $PATH
5212do
5213  IFS=$as_save_IFS
5214  test -z "$as_dir" && as_dir=.
5215    for ac_exec_ext in '' $ac_executable_extensions; do
5216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5217    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5219    break 2
5220  fi
5221done
5222  done
5223IFS=$as_save_IFS
5224
5225  ;;
5226esac
5227fi
5228CAT=$ac_cv_path_CAT
5229if test -n "$CAT"; then
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5231$as_echo "$CAT" >&6; }
5232else
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5234$as_echo "no" >&6; }
5235fi
5236
5237
5238  test -n "$CAT" && break
5239done
5240
5241  else
5242    # The variable is set, but is it from the command line or the environment?
5243
5244    # Try to remove the string !CAT! from our list.
5245    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5246    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5247      # If it failed, the variable was not from the command line. Ignore it,
5248      # but warn the user (except for BASH, which is always set by the calling BASH).
5249      if test "xCAT" != xBASH; then
5250        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5251$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5252      fi
5253      # Try to locate tool using the code snippet
5254      for ac_prog in cat
5255do
5256  # Extract the first word of "$ac_prog", so it can be a program name with args.
5257set dummy $ac_prog; ac_word=$2
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259$as_echo_n "checking for $ac_word... " >&6; }
5260if ${ac_cv_path_CAT+:} false; then :
5261  $as_echo_n "(cached) " >&6
5262else
5263  case $CAT in
5264  [\\/]* | ?:[\\/]*)
5265  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5266  ;;
5267  *)
5268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5269for as_dir in $PATH
5270do
5271  IFS=$as_save_IFS
5272  test -z "$as_dir" && as_dir=.
5273    for ac_exec_ext in '' $ac_executable_extensions; do
5274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5275    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5277    break 2
5278  fi
5279done
5280  done
5281IFS=$as_save_IFS
5282
5283  ;;
5284esac
5285fi
5286CAT=$ac_cv_path_CAT
5287if test -n "$CAT"; then
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5289$as_echo "$CAT" >&6; }
5290else
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292$as_echo "no" >&6; }
5293fi
5294
5295
5296  test -n "$CAT" && break
5297done
5298
5299    else
5300      # If it succeeded, then it was overridden by the user. We will use it
5301      # for the tool.
5302
5303      # First remove it from the list of overridden variables, so we can test
5304      # for unknown variables in the end.
5305      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5306
5307      # Check if we try to supply an empty value
5308      if test "x$CAT" = x; then
5309        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5310$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5311        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5312$as_echo_n "checking for CAT... " >&6; }
5313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5314$as_echo "disabled" >&6; }
5315      else
5316        # Check if the provided tool contains a complete path.
5317        tool_specified="$CAT"
5318        tool_basename="${tool_specified##*/}"
5319        if test "x$tool_basename" = "x$tool_specified"; then
5320          # A command without a complete path is provided, search $PATH.
5321          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5322$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5323          # Extract the first word of "$tool_basename", so it can be a program name with args.
5324set dummy $tool_basename; ac_word=$2
5325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5326$as_echo_n "checking for $ac_word... " >&6; }
5327if ${ac_cv_path_CAT+:} false; then :
5328  $as_echo_n "(cached) " >&6
5329else
5330  case $CAT in
5331  [\\/]* | ?:[\\/]*)
5332  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5333  ;;
5334  *)
5335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5336for as_dir in $PATH
5337do
5338  IFS=$as_save_IFS
5339  test -z "$as_dir" && as_dir=.
5340    for ac_exec_ext in '' $ac_executable_extensions; do
5341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5342    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5344    break 2
5345  fi
5346done
5347  done
5348IFS=$as_save_IFS
5349
5350  ;;
5351esac
5352fi
5353CAT=$ac_cv_path_CAT
5354if test -n "$CAT"; then
5355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5356$as_echo "$CAT" >&6; }
5357else
5358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5359$as_echo "no" >&6; }
5360fi
5361
5362
5363          if test "x$CAT" = x; then
5364            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5365          fi
5366        else
5367          # Otherwise we believe it is a complete path. Use it as it is.
5368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5369$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5370          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5371$as_echo_n "checking for CAT... " >&6; }
5372          if test ! -x "$tool_specified"; then
5373            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5374$as_echo "not found" >&6; }
5375            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5376          fi
5377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5378$as_echo "$tool_specified" >&6; }
5379        fi
5380      fi
5381    fi
5382
5383  fi
5384
5385
5386
5387  if test "x$CAT" = x; then
5388    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5389  fi
5390
5391
5392
5393
5394
5395  # Publish this variable in the help.
5396
5397
5398  if [ -z "${CHMOD+x}" ]; then
5399    # The variable is not set by user, try to locate tool using the code snippet
5400    for ac_prog in chmod
5401do
5402  # Extract the first word of "$ac_prog", so it can be a program name with args.
5403set dummy $ac_prog; ac_word=$2
5404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5405$as_echo_n "checking for $ac_word... " >&6; }
5406if ${ac_cv_path_CHMOD+:} false; then :
5407  $as_echo_n "(cached) " >&6
5408else
5409  case $CHMOD in
5410  [\\/]* | ?:[\\/]*)
5411  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5412  ;;
5413  *)
5414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5415for as_dir in $PATH
5416do
5417  IFS=$as_save_IFS
5418  test -z "$as_dir" && as_dir=.
5419    for ac_exec_ext in '' $ac_executable_extensions; do
5420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5421    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5423    break 2
5424  fi
5425done
5426  done
5427IFS=$as_save_IFS
5428
5429  ;;
5430esac
5431fi
5432CHMOD=$ac_cv_path_CHMOD
5433if test -n "$CHMOD"; then
5434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5435$as_echo "$CHMOD" >&6; }
5436else
5437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5438$as_echo "no" >&6; }
5439fi
5440
5441
5442  test -n "$CHMOD" && break
5443done
5444
5445  else
5446    # The variable is set, but is it from the command line or the environment?
5447
5448    # Try to remove the string !CHMOD! from our list.
5449    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5450    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5451      # If it failed, the variable was not from the command line. Ignore it,
5452      # but warn the user (except for BASH, which is always set by the calling BASH).
5453      if test "xCHMOD" != xBASH; then
5454        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5455$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5456      fi
5457      # Try to locate tool using the code snippet
5458      for ac_prog in chmod
5459do
5460  # Extract the first word of "$ac_prog", so it can be a program name with args.
5461set dummy $ac_prog; ac_word=$2
5462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5463$as_echo_n "checking for $ac_word... " >&6; }
5464if ${ac_cv_path_CHMOD+:} false; then :
5465  $as_echo_n "(cached) " >&6
5466else
5467  case $CHMOD in
5468  [\\/]* | ?:[\\/]*)
5469  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5470  ;;
5471  *)
5472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5473for as_dir in $PATH
5474do
5475  IFS=$as_save_IFS
5476  test -z "$as_dir" && as_dir=.
5477    for ac_exec_ext in '' $ac_executable_extensions; do
5478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5479    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5481    break 2
5482  fi
5483done
5484  done
5485IFS=$as_save_IFS
5486
5487  ;;
5488esac
5489fi
5490CHMOD=$ac_cv_path_CHMOD
5491if test -n "$CHMOD"; then
5492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5493$as_echo "$CHMOD" >&6; }
5494else
5495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5496$as_echo "no" >&6; }
5497fi
5498
5499
5500  test -n "$CHMOD" && break
5501done
5502
5503    else
5504      # If it succeeded, then it was overridden by the user. We will use it
5505      # for the tool.
5506
5507      # First remove it from the list of overridden variables, so we can test
5508      # for unknown variables in the end.
5509      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5510
5511      # Check if we try to supply an empty value
5512      if test "x$CHMOD" = x; then
5513        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5514$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5516$as_echo_n "checking for CHMOD... " >&6; }
5517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5518$as_echo "disabled" >&6; }
5519      else
5520        # Check if the provided tool contains a complete path.
5521        tool_specified="$CHMOD"
5522        tool_basename="${tool_specified##*/}"
5523        if test "x$tool_basename" = "x$tool_specified"; then
5524          # A command without a complete path is provided, search $PATH.
5525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5526$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5527          # Extract the first word of "$tool_basename", so it can be a program name with args.
5528set dummy $tool_basename; ac_word=$2
5529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5530$as_echo_n "checking for $ac_word... " >&6; }
5531if ${ac_cv_path_CHMOD+:} false; then :
5532  $as_echo_n "(cached) " >&6
5533else
5534  case $CHMOD in
5535  [\\/]* | ?:[\\/]*)
5536  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5537  ;;
5538  *)
5539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5540for as_dir in $PATH
5541do
5542  IFS=$as_save_IFS
5543  test -z "$as_dir" && as_dir=.
5544    for ac_exec_ext in '' $ac_executable_extensions; do
5545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5546    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5548    break 2
5549  fi
5550done
5551  done
5552IFS=$as_save_IFS
5553
5554  ;;
5555esac
5556fi
5557CHMOD=$ac_cv_path_CHMOD
5558if test -n "$CHMOD"; then
5559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5560$as_echo "$CHMOD" >&6; }
5561else
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5563$as_echo "no" >&6; }
5564fi
5565
5566
5567          if test "x$CHMOD" = x; then
5568            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5569          fi
5570        else
5571          # Otherwise we believe it is a complete path. Use it as it is.
5572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5573$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5574          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5575$as_echo_n "checking for CHMOD... " >&6; }
5576          if test ! -x "$tool_specified"; then
5577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5578$as_echo "not found" >&6; }
5579            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5580          fi
5581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5582$as_echo "$tool_specified" >&6; }
5583        fi
5584      fi
5585    fi
5586
5587  fi
5588
5589
5590
5591  if test "x$CHMOD" = x; then
5592    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5593  fi
5594
5595
5596
5597
5598
5599  # Publish this variable in the help.
5600
5601
5602  if [ -z "${CMP+x}" ]; then
5603    # The variable is not set by user, try to locate tool using the code snippet
5604    for ac_prog in cmp
5605do
5606  # Extract the first word of "$ac_prog", so it can be a program name with args.
5607set dummy $ac_prog; ac_word=$2
5608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5609$as_echo_n "checking for $ac_word... " >&6; }
5610if ${ac_cv_path_CMP+:} false; then :
5611  $as_echo_n "(cached) " >&6
5612else
5613  case $CMP in
5614  [\\/]* | ?:[\\/]*)
5615  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5616  ;;
5617  *)
5618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5619for as_dir in $PATH
5620do
5621  IFS=$as_save_IFS
5622  test -z "$as_dir" && as_dir=.
5623    for ac_exec_ext in '' $ac_executable_extensions; do
5624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5625    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5627    break 2
5628  fi
5629done
5630  done
5631IFS=$as_save_IFS
5632
5633  ;;
5634esac
5635fi
5636CMP=$ac_cv_path_CMP
5637if test -n "$CMP"; then
5638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5639$as_echo "$CMP" >&6; }
5640else
5641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5642$as_echo "no" >&6; }
5643fi
5644
5645
5646  test -n "$CMP" && break
5647done
5648
5649  else
5650    # The variable is set, but is it from the command line or the environment?
5651
5652    # Try to remove the string !CMP! from our list.
5653    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5654    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5655      # If it failed, the variable was not from the command line. Ignore it,
5656      # but warn the user (except for BASH, which is always set by the calling BASH).
5657      if test "xCMP" != xBASH; then
5658        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5659$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5660      fi
5661      # Try to locate tool using the code snippet
5662      for ac_prog in cmp
5663do
5664  # Extract the first word of "$ac_prog", so it can be a program name with args.
5665set dummy $ac_prog; ac_word=$2
5666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667$as_echo_n "checking for $ac_word... " >&6; }
5668if ${ac_cv_path_CMP+:} false; then :
5669  $as_echo_n "(cached) " >&6
5670else
5671  case $CMP in
5672  [\\/]* | ?:[\\/]*)
5673  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5674  ;;
5675  *)
5676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5677for as_dir in $PATH
5678do
5679  IFS=$as_save_IFS
5680  test -z "$as_dir" && as_dir=.
5681    for ac_exec_ext in '' $ac_executable_extensions; do
5682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5683    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5685    break 2
5686  fi
5687done
5688  done
5689IFS=$as_save_IFS
5690
5691  ;;
5692esac
5693fi
5694CMP=$ac_cv_path_CMP
5695if test -n "$CMP"; then
5696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5697$as_echo "$CMP" >&6; }
5698else
5699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700$as_echo "no" >&6; }
5701fi
5702
5703
5704  test -n "$CMP" && break
5705done
5706
5707    else
5708      # If it succeeded, then it was overridden by the user. We will use it
5709      # for the tool.
5710
5711      # First remove it from the list of overridden variables, so we can test
5712      # for unknown variables in the end.
5713      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5714
5715      # Check if we try to supply an empty value
5716      if test "x$CMP" = x; then
5717        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5718$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5719        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5720$as_echo_n "checking for CMP... " >&6; }
5721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5722$as_echo "disabled" >&6; }
5723      else
5724        # Check if the provided tool contains a complete path.
5725        tool_specified="$CMP"
5726        tool_basename="${tool_specified##*/}"
5727        if test "x$tool_basename" = "x$tool_specified"; then
5728          # A command without a complete path is provided, search $PATH.
5729          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5730$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5731          # Extract the first word of "$tool_basename", so it can be a program name with args.
5732set dummy $tool_basename; ac_word=$2
5733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734$as_echo_n "checking for $ac_word... " >&6; }
5735if ${ac_cv_path_CMP+:} false; then :
5736  $as_echo_n "(cached) " >&6
5737else
5738  case $CMP in
5739  [\\/]* | ?:[\\/]*)
5740  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5741  ;;
5742  *)
5743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5744for as_dir in $PATH
5745do
5746  IFS=$as_save_IFS
5747  test -z "$as_dir" && as_dir=.
5748    for ac_exec_ext in '' $ac_executable_extensions; do
5749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5750    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5752    break 2
5753  fi
5754done
5755  done
5756IFS=$as_save_IFS
5757
5758  ;;
5759esac
5760fi
5761CMP=$ac_cv_path_CMP
5762if test -n "$CMP"; then
5763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5764$as_echo "$CMP" >&6; }
5765else
5766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767$as_echo "no" >&6; }
5768fi
5769
5770
5771          if test "x$CMP" = x; then
5772            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5773          fi
5774        else
5775          # Otherwise we believe it is a complete path. Use it as it is.
5776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5777$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5778          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5779$as_echo_n "checking for CMP... " >&6; }
5780          if test ! -x "$tool_specified"; then
5781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5782$as_echo "not found" >&6; }
5783            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5784          fi
5785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5786$as_echo "$tool_specified" >&6; }
5787        fi
5788      fi
5789    fi
5790
5791  fi
5792
5793
5794
5795  if test "x$CMP" = x; then
5796    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5797  fi
5798
5799
5800
5801
5802
5803  # Publish this variable in the help.
5804
5805
5806  if [ -z "${COMM+x}" ]; then
5807    # The variable is not set by user, try to locate tool using the code snippet
5808    for ac_prog in comm
5809do
5810  # Extract the first word of "$ac_prog", so it can be a program name with args.
5811set dummy $ac_prog; ac_word=$2
5812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5813$as_echo_n "checking for $ac_word... " >&6; }
5814if ${ac_cv_path_COMM+:} false; then :
5815  $as_echo_n "(cached) " >&6
5816else
5817  case $COMM in
5818  [\\/]* | ?:[\\/]*)
5819  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5820  ;;
5821  *)
5822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5823for as_dir in $PATH
5824do
5825  IFS=$as_save_IFS
5826  test -z "$as_dir" && as_dir=.
5827    for ac_exec_ext in '' $ac_executable_extensions; do
5828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5829    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5831    break 2
5832  fi
5833done
5834  done
5835IFS=$as_save_IFS
5836
5837  ;;
5838esac
5839fi
5840COMM=$ac_cv_path_COMM
5841if test -n "$COMM"; then
5842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5843$as_echo "$COMM" >&6; }
5844else
5845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5846$as_echo "no" >&6; }
5847fi
5848
5849
5850  test -n "$COMM" && break
5851done
5852
5853  else
5854    # The variable is set, but is it from the command line or the environment?
5855
5856    # Try to remove the string !COMM! from our list.
5857    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5858    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5859      # If it failed, the variable was not from the command line. Ignore it,
5860      # but warn the user (except for BASH, which is always set by the calling BASH).
5861      if test "xCOMM" != xBASH; then
5862        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5863$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5864      fi
5865      # Try to locate tool using the code snippet
5866      for ac_prog in comm
5867do
5868  # Extract the first word of "$ac_prog", so it can be a program name with args.
5869set dummy $ac_prog; ac_word=$2
5870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5871$as_echo_n "checking for $ac_word... " >&6; }
5872if ${ac_cv_path_COMM+:} false; then :
5873  $as_echo_n "(cached) " >&6
5874else
5875  case $COMM in
5876  [\\/]* | ?:[\\/]*)
5877  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5878  ;;
5879  *)
5880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5881for as_dir in $PATH
5882do
5883  IFS=$as_save_IFS
5884  test -z "$as_dir" && as_dir=.
5885    for ac_exec_ext in '' $ac_executable_extensions; do
5886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5887    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5889    break 2
5890  fi
5891done
5892  done
5893IFS=$as_save_IFS
5894
5895  ;;
5896esac
5897fi
5898COMM=$ac_cv_path_COMM
5899if test -n "$COMM"; then
5900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5901$as_echo "$COMM" >&6; }
5902else
5903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5904$as_echo "no" >&6; }
5905fi
5906
5907
5908  test -n "$COMM" && break
5909done
5910
5911    else
5912      # If it succeeded, then it was overridden by the user. We will use it
5913      # for the tool.
5914
5915      # First remove it from the list of overridden variables, so we can test
5916      # for unknown variables in the end.
5917      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5918
5919      # Check if we try to supply an empty value
5920      if test "x$COMM" = x; then
5921        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5922$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5923        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5924$as_echo_n "checking for COMM... " >&6; }
5925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5926$as_echo "disabled" >&6; }
5927      else
5928        # Check if the provided tool contains a complete path.
5929        tool_specified="$COMM"
5930        tool_basename="${tool_specified##*/}"
5931        if test "x$tool_basename" = "x$tool_specified"; then
5932          # A command without a complete path is provided, search $PATH.
5933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5934$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5935          # Extract the first word of "$tool_basename", so it can be a program name with args.
5936set dummy $tool_basename; ac_word=$2
5937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5938$as_echo_n "checking for $ac_word... " >&6; }
5939if ${ac_cv_path_COMM+:} false; then :
5940  $as_echo_n "(cached) " >&6
5941else
5942  case $COMM in
5943  [\\/]* | ?:[\\/]*)
5944  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5945  ;;
5946  *)
5947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5948for as_dir in $PATH
5949do
5950  IFS=$as_save_IFS
5951  test -z "$as_dir" && as_dir=.
5952    for ac_exec_ext in '' $ac_executable_extensions; do
5953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5954    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5956    break 2
5957  fi
5958done
5959  done
5960IFS=$as_save_IFS
5961
5962  ;;
5963esac
5964fi
5965COMM=$ac_cv_path_COMM
5966if test -n "$COMM"; then
5967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5968$as_echo "$COMM" >&6; }
5969else
5970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5971$as_echo "no" >&6; }
5972fi
5973
5974
5975          if test "x$COMM" = x; then
5976            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5977          fi
5978        else
5979          # Otherwise we believe it is a complete path. Use it as it is.
5980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5981$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5982          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5983$as_echo_n "checking for COMM... " >&6; }
5984          if test ! -x "$tool_specified"; then
5985            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5986$as_echo "not found" >&6; }
5987            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5988          fi
5989          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5990$as_echo "$tool_specified" >&6; }
5991        fi
5992      fi
5993    fi
5994
5995  fi
5996
5997
5998
5999  if test "x$COMM" = x; then
6000    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6001  fi
6002
6003
6004
6005
6006
6007  # Publish this variable in the help.
6008
6009
6010  if [ -z "${CP+x}" ]; then
6011    # The variable is not set by user, try to locate tool using the code snippet
6012    for ac_prog in cp
6013do
6014  # Extract the first word of "$ac_prog", so it can be a program name with args.
6015set dummy $ac_prog; ac_word=$2
6016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6017$as_echo_n "checking for $ac_word... " >&6; }
6018if ${ac_cv_path_CP+:} false; then :
6019  $as_echo_n "(cached) " >&6
6020else
6021  case $CP in
6022  [\\/]* | ?:[\\/]*)
6023  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6024  ;;
6025  *)
6026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6027for as_dir in $PATH
6028do
6029  IFS=$as_save_IFS
6030  test -z "$as_dir" && as_dir=.
6031    for ac_exec_ext in '' $ac_executable_extensions; do
6032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6033    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6035    break 2
6036  fi
6037done
6038  done
6039IFS=$as_save_IFS
6040
6041  ;;
6042esac
6043fi
6044CP=$ac_cv_path_CP
6045if test -n "$CP"; then
6046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6047$as_echo "$CP" >&6; }
6048else
6049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6050$as_echo "no" >&6; }
6051fi
6052
6053
6054  test -n "$CP" && break
6055done
6056
6057  else
6058    # The variable is set, but is it from the command line or the environment?
6059
6060    # Try to remove the string !CP! from our list.
6061    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6062    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6063      # If it failed, the variable was not from the command line. Ignore it,
6064      # but warn the user (except for BASH, which is always set by the calling BASH).
6065      if test "xCP" != xBASH; then
6066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6067$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6068      fi
6069      # Try to locate tool using the code snippet
6070      for ac_prog in cp
6071do
6072  # Extract the first word of "$ac_prog", so it can be a program name with args.
6073set dummy $ac_prog; ac_word=$2
6074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6075$as_echo_n "checking for $ac_word... " >&6; }
6076if ${ac_cv_path_CP+:} false; then :
6077  $as_echo_n "(cached) " >&6
6078else
6079  case $CP in
6080  [\\/]* | ?:[\\/]*)
6081  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6082  ;;
6083  *)
6084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6085for as_dir in $PATH
6086do
6087  IFS=$as_save_IFS
6088  test -z "$as_dir" && as_dir=.
6089    for ac_exec_ext in '' $ac_executable_extensions; do
6090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6091    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6093    break 2
6094  fi
6095done
6096  done
6097IFS=$as_save_IFS
6098
6099  ;;
6100esac
6101fi
6102CP=$ac_cv_path_CP
6103if test -n "$CP"; then
6104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6105$as_echo "$CP" >&6; }
6106else
6107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6108$as_echo "no" >&6; }
6109fi
6110
6111
6112  test -n "$CP" && break
6113done
6114
6115    else
6116      # If it succeeded, then it was overridden by the user. We will use it
6117      # for the tool.
6118
6119      # First remove it from the list of overridden variables, so we can test
6120      # for unknown variables in the end.
6121      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6122
6123      # Check if we try to supply an empty value
6124      if test "x$CP" = x; then
6125        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6126$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6127        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6128$as_echo_n "checking for CP... " >&6; }
6129        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6130$as_echo "disabled" >&6; }
6131      else
6132        # Check if the provided tool contains a complete path.
6133        tool_specified="$CP"
6134        tool_basename="${tool_specified##*/}"
6135        if test "x$tool_basename" = "x$tool_specified"; then
6136          # A command without a complete path is provided, search $PATH.
6137          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6138$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6139          # Extract the first word of "$tool_basename", so it can be a program name with args.
6140set dummy $tool_basename; ac_word=$2
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6142$as_echo_n "checking for $ac_word... " >&6; }
6143if ${ac_cv_path_CP+:} false; then :
6144  $as_echo_n "(cached) " >&6
6145else
6146  case $CP in
6147  [\\/]* | ?:[\\/]*)
6148  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6149  ;;
6150  *)
6151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6152for as_dir in $PATH
6153do
6154  IFS=$as_save_IFS
6155  test -z "$as_dir" && as_dir=.
6156    for ac_exec_ext in '' $ac_executable_extensions; do
6157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6158    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6160    break 2
6161  fi
6162done
6163  done
6164IFS=$as_save_IFS
6165
6166  ;;
6167esac
6168fi
6169CP=$ac_cv_path_CP
6170if test -n "$CP"; then
6171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6172$as_echo "$CP" >&6; }
6173else
6174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6175$as_echo "no" >&6; }
6176fi
6177
6178
6179          if test "x$CP" = x; then
6180            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6181          fi
6182        else
6183          # Otherwise we believe it is a complete path. Use it as it is.
6184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6185$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6186          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6187$as_echo_n "checking for CP... " >&6; }
6188          if test ! -x "$tool_specified"; then
6189            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6190$as_echo "not found" >&6; }
6191            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6192          fi
6193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6194$as_echo "$tool_specified" >&6; }
6195        fi
6196      fi
6197    fi
6198
6199  fi
6200
6201
6202
6203  if test "x$CP" = x; then
6204    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6205  fi
6206
6207
6208
6209
6210
6211  # Publish this variable in the help.
6212
6213
6214  if [ -z "${CUT+x}" ]; then
6215    # The variable is not set by user, try to locate tool using the code snippet
6216    for ac_prog in cut
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_CUT+:} false; then :
6223  $as_echo_n "(cached) " >&6
6224else
6225  case $CUT in
6226  [\\/]* | ?:[\\/]*)
6227  ac_cv_path_CUT="$CUT" # 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_CUT="$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
6248CUT=$ac_cv_path_CUT
6249if test -n "$CUT"; then
6250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6251$as_echo "$CUT" >&6; }
6252else
6253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254$as_echo "no" >&6; }
6255fi
6256
6257
6258  test -n "$CUT" && break
6259done
6260
6261  else
6262    # The variable is set, but is it from the command line or the environment?
6263
6264    # Try to remove the string !CUT! from our list.
6265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6267      # If it failed, the variable was not from the command line. Ignore it,
6268      # but warn the user (except for BASH, which is always set by the calling BASH).
6269      if test "xCUT" != xBASH; then
6270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6271$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6272      fi
6273      # Try to locate tool using the code snippet
6274      for ac_prog in cut
6275do
6276  # Extract the first word of "$ac_prog", so it can be a program name with args.
6277set dummy $ac_prog; 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_CUT+:} false; then :
6281  $as_echo_n "(cached) " >&6
6282else
6283  case $CUT in
6284  [\\/]* | ?:[\\/]*)
6285  ac_cv_path_CUT="$CUT" # 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_CUT="$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
6306CUT=$ac_cv_path_CUT
6307if test -n "$CUT"; then
6308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6309$as_echo "$CUT" >&6; }
6310else
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6312$as_echo "no" >&6; }
6313fi
6314
6315
6316  test -n "$CUT" && break
6317done
6318
6319    else
6320      # If it succeeded, then it was overridden by the user. We will use it
6321      # for the tool.
6322
6323      # First remove it from the list of overridden variables, so we can test
6324      # for unknown variables in the end.
6325      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6326
6327      # Check if we try to supply an empty value
6328      if test "x$CUT" = x; then
6329        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6330$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6331        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6332$as_echo_n "checking for CUT... " >&6; }
6333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6334$as_echo "disabled" >&6; }
6335      else
6336        # Check if the provided tool contains a complete path.
6337        tool_specified="$CUT"
6338        tool_basename="${tool_specified##*/}"
6339        if test "x$tool_basename" = "x$tool_specified"; then
6340          # A command without a complete path is provided, search $PATH.
6341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6342$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6343          # Extract the first word of "$tool_basename", so it can be a program name with args.
6344set dummy $tool_basename; ac_word=$2
6345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6346$as_echo_n "checking for $ac_word... " >&6; }
6347if ${ac_cv_path_CUT+:} false; then :
6348  $as_echo_n "(cached) " >&6
6349else
6350  case $CUT in
6351  [\\/]* | ?:[\\/]*)
6352  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6353  ;;
6354  *)
6355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6356for as_dir in $PATH
6357do
6358  IFS=$as_save_IFS
6359  test -z "$as_dir" && as_dir=.
6360    for ac_exec_ext in '' $ac_executable_extensions; do
6361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6362    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6364    break 2
6365  fi
6366done
6367  done
6368IFS=$as_save_IFS
6369
6370  ;;
6371esac
6372fi
6373CUT=$ac_cv_path_CUT
6374if test -n "$CUT"; then
6375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6376$as_echo "$CUT" >&6; }
6377else
6378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6379$as_echo "no" >&6; }
6380fi
6381
6382
6383          if test "x$CUT" = x; then
6384            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6385          fi
6386        else
6387          # Otherwise we believe it is a complete path. Use it as it is.
6388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6389$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6390          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6391$as_echo_n "checking for CUT... " >&6; }
6392          if test ! -x "$tool_specified"; then
6393            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6394$as_echo "not found" >&6; }
6395            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6396          fi
6397          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6398$as_echo "$tool_specified" >&6; }
6399        fi
6400      fi
6401    fi
6402
6403  fi
6404
6405
6406
6407  if test "x$CUT" = x; then
6408    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6409  fi
6410
6411
6412
6413
6414
6415  # Publish this variable in the help.
6416
6417
6418  if [ -z "${DATE+x}" ]; then
6419    # The variable is not set by user, try to locate tool using the code snippet
6420    for ac_prog in date
6421do
6422  # Extract the first word of "$ac_prog", so it can be a program name with args.
6423set dummy $ac_prog; ac_word=$2
6424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6425$as_echo_n "checking for $ac_word... " >&6; }
6426if ${ac_cv_path_DATE+:} false; then :
6427  $as_echo_n "(cached) " >&6
6428else
6429  case $DATE in
6430  [\\/]* | ?:[\\/]*)
6431  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6432  ;;
6433  *)
6434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6435for as_dir in $PATH
6436do
6437  IFS=$as_save_IFS
6438  test -z "$as_dir" && as_dir=.
6439    for ac_exec_ext in '' $ac_executable_extensions; do
6440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6441    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6443    break 2
6444  fi
6445done
6446  done
6447IFS=$as_save_IFS
6448
6449  ;;
6450esac
6451fi
6452DATE=$ac_cv_path_DATE
6453if test -n "$DATE"; then
6454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6455$as_echo "$DATE" >&6; }
6456else
6457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6458$as_echo "no" >&6; }
6459fi
6460
6461
6462  test -n "$DATE" && break
6463done
6464
6465  else
6466    # The variable is set, but is it from the command line or the environment?
6467
6468    # Try to remove the string !DATE! from our list.
6469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6471      # If it failed, the variable was not from the command line. Ignore it,
6472      # but warn the user (except for BASH, which is always set by the calling BASH).
6473      if test "xDATE" != xBASH; then
6474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6475$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6476      fi
6477      # Try to locate tool using the code snippet
6478      for ac_prog in date
6479do
6480  # Extract the first word of "$ac_prog", so it can be a program name with args.
6481set dummy $ac_prog; ac_word=$2
6482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6483$as_echo_n "checking for $ac_word... " >&6; }
6484if ${ac_cv_path_DATE+:} false; then :
6485  $as_echo_n "(cached) " >&6
6486else
6487  case $DATE in
6488  [\\/]* | ?:[\\/]*)
6489  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6490  ;;
6491  *)
6492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6493for as_dir in $PATH
6494do
6495  IFS=$as_save_IFS
6496  test -z "$as_dir" && as_dir=.
6497    for ac_exec_ext in '' $ac_executable_extensions; do
6498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6499    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6501    break 2
6502  fi
6503done
6504  done
6505IFS=$as_save_IFS
6506
6507  ;;
6508esac
6509fi
6510DATE=$ac_cv_path_DATE
6511if test -n "$DATE"; then
6512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6513$as_echo "$DATE" >&6; }
6514else
6515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6516$as_echo "no" >&6; }
6517fi
6518
6519
6520  test -n "$DATE" && break
6521done
6522
6523    else
6524      # If it succeeded, then it was overridden by the user. We will use it
6525      # for the tool.
6526
6527      # First remove it from the list of overridden variables, so we can test
6528      # for unknown variables in the end.
6529      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6530
6531      # Check if we try to supply an empty value
6532      if test "x$DATE" = x; then
6533        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6534$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6535        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6536$as_echo_n "checking for DATE... " >&6; }
6537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6538$as_echo "disabled" >&6; }
6539      else
6540        # Check if the provided tool contains a complete path.
6541        tool_specified="$DATE"
6542        tool_basename="${tool_specified##*/}"
6543        if test "x$tool_basename" = "x$tool_specified"; then
6544          # A command without a complete path is provided, search $PATH.
6545          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6546$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6547          # Extract the first word of "$tool_basename", so it can be a program name with args.
6548set dummy $tool_basename; ac_word=$2
6549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6550$as_echo_n "checking for $ac_word... " >&6; }
6551if ${ac_cv_path_DATE+:} false; then :
6552  $as_echo_n "(cached) " >&6
6553else
6554  case $DATE in
6555  [\\/]* | ?:[\\/]*)
6556  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6557  ;;
6558  *)
6559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6560for as_dir in $PATH
6561do
6562  IFS=$as_save_IFS
6563  test -z "$as_dir" && as_dir=.
6564    for ac_exec_ext in '' $ac_executable_extensions; do
6565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6566    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6568    break 2
6569  fi
6570done
6571  done
6572IFS=$as_save_IFS
6573
6574  ;;
6575esac
6576fi
6577DATE=$ac_cv_path_DATE
6578if test -n "$DATE"; then
6579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6580$as_echo "$DATE" >&6; }
6581else
6582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6583$as_echo "no" >&6; }
6584fi
6585
6586
6587          if test "x$DATE" = x; then
6588            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6589          fi
6590        else
6591          # Otherwise we believe it is a complete path. Use it as it is.
6592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6593$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6594          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6595$as_echo_n "checking for DATE... " >&6; }
6596          if test ! -x "$tool_specified"; then
6597            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6598$as_echo "not found" >&6; }
6599            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6600          fi
6601          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6602$as_echo "$tool_specified" >&6; }
6603        fi
6604      fi
6605    fi
6606
6607  fi
6608
6609
6610
6611  if test "x$DATE" = x; then
6612    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6613  fi
6614
6615
6616
6617
6618
6619  # Publish this variable in the help.
6620
6621
6622  if [ -z "${DIFF+x}" ]; then
6623    # The variable is not set by user, try to locate tool using the code snippet
6624    for ac_prog in gdiff diff
6625do
6626  # Extract the first word of "$ac_prog", so it can be a program name with args.
6627set dummy $ac_prog; ac_word=$2
6628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6629$as_echo_n "checking for $ac_word... " >&6; }
6630if ${ac_cv_path_DIFF+:} false; then :
6631  $as_echo_n "(cached) " >&6
6632else
6633  case $DIFF in
6634  [\\/]* | ?:[\\/]*)
6635  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6636  ;;
6637  *)
6638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6639for as_dir in $PATH
6640do
6641  IFS=$as_save_IFS
6642  test -z "$as_dir" && as_dir=.
6643    for ac_exec_ext in '' $ac_executable_extensions; do
6644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6645    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6647    break 2
6648  fi
6649done
6650  done
6651IFS=$as_save_IFS
6652
6653  ;;
6654esac
6655fi
6656DIFF=$ac_cv_path_DIFF
6657if test -n "$DIFF"; then
6658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6659$as_echo "$DIFF" >&6; }
6660else
6661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6662$as_echo "no" >&6; }
6663fi
6664
6665
6666  test -n "$DIFF" && break
6667done
6668
6669  else
6670    # The variable is set, but is it from the command line or the environment?
6671
6672    # Try to remove the string !DIFF! from our list.
6673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6675      # If it failed, the variable was not from the command line. Ignore it,
6676      # but warn the user (except for BASH, which is always set by the calling BASH).
6677      if test "xDIFF" != xBASH; then
6678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6679$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6680      fi
6681      # Try to locate tool using the code snippet
6682      for ac_prog in gdiff diff
6683do
6684  # Extract the first word of "$ac_prog", so it can be a program name with args.
6685set dummy $ac_prog; ac_word=$2
6686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6687$as_echo_n "checking for $ac_word... " >&6; }
6688if ${ac_cv_path_DIFF+:} false; then :
6689  $as_echo_n "(cached) " >&6
6690else
6691  case $DIFF in
6692  [\\/]* | ?:[\\/]*)
6693  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6694  ;;
6695  *)
6696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6697for as_dir in $PATH
6698do
6699  IFS=$as_save_IFS
6700  test -z "$as_dir" && as_dir=.
6701    for ac_exec_ext in '' $ac_executable_extensions; do
6702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6703    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6705    break 2
6706  fi
6707done
6708  done
6709IFS=$as_save_IFS
6710
6711  ;;
6712esac
6713fi
6714DIFF=$ac_cv_path_DIFF
6715if test -n "$DIFF"; then
6716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6717$as_echo "$DIFF" >&6; }
6718else
6719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6720$as_echo "no" >&6; }
6721fi
6722
6723
6724  test -n "$DIFF" && break
6725done
6726
6727    else
6728      # If it succeeded, then it was overridden by the user. We will use it
6729      # for the tool.
6730
6731      # First remove it from the list of overridden variables, so we can test
6732      # for unknown variables in the end.
6733      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6734
6735      # Check if we try to supply an empty value
6736      if test "x$DIFF" = x; then
6737        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6738$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6739        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6740$as_echo_n "checking for DIFF... " >&6; }
6741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6742$as_echo "disabled" >&6; }
6743      else
6744        # Check if the provided tool contains a complete path.
6745        tool_specified="$DIFF"
6746        tool_basename="${tool_specified##*/}"
6747        if test "x$tool_basename" = "x$tool_specified"; then
6748          # A command without a complete path is provided, search $PATH.
6749          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6750$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6751          # Extract the first word of "$tool_basename", so it can be a program name with args.
6752set dummy $tool_basename; ac_word=$2
6753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6754$as_echo_n "checking for $ac_word... " >&6; }
6755if ${ac_cv_path_DIFF+:} false; then :
6756  $as_echo_n "(cached) " >&6
6757else
6758  case $DIFF in
6759  [\\/]* | ?:[\\/]*)
6760  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6761  ;;
6762  *)
6763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6764for as_dir in $PATH
6765do
6766  IFS=$as_save_IFS
6767  test -z "$as_dir" && as_dir=.
6768    for ac_exec_ext in '' $ac_executable_extensions; do
6769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6770    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6772    break 2
6773  fi
6774done
6775  done
6776IFS=$as_save_IFS
6777
6778  ;;
6779esac
6780fi
6781DIFF=$ac_cv_path_DIFF
6782if test -n "$DIFF"; then
6783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6784$as_echo "$DIFF" >&6; }
6785else
6786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6787$as_echo "no" >&6; }
6788fi
6789
6790
6791          if test "x$DIFF" = x; then
6792            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6793          fi
6794        else
6795          # Otherwise we believe it is a complete path. Use it as it is.
6796          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6797$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6798          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6799$as_echo_n "checking for DIFF... " >&6; }
6800          if test ! -x "$tool_specified"; then
6801            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6802$as_echo "not found" >&6; }
6803            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6804          fi
6805          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6806$as_echo "$tool_specified" >&6; }
6807        fi
6808      fi
6809    fi
6810
6811  fi
6812
6813
6814
6815  if test "x$DIFF" = x; then
6816    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6817  fi
6818
6819
6820
6821
6822
6823  # Publish this variable in the help.
6824
6825
6826  if [ -z "${DIRNAME+x}" ]; then
6827    # The variable is not set by user, try to locate tool using the code snippet
6828    for ac_prog in dirname
6829do
6830  # Extract the first word of "$ac_prog", so it can be a program name with args.
6831set dummy $ac_prog; ac_word=$2
6832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6833$as_echo_n "checking for $ac_word... " >&6; }
6834if ${ac_cv_path_DIRNAME+:} false; then :
6835  $as_echo_n "(cached) " >&6
6836else
6837  case $DIRNAME in
6838  [\\/]* | ?:[\\/]*)
6839  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6840  ;;
6841  *)
6842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6843for as_dir in $PATH
6844do
6845  IFS=$as_save_IFS
6846  test -z "$as_dir" && as_dir=.
6847    for ac_exec_ext in '' $ac_executable_extensions; do
6848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6849    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6851    break 2
6852  fi
6853done
6854  done
6855IFS=$as_save_IFS
6856
6857  ;;
6858esac
6859fi
6860DIRNAME=$ac_cv_path_DIRNAME
6861if test -n "$DIRNAME"; then
6862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6863$as_echo "$DIRNAME" >&6; }
6864else
6865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6866$as_echo "no" >&6; }
6867fi
6868
6869
6870  test -n "$DIRNAME" && break
6871done
6872
6873  else
6874    # The variable is set, but is it from the command line or the environment?
6875
6876    # Try to remove the string !DIRNAME! from our list.
6877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6879      # If it failed, the variable was not from the command line. Ignore it,
6880      # but warn the user (except for BASH, which is always set by the calling BASH).
6881      if test "xDIRNAME" != xBASH; then
6882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6883$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6884      fi
6885      # Try to locate tool using the code snippet
6886      for ac_prog in dirname
6887do
6888  # Extract the first word of "$ac_prog", so it can be a program name with args.
6889set dummy $ac_prog; ac_word=$2
6890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6891$as_echo_n "checking for $ac_word... " >&6; }
6892if ${ac_cv_path_DIRNAME+:} false; then :
6893  $as_echo_n "(cached) " >&6
6894else
6895  case $DIRNAME in
6896  [\\/]* | ?:[\\/]*)
6897  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6898  ;;
6899  *)
6900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6901for as_dir in $PATH
6902do
6903  IFS=$as_save_IFS
6904  test -z "$as_dir" && as_dir=.
6905    for ac_exec_ext in '' $ac_executable_extensions; do
6906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6907    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6909    break 2
6910  fi
6911done
6912  done
6913IFS=$as_save_IFS
6914
6915  ;;
6916esac
6917fi
6918DIRNAME=$ac_cv_path_DIRNAME
6919if test -n "$DIRNAME"; then
6920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6921$as_echo "$DIRNAME" >&6; }
6922else
6923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6924$as_echo "no" >&6; }
6925fi
6926
6927
6928  test -n "$DIRNAME" && break
6929done
6930
6931    else
6932      # If it succeeded, then it was overridden by the user. We will use it
6933      # for the tool.
6934
6935      # First remove it from the list of overridden variables, so we can test
6936      # for unknown variables in the end.
6937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6938
6939      # Check if we try to supply an empty value
6940      if test "x$DIRNAME" = x; then
6941        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6942$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6944$as_echo_n "checking for DIRNAME... " >&6; }
6945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6946$as_echo "disabled" >&6; }
6947      else
6948        # Check if the provided tool contains a complete path.
6949        tool_specified="$DIRNAME"
6950        tool_basename="${tool_specified##*/}"
6951        if test "x$tool_basename" = "x$tool_specified"; then
6952          # A command without a complete path is provided, search $PATH.
6953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6954$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6955          # Extract the first word of "$tool_basename", so it can be a program name with args.
6956set dummy $tool_basename; ac_word=$2
6957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6958$as_echo_n "checking for $ac_word... " >&6; }
6959if ${ac_cv_path_DIRNAME+:} false; then :
6960  $as_echo_n "(cached) " >&6
6961else
6962  case $DIRNAME in
6963  [\\/]* | ?:[\\/]*)
6964  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6965  ;;
6966  *)
6967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6968for as_dir in $PATH
6969do
6970  IFS=$as_save_IFS
6971  test -z "$as_dir" && as_dir=.
6972    for ac_exec_ext in '' $ac_executable_extensions; do
6973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6974    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6976    break 2
6977  fi
6978done
6979  done
6980IFS=$as_save_IFS
6981
6982  ;;
6983esac
6984fi
6985DIRNAME=$ac_cv_path_DIRNAME
6986if test -n "$DIRNAME"; then
6987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6988$as_echo "$DIRNAME" >&6; }
6989else
6990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6991$as_echo "no" >&6; }
6992fi
6993
6994
6995          if test "x$DIRNAME" = x; then
6996            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6997          fi
6998        else
6999          # Otherwise we believe it is a complete path. Use it as it is.
7000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7001$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7002          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7003$as_echo_n "checking for DIRNAME... " >&6; }
7004          if test ! -x "$tool_specified"; then
7005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7006$as_echo "not found" >&6; }
7007            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7008          fi
7009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7010$as_echo "$tool_specified" >&6; }
7011        fi
7012      fi
7013    fi
7014
7015  fi
7016
7017
7018
7019  if test "x$DIRNAME" = x; then
7020    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7021  fi
7022
7023
7024
7025
7026
7027  # Publish this variable in the help.
7028
7029
7030  if [ -z "${ECHO+x}" ]; then
7031    # The variable is not set by user, try to locate tool using the code snippet
7032    for ac_prog in echo
7033do
7034  # Extract the first word of "$ac_prog", so it can be a program name with args.
7035set dummy $ac_prog; ac_word=$2
7036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7037$as_echo_n "checking for $ac_word... " >&6; }
7038if ${ac_cv_path_ECHO+:} false; then :
7039  $as_echo_n "(cached) " >&6
7040else
7041  case $ECHO in
7042  [\\/]* | ?:[\\/]*)
7043  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7044  ;;
7045  *)
7046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7047for as_dir in $PATH
7048do
7049  IFS=$as_save_IFS
7050  test -z "$as_dir" && as_dir=.
7051    for ac_exec_ext in '' $ac_executable_extensions; do
7052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7053    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7055    break 2
7056  fi
7057done
7058  done
7059IFS=$as_save_IFS
7060
7061  ;;
7062esac
7063fi
7064ECHO=$ac_cv_path_ECHO
7065if test -n "$ECHO"; then
7066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7067$as_echo "$ECHO" >&6; }
7068else
7069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7070$as_echo "no" >&6; }
7071fi
7072
7073
7074  test -n "$ECHO" && break
7075done
7076
7077  else
7078    # The variable is set, but is it from the command line or the environment?
7079
7080    # Try to remove the string !ECHO! from our list.
7081    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7082    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7083      # If it failed, the variable was not from the command line. Ignore it,
7084      # but warn the user (except for BASH, which is always set by the calling BASH).
7085      if test "xECHO" != xBASH; then
7086        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7087$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7088      fi
7089      # Try to locate tool using the code snippet
7090      for ac_prog in echo
7091do
7092  # Extract the first word of "$ac_prog", so it can be a program name with args.
7093set dummy $ac_prog; ac_word=$2
7094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7095$as_echo_n "checking for $ac_word... " >&6; }
7096if ${ac_cv_path_ECHO+:} false; then :
7097  $as_echo_n "(cached) " >&6
7098else
7099  case $ECHO in
7100  [\\/]* | ?:[\\/]*)
7101  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7102  ;;
7103  *)
7104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7105for as_dir in $PATH
7106do
7107  IFS=$as_save_IFS
7108  test -z "$as_dir" && as_dir=.
7109    for ac_exec_ext in '' $ac_executable_extensions; do
7110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7111    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7113    break 2
7114  fi
7115done
7116  done
7117IFS=$as_save_IFS
7118
7119  ;;
7120esac
7121fi
7122ECHO=$ac_cv_path_ECHO
7123if test -n "$ECHO"; then
7124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7125$as_echo "$ECHO" >&6; }
7126else
7127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7128$as_echo "no" >&6; }
7129fi
7130
7131
7132  test -n "$ECHO" && break
7133done
7134
7135    else
7136      # If it succeeded, then it was overridden by the user. We will use it
7137      # for the tool.
7138
7139      # First remove it from the list of overridden variables, so we can test
7140      # for unknown variables in the end.
7141      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7142
7143      # Check if we try to supply an empty value
7144      if test "x$ECHO" = x; then
7145        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7146$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7148$as_echo_n "checking for ECHO... " >&6; }
7149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7150$as_echo "disabled" >&6; }
7151      else
7152        # Check if the provided tool contains a complete path.
7153        tool_specified="$ECHO"
7154        tool_basename="${tool_specified##*/}"
7155        if test "x$tool_basename" = "x$tool_specified"; then
7156          # A command without a complete path is provided, search $PATH.
7157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7158$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7159          # Extract the first word of "$tool_basename", so it can be a program name with args.
7160set dummy $tool_basename; ac_word=$2
7161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7162$as_echo_n "checking for $ac_word... " >&6; }
7163if ${ac_cv_path_ECHO+:} false; then :
7164  $as_echo_n "(cached) " >&6
7165else
7166  case $ECHO in
7167  [\\/]* | ?:[\\/]*)
7168  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7169  ;;
7170  *)
7171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7172for as_dir in $PATH
7173do
7174  IFS=$as_save_IFS
7175  test -z "$as_dir" && as_dir=.
7176    for ac_exec_ext in '' $ac_executable_extensions; do
7177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7178    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7180    break 2
7181  fi
7182done
7183  done
7184IFS=$as_save_IFS
7185
7186  ;;
7187esac
7188fi
7189ECHO=$ac_cv_path_ECHO
7190if test -n "$ECHO"; then
7191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7192$as_echo "$ECHO" >&6; }
7193else
7194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7195$as_echo "no" >&6; }
7196fi
7197
7198
7199          if test "x$ECHO" = x; then
7200            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7201          fi
7202        else
7203          # Otherwise we believe it is a complete path. Use it as it is.
7204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7205$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7206          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7207$as_echo_n "checking for ECHO... " >&6; }
7208          if test ! -x "$tool_specified"; then
7209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7210$as_echo "not found" >&6; }
7211            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7212          fi
7213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7214$as_echo "$tool_specified" >&6; }
7215        fi
7216      fi
7217    fi
7218
7219  fi
7220
7221
7222
7223  if test "x$ECHO" = x; then
7224    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7225  fi
7226
7227
7228
7229
7230
7231  # Publish this variable in the help.
7232
7233
7234  if [ -z "${EXPR+x}" ]; then
7235    # The variable is not set by user, try to locate tool using the code snippet
7236    for ac_prog in expr
7237do
7238  # Extract the first word of "$ac_prog", so it can be a program name with args.
7239set dummy $ac_prog; ac_word=$2
7240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7241$as_echo_n "checking for $ac_word... " >&6; }
7242if ${ac_cv_path_EXPR+:} false; then :
7243  $as_echo_n "(cached) " >&6
7244else
7245  case $EXPR in
7246  [\\/]* | ?:[\\/]*)
7247  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7248  ;;
7249  *)
7250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7251for as_dir in $PATH
7252do
7253  IFS=$as_save_IFS
7254  test -z "$as_dir" && as_dir=.
7255    for ac_exec_ext in '' $ac_executable_extensions; do
7256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7257    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7259    break 2
7260  fi
7261done
7262  done
7263IFS=$as_save_IFS
7264
7265  ;;
7266esac
7267fi
7268EXPR=$ac_cv_path_EXPR
7269if test -n "$EXPR"; then
7270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7271$as_echo "$EXPR" >&6; }
7272else
7273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7274$as_echo "no" >&6; }
7275fi
7276
7277
7278  test -n "$EXPR" && break
7279done
7280
7281  else
7282    # The variable is set, but is it from the command line or the environment?
7283
7284    # Try to remove the string !EXPR! from our list.
7285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7287      # If it failed, the variable was not from the command line. Ignore it,
7288      # but warn the user (except for BASH, which is always set by the calling BASH).
7289      if test "xEXPR" != xBASH; then
7290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7291$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7292      fi
7293      # Try to locate tool using the code snippet
7294      for ac_prog in expr
7295do
7296  # Extract the first word of "$ac_prog", so it can be a program name with args.
7297set dummy $ac_prog; ac_word=$2
7298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7299$as_echo_n "checking for $ac_word... " >&6; }
7300if ${ac_cv_path_EXPR+:} false; then :
7301  $as_echo_n "(cached) " >&6
7302else
7303  case $EXPR in
7304  [\\/]* | ?:[\\/]*)
7305  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7306  ;;
7307  *)
7308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7309for as_dir in $PATH
7310do
7311  IFS=$as_save_IFS
7312  test -z "$as_dir" && as_dir=.
7313    for ac_exec_ext in '' $ac_executable_extensions; do
7314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7315    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7317    break 2
7318  fi
7319done
7320  done
7321IFS=$as_save_IFS
7322
7323  ;;
7324esac
7325fi
7326EXPR=$ac_cv_path_EXPR
7327if test -n "$EXPR"; then
7328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7329$as_echo "$EXPR" >&6; }
7330else
7331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7332$as_echo "no" >&6; }
7333fi
7334
7335
7336  test -n "$EXPR" && break
7337done
7338
7339    else
7340      # If it succeeded, then it was overridden by the user. We will use it
7341      # for the tool.
7342
7343      # First remove it from the list of overridden variables, so we can test
7344      # for unknown variables in the end.
7345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7346
7347      # Check if we try to supply an empty value
7348      if test "x$EXPR" = x; then
7349        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7350$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7352$as_echo_n "checking for EXPR... " >&6; }
7353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7354$as_echo "disabled" >&6; }
7355      else
7356        # Check if the provided tool contains a complete path.
7357        tool_specified="$EXPR"
7358        tool_basename="${tool_specified##*/}"
7359        if test "x$tool_basename" = "x$tool_specified"; then
7360          # A command without a complete path is provided, search $PATH.
7361          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7362$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7363          # Extract the first word of "$tool_basename", so it can be a program name with args.
7364set dummy $tool_basename; ac_word=$2
7365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7366$as_echo_n "checking for $ac_word... " >&6; }
7367if ${ac_cv_path_EXPR+:} false; then :
7368  $as_echo_n "(cached) " >&6
7369else
7370  case $EXPR in
7371  [\\/]* | ?:[\\/]*)
7372  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7373  ;;
7374  *)
7375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7376for as_dir in $PATH
7377do
7378  IFS=$as_save_IFS
7379  test -z "$as_dir" && as_dir=.
7380    for ac_exec_ext in '' $ac_executable_extensions; do
7381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7382    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7384    break 2
7385  fi
7386done
7387  done
7388IFS=$as_save_IFS
7389
7390  ;;
7391esac
7392fi
7393EXPR=$ac_cv_path_EXPR
7394if test -n "$EXPR"; then
7395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7396$as_echo "$EXPR" >&6; }
7397else
7398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7399$as_echo "no" >&6; }
7400fi
7401
7402
7403          if test "x$EXPR" = x; then
7404            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7405          fi
7406        else
7407          # Otherwise we believe it is a complete path. Use it as it is.
7408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7409$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7410          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7411$as_echo_n "checking for EXPR... " >&6; }
7412          if test ! -x "$tool_specified"; then
7413            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7414$as_echo "not found" >&6; }
7415            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7416          fi
7417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7418$as_echo "$tool_specified" >&6; }
7419        fi
7420      fi
7421    fi
7422
7423  fi
7424
7425
7426
7427  if test "x$EXPR" = x; then
7428    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7429  fi
7430
7431
7432
7433
7434
7435  # Publish this variable in the help.
7436
7437
7438  if [ -z "${FILE+x}" ]; then
7439    # The variable is not set by user, try to locate tool using the code snippet
7440    for ac_prog in file
7441do
7442  # Extract the first word of "$ac_prog", so it can be a program name with args.
7443set dummy $ac_prog; ac_word=$2
7444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7445$as_echo_n "checking for $ac_word... " >&6; }
7446if ${ac_cv_path_FILE+:} false; then :
7447  $as_echo_n "(cached) " >&6
7448else
7449  case $FILE in
7450  [\\/]* | ?:[\\/]*)
7451  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7452  ;;
7453  *)
7454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7455for as_dir in $PATH
7456do
7457  IFS=$as_save_IFS
7458  test -z "$as_dir" && as_dir=.
7459    for ac_exec_ext in '' $ac_executable_extensions; do
7460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7461    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7463    break 2
7464  fi
7465done
7466  done
7467IFS=$as_save_IFS
7468
7469  ;;
7470esac
7471fi
7472FILE=$ac_cv_path_FILE
7473if test -n "$FILE"; then
7474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7475$as_echo "$FILE" >&6; }
7476else
7477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7478$as_echo "no" >&6; }
7479fi
7480
7481
7482  test -n "$FILE" && break
7483done
7484
7485  else
7486    # The variable is set, but is it from the command line or the environment?
7487
7488    # Try to remove the string !FILE! from our list.
7489    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7490    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7491      # If it failed, the variable was not from the command line. Ignore it,
7492      # but warn the user (except for BASH, which is always set by the calling BASH).
7493      if test "xFILE" != xBASH; then
7494        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7495$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7496      fi
7497      # Try to locate tool using the code snippet
7498      for ac_prog in file
7499do
7500  # Extract the first word of "$ac_prog", so it can be a program name with args.
7501set dummy $ac_prog; ac_word=$2
7502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7503$as_echo_n "checking for $ac_word... " >&6; }
7504if ${ac_cv_path_FILE+:} false; then :
7505  $as_echo_n "(cached) " >&6
7506else
7507  case $FILE in
7508  [\\/]* | ?:[\\/]*)
7509  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7510  ;;
7511  *)
7512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7513for as_dir in $PATH
7514do
7515  IFS=$as_save_IFS
7516  test -z "$as_dir" && as_dir=.
7517    for ac_exec_ext in '' $ac_executable_extensions; do
7518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7519    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7521    break 2
7522  fi
7523done
7524  done
7525IFS=$as_save_IFS
7526
7527  ;;
7528esac
7529fi
7530FILE=$ac_cv_path_FILE
7531if test -n "$FILE"; then
7532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7533$as_echo "$FILE" >&6; }
7534else
7535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7536$as_echo "no" >&6; }
7537fi
7538
7539
7540  test -n "$FILE" && break
7541done
7542
7543    else
7544      # If it succeeded, then it was overridden by the user. We will use it
7545      # for the tool.
7546
7547      # First remove it from the list of overridden variables, so we can test
7548      # for unknown variables in the end.
7549      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7550
7551      # Check if we try to supply an empty value
7552      if test "x$FILE" = x; then
7553        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7554$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7556$as_echo_n "checking for FILE... " >&6; }
7557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7558$as_echo "disabled" >&6; }
7559      else
7560        # Check if the provided tool contains a complete path.
7561        tool_specified="$FILE"
7562        tool_basename="${tool_specified##*/}"
7563        if test "x$tool_basename" = "x$tool_specified"; then
7564          # A command without a complete path is provided, search $PATH.
7565          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7566$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7567          # Extract the first word of "$tool_basename", so it can be a program name with args.
7568set dummy $tool_basename; ac_word=$2
7569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7570$as_echo_n "checking for $ac_word... " >&6; }
7571if ${ac_cv_path_FILE+:} false; then :
7572  $as_echo_n "(cached) " >&6
7573else
7574  case $FILE in
7575  [\\/]* | ?:[\\/]*)
7576  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7577  ;;
7578  *)
7579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7580for as_dir in $PATH
7581do
7582  IFS=$as_save_IFS
7583  test -z "$as_dir" && as_dir=.
7584    for ac_exec_ext in '' $ac_executable_extensions; do
7585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7586    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7588    break 2
7589  fi
7590done
7591  done
7592IFS=$as_save_IFS
7593
7594  ;;
7595esac
7596fi
7597FILE=$ac_cv_path_FILE
7598if test -n "$FILE"; then
7599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7600$as_echo "$FILE" >&6; }
7601else
7602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7603$as_echo "no" >&6; }
7604fi
7605
7606
7607          if test "x$FILE" = x; then
7608            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7609          fi
7610        else
7611          # Otherwise we believe it is a complete path. Use it as it is.
7612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7613$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7614          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7615$as_echo_n "checking for FILE... " >&6; }
7616          if test ! -x "$tool_specified"; then
7617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7618$as_echo "not found" >&6; }
7619            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7620          fi
7621          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7622$as_echo "$tool_specified" >&6; }
7623        fi
7624      fi
7625    fi
7626
7627  fi
7628
7629
7630
7631  if test "x$FILE" = x; then
7632    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7633  fi
7634
7635
7636
7637
7638
7639  # Publish this variable in the help.
7640
7641
7642  if [ -z "${FIND+x}" ]; then
7643    # The variable is not set by user, try to locate tool using the code snippet
7644    for ac_prog in find
7645do
7646  # Extract the first word of "$ac_prog", so it can be a program name with args.
7647set dummy $ac_prog; ac_word=$2
7648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7649$as_echo_n "checking for $ac_word... " >&6; }
7650if ${ac_cv_path_FIND+:} false; then :
7651  $as_echo_n "(cached) " >&6
7652else
7653  case $FIND in
7654  [\\/]* | ?:[\\/]*)
7655  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7656  ;;
7657  *)
7658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7659for as_dir in $PATH
7660do
7661  IFS=$as_save_IFS
7662  test -z "$as_dir" && as_dir=.
7663    for ac_exec_ext in '' $ac_executable_extensions; do
7664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7665    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7667    break 2
7668  fi
7669done
7670  done
7671IFS=$as_save_IFS
7672
7673  ;;
7674esac
7675fi
7676FIND=$ac_cv_path_FIND
7677if test -n "$FIND"; then
7678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7679$as_echo "$FIND" >&6; }
7680else
7681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7682$as_echo "no" >&6; }
7683fi
7684
7685
7686  test -n "$FIND" && break
7687done
7688
7689  else
7690    # The variable is set, but is it from the command line or the environment?
7691
7692    # Try to remove the string !FIND! from our list.
7693    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7694    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7695      # If it failed, the variable was not from the command line. Ignore it,
7696      # but warn the user (except for BASH, which is always set by the calling BASH).
7697      if test "xFIND" != xBASH; then
7698        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7699$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7700      fi
7701      # Try to locate tool using the code snippet
7702      for ac_prog in find
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_FIND+:} false; then :
7709  $as_echo_n "(cached) " >&6
7710else
7711  case $FIND in
7712  [\\/]* | ?:[\\/]*)
7713  ac_cv_path_FIND="$FIND" # 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_FIND="$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
7734FIND=$ac_cv_path_FIND
7735if test -n "$FIND"; then
7736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7737$as_echo "$FIND" >&6; }
7738else
7739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740$as_echo "no" >&6; }
7741fi
7742
7743
7744  test -n "$FIND" && break
7745done
7746
7747    else
7748      # If it succeeded, then it was overridden by the user. We will use it
7749      # for the tool.
7750
7751      # First remove it from the list of overridden variables, so we can test
7752      # for unknown variables in the end.
7753      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7754
7755      # Check if we try to supply an empty value
7756      if test "x$FIND" = x; then
7757        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7758$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7760$as_echo_n "checking for FIND... " >&6; }
7761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7762$as_echo "disabled" >&6; }
7763      else
7764        # Check if the provided tool contains a complete path.
7765        tool_specified="$FIND"
7766        tool_basename="${tool_specified##*/}"
7767        if test "x$tool_basename" = "x$tool_specified"; then
7768          # A command without a complete path is provided, search $PATH.
7769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7770$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7771          # Extract the first word of "$tool_basename", so it can be a program name with args.
7772set dummy $tool_basename; ac_word=$2
7773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7774$as_echo_n "checking for $ac_word... " >&6; }
7775if ${ac_cv_path_FIND+:} false; then :
7776  $as_echo_n "(cached) " >&6
7777else
7778  case $FIND in
7779  [\\/]* | ?:[\\/]*)
7780  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7781  ;;
7782  *)
7783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7784for as_dir in $PATH
7785do
7786  IFS=$as_save_IFS
7787  test -z "$as_dir" && as_dir=.
7788    for ac_exec_ext in '' $ac_executable_extensions; do
7789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7790    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7792    break 2
7793  fi
7794done
7795  done
7796IFS=$as_save_IFS
7797
7798  ;;
7799esac
7800fi
7801FIND=$ac_cv_path_FIND
7802if test -n "$FIND"; then
7803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7804$as_echo "$FIND" >&6; }
7805else
7806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7807$as_echo "no" >&6; }
7808fi
7809
7810
7811          if test "x$FIND" = x; then
7812            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7813          fi
7814        else
7815          # Otherwise we believe it is a complete path. Use it as it is.
7816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7817$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7818          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7819$as_echo_n "checking for FIND... " >&6; }
7820          if test ! -x "$tool_specified"; then
7821            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7822$as_echo "not found" >&6; }
7823            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7824          fi
7825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7826$as_echo "$tool_specified" >&6; }
7827        fi
7828      fi
7829    fi
7830
7831  fi
7832
7833
7834
7835  if test "x$FIND" = x; then
7836    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7837  fi
7838
7839
7840
7841
7842
7843  # Publish this variable in the help.
7844
7845
7846  if [ -z "${HEAD+x}" ]; then
7847    # The variable is not set by user, try to locate tool using the code snippet
7848    for ac_prog in head
7849do
7850  # Extract the first word of "$ac_prog", so it can be a program name with args.
7851set dummy $ac_prog; ac_word=$2
7852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7853$as_echo_n "checking for $ac_word... " >&6; }
7854if ${ac_cv_path_HEAD+:} false; then :
7855  $as_echo_n "(cached) " >&6
7856else
7857  case $HEAD in
7858  [\\/]* | ?:[\\/]*)
7859  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7860  ;;
7861  *)
7862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7863for as_dir in $PATH
7864do
7865  IFS=$as_save_IFS
7866  test -z "$as_dir" && as_dir=.
7867    for ac_exec_ext in '' $ac_executable_extensions; do
7868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7869    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7871    break 2
7872  fi
7873done
7874  done
7875IFS=$as_save_IFS
7876
7877  ;;
7878esac
7879fi
7880HEAD=$ac_cv_path_HEAD
7881if test -n "$HEAD"; then
7882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7883$as_echo "$HEAD" >&6; }
7884else
7885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7886$as_echo "no" >&6; }
7887fi
7888
7889
7890  test -n "$HEAD" && break
7891done
7892
7893  else
7894    # The variable is set, but is it from the command line or the environment?
7895
7896    # Try to remove the string !HEAD! from our list.
7897    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7898    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7899      # If it failed, the variable was not from the command line. Ignore it,
7900      # but warn the user (except for BASH, which is always set by the calling BASH).
7901      if test "xHEAD" != xBASH; then
7902        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7903$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7904      fi
7905      # Try to locate tool using the code snippet
7906      for ac_prog in head
7907do
7908  # Extract the first word of "$ac_prog", so it can be a program name with args.
7909set dummy $ac_prog; ac_word=$2
7910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7911$as_echo_n "checking for $ac_word... " >&6; }
7912if ${ac_cv_path_HEAD+:} false; then :
7913  $as_echo_n "(cached) " >&6
7914else
7915  case $HEAD in
7916  [\\/]* | ?:[\\/]*)
7917  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7918  ;;
7919  *)
7920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7921for as_dir in $PATH
7922do
7923  IFS=$as_save_IFS
7924  test -z "$as_dir" && as_dir=.
7925    for ac_exec_ext in '' $ac_executable_extensions; do
7926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7927    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7929    break 2
7930  fi
7931done
7932  done
7933IFS=$as_save_IFS
7934
7935  ;;
7936esac
7937fi
7938HEAD=$ac_cv_path_HEAD
7939if test -n "$HEAD"; then
7940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7941$as_echo "$HEAD" >&6; }
7942else
7943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7944$as_echo "no" >&6; }
7945fi
7946
7947
7948  test -n "$HEAD" && break
7949done
7950
7951    else
7952      # If it succeeded, then it was overridden by the user. We will use it
7953      # for the tool.
7954
7955      # First remove it from the list of overridden variables, so we can test
7956      # for unknown variables in the end.
7957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7958
7959      # Check if we try to supply an empty value
7960      if test "x$HEAD" = x; then
7961        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7962$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7964$as_echo_n "checking for HEAD... " >&6; }
7965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7966$as_echo "disabled" >&6; }
7967      else
7968        # Check if the provided tool contains a complete path.
7969        tool_specified="$HEAD"
7970        tool_basename="${tool_specified##*/}"
7971        if test "x$tool_basename" = "x$tool_specified"; then
7972          # A command without a complete path is provided, search $PATH.
7973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7974$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7975          # Extract the first word of "$tool_basename", so it can be a program name with args.
7976set dummy $tool_basename; ac_word=$2
7977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7978$as_echo_n "checking for $ac_word... " >&6; }
7979if ${ac_cv_path_HEAD+:} false; then :
7980  $as_echo_n "(cached) " >&6
7981else
7982  case $HEAD in
7983  [\\/]* | ?:[\\/]*)
7984  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7985  ;;
7986  *)
7987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7988for as_dir in $PATH
7989do
7990  IFS=$as_save_IFS
7991  test -z "$as_dir" && as_dir=.
7992    for ac_exec_ext in '' $ac_executable_extensions; do
7993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7994    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7996    break 2
7997  fi
7998done
7999  done
8000IFS=$as_save_IFS
8001
8002  ;;
8003esac
8004fi
8005HEAD=$ac_cv_path_HEAD
8006if test -n "$HEAD"; then
8007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8008$as_echo "$HEAD" >&6; }
8009else
8010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8011$as_echo "no" >&6; }
8012fi
8013
8014
8015          if test "x$HEAD" = x; then
8016            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8017          fi
8018        else
8019          # Otherwise we believe it is a complete path. Use it as it is.
8020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8021$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8022          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8023$as_echo_n "checking for HEAD... " >&6; }
8024          if test ! -x "$tool_specified"; then
8025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8026$as_echo "not found" >&6; }
8027            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8028          fi
8029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8030$as_echo "$tool_specified" >&6; }
8031        fi
8032      fi
8033    fi
8034
8035  fi
8036
8037
8038
8039  if test "x$HEAD" = x; then
8040    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8041  fi
8042
8043
8044
8045
8046
8047  # Publish this variable in the help.
8048
8049
8050  if [ -z "${LN+x}" ]; then
8051    # The variable is not set by user, try to locate tool using the code snippet
8052    for ac_prog in ln
8053do
8054  # Extract the first word of "$ac_prog", so it can be a program name with args.
8055set dummy $ac_prog; ac_word=$2
8056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8057$as_echo_n "checking for $ac_word... " >&6; }
8058if ${ac_cv_path_LN+:} false; then :
8059  $as_echo_n "(cached) " >&6
8060else
8061  case $LN in
8062  [\\/]* | ?:[\\/]*)
8063  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8064  ;;
8065  *)
8066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8067for as_dir in $PATH
8068do
8069  IFS=$as_save_IFS
8070  test -z "$as_dir" && as_dir=.
8071    for ac_exec_ext in '' $ac_executable_extensions; do
8072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8073    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8075    break 2
8076  fi
8077done
8078  done
8079IFS=$as_save_IFS
8080
8081  ;;
8082esac
8083fi
8084LN=$ac_cv_path_LN
8085if test -n "$LN"; then
8086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8087$as_echo "$LN" >&6; }
8088else
8089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8090$as_echo "no" >&6; }
8091fi
8092
8093
8094  test -n "$LN" && break
8095done
8096
8097  else
8098    # The variable is set, but is it from the command line or the environment?
8099
8100    # Try to remove the string !LN! from our list.
8101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8103      # If it failed, the variable was not from the command line. Ignore it,
8104      # but warn the user (except for BASH, which is always set by the calling BASH).
8105      if test "xLN" != xBASH; then
8106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8107$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8108      fi
8109      # Try to locate tool using the code snippet
8110      for ac_prog in ln
8111do
8112  # Extract the first word of "$ac_prog", so it can be a program name with args.
8113set dummy $ac_prog; ac_word=$2
8114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8115$as_echo_n "checking for $ac_word... " >&6; }
8116if ${ac_cv_path_LN+:} false; then :
8117  $as_echo_n "(cached) " >&6
8118else
8119  case $LN in
8120  [\\/]* | ?:[\\/]*)
8121  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8122  ;;
8123  *)
8124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8125for as_dir in $PATH
8126do
8127  IFS=$as_save_IFS
8128  test -z "$as_dir" && as_dir=.
8129    for ac_exec_ext in '' $ac_executable_extensions; do
8130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8131    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8133    break 2
8134  fi
8135done
8136  done
8137IFS=$as_save_IFS
8138
8139  ;;
8140esac
8141fi
8142LN=$ac_cv_path_LN
8143if test -n "$LN"; then
8144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8145$as_echo "$LN" >&6; }
8146else
8147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8148$as_echo "no" >&6; }
8149fi
8150
8151
8152  test -n "$LN" && break
8153done
8154
8155    else
8156      # If it succeeded, then it was overridden by the user. We will use it
8157      # for the tool.
8158
8159      # First remove it from the list of overridden variables, so we can test
8160      # for unknown variables in the end.
8161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8162
8163      # Check if we try to supply an empty value
8164      if test "x$LN" = x; then
8165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8166$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8168$as_echo_n "checking for LN... " >&6; }
8169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8170$as_echo "disabled" >&6; }
8171      else
8172        # Check if the provided tool contains a complete path.
8173        tool_specified="$LN"
8174        tool_basename="${tool_specified##*/}"
8175        if test "x$tool_basename" = "x$tool_specified"; then
8176          # A command without a complete path is provided, search $PATH.
8177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8178$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8179          # Extract the first word of "$tool_basename", so it can be a program name with args.
8180set dummy $tool_basename; ac_word=$2
8181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8182$as_echo_n "checking for $ac_word... " >&6; }
8183if ${ac_cv_path_LN+:} false; then :
8184  $as_echo_n "(cached) " >&6
8185else
8186  case $LN in
8187  [\\/]* | ?:[\\/]*)
8188  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8189  ;;
8190  *)
8191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8192for as_dir in $PATH
8193do
8194  IFS=$as_save_IFS
8195  test -z "$as_dir" && as_dir=.
8196    for ac_exec_ext in '' $ac_executable_extensions; do
8197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8198    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8200    break 2
8201  fi
8202done
8203  done
8204IFS=$as_save_IFS
8205
8206  ;;
8207esac
8208fi
8209LN=$ac_cv_path_LN
8210if test -n "$LN"; then
8211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8212$as_echo "$LN" >&6; }
8213else
8214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215$as_echo "no" >&6; }
8216fi
8217
8218
8219          if test "x$LN" = x; then
8220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8221          fi
8222        else
8223          # Otherwise we believe it is a complete path. Use it as it is.
8224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8225$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8227$as_echo_n "checking for LN... " >&6; }
8228          if test ! -x "$tool_specified"; then
8229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8230$as_echo "not found" >&6; }
8231            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8232          fi
8233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8234$as_echo "$tool_specified" >&6; }
8235        fi
8236      fi
8237    fi
8238
8239  fi
8240
8241
8242
8243  if test "x$LN" = x; then
8244    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8245  fi
8246
8247
8248
8249
8250
8251  # Publish this variable in the help.
8252
8253
8254  if [ -z "${LS+x}" ]; then
8255    # The variable is not set by user, try to locate tool using the code snippet
8256    for ac_prog in ls
8257do
8258  # Extract the first word of "$ac_prog", so it can be a program name with args.
8259set dummy $ac_prog; ac_word=$2
8260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8261$as_echo_n "checking for $ac_word... " >&6; }
8262if ${ac_cv_path_LS+:} false; then :
8263  $as_echo_n "(cached) " >&6
8264else
8265  case $LS in
8266  [\\/]* | ?:[\\/]*)
8267  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8268  ;;
8269  *)
8270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8271for as_dir in $PATH
8272do
8273  IFS=$as_save_IFS
8274  test -z "$as_dir" && as_dir=.
8275    for ac_exec_ext in '' $ac_executable_extensions; do
8276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8277    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8279    break 2
8280  fi
8281done
8282  done
8283IFS=$as_save_IFS
8284
8285  ;;
8286esac
8287fi
8288LS=$ac_cv_path_LS
8289if test -n "$LS"; then
8290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8291$as_echo "$LS" >&6; }
8292else
8293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8294$as_echo "no" >&6; }
8295fi
8296
8297
8298  test -n "$LS" && break
8299done
8300
8301  else
8302    # The variable is set, but is it from the command line or the environment?
8303
8304    # Try to remove the string !LS! from our list.
8305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8307      # If it failed, the variable was not from the command line. Ignore it,
8308      # but warn the user (except for BASH, which is always set by the calling BASH).
8309      if test "xLS" != xBASH; then
8310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8311$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8312      fi
8313      # Try to locate tool using the code snippet
8314      for ac_prog in ls
8315do
8316  # Extract the first word of "$ac_prog", so it can be a program name with args.
8317set dummy $ac_prog; ac_word=$2
8318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8319$as_echo_n "checking for $ac_word... " >&6; }
8320if ${ac_cv_path_LS+:} false; then :
8321  $as_echo_n "(cached) " >&6
8322else
8323  case $LS in
8324  [\\/]* | ?:[\\/]*)
8325  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8326  ;;
8327  *)
8328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8329for as_dir in $PATH
8330do
8331  IFS=$as_save_IFS
8332  test -z "$as_dir" && as_dir=.
8333    for ac_exec_ext in '' $ac_executable_extensions; do
8334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8335    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8337    break 2
8338  fi
8339done
8340  done
8341IFS=$as_save_IFS
8342
8343  ;;
8344esac
8345fi
8346LS=$ac_cv_path_LS
8347if test -n "$LS"; then
8348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8349$as_echo "$LS" >&6; }
8350else
8351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8352$as_echo "no" >&6; }
8353fi
8354
8355
8356  test -n "$LS" && break
8357done
8358
8359    else
8360      # If it succeeded, then it was overridden by the user. We will use it
8361      # for the tool.
8362
8363      # First remove it from the list of overridden variables, so we can test
8364      # for unknown variables in the end.
8365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8366
8367      # Check if we try to supply an empty value
8368      if test "x$LS" = x; then
8369        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8370$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8371        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8372$as_echo_n "checking for LS... " >&6; }
8373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8374$as_echo "disabled" >&6; }
8375      else
8376        # Check if the provided tool contains a complete path.
8377        tool_specified="$LS"
8378        tool_basename="${tool_specified##*/}"
8379        if test "x$tool_basename" = "x$tool_specified"; then
8380          # A command without a complete path is provided, search $PATH.
8381          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8382$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8383          # Extract the first word of "$tool_basename", so it can be a program name with args.
8384set dummy $tool_basename; ac_word=$2
8385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8386$as_echo_n "checking for $ac_word... " >&6; }
8387if ${ac_cv_path_LS+:} false; then :
8388  $as_echo_n "(cached) " >&6
8389else
8390  case $LS in
8391  [\\/]* | ?:[\\/]*)
8392  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8393  ;;
8394  *)
8395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8396for as_dir in $PATH
8397do
8398  IFS=$as_save_IFS
8399  test -z "$as_dir" && as_dir=.
8400    for ac_exec_ext in '' $ac_executable_extensions; do
8401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8402    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8404    break 2
8405  fi
8406done
8407  done
8408IFS=$as_save_IFS
8409
8410  ;;
8411esac
8412fi
8413LS=$ac_cv_path_LS
8414if test -n "$LS"; then
8415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8416$as_echo "$LS" >&6; }
8417else
8418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8419$as_echo "no" >&6; }
8420fi
8421
8422
8423          if test "x$LS" = x; then
8424            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8425          fi
8426        else
8427          # Otherwise we believe it is a complete path. Use it as it is.
8428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8429$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8430          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8431$as_echo_n "checking for LS... " >&6; }
8432          if test ! -x "$tool_specified"; then
8433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8434$as_echo "not found" >&6; }
8435            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8436          fi
8437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8438$as_echo "$tool_specified" >&6; }
8439        fi
8440      fi
8441    fi
8442
8443  fi
8444
8445
8446
8447  if test "x$LS" = x; then
8448    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8449  fi
8450
8451
8452
8453
8454
8455  # Publish this variable in the help.
8456
8457
8458  if [ -z "${MKDIR+x}" ]; then
8459    # The variable is not set by user, try to locate tool using the code snippet
8460    for ac_prog in mkdir
8461do
8462  # Extract the first word of "$ac_prog", so it can be a program name with args.
8463set dummy $ac_prog; ac_word=$2
8464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8465$as_echo_n "checking for $ac_word... " >&6; }
8466if ${ac_cv_path_MKDIR+:} false; then :
8467  $as_echo_n "(cached) " >&6
8468else
8469  case $MKDIR in
8470  [\\/]* | ?:[\\/]*)
8471  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8472  ;;
8473  *)
8474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8475for as_dir in $PATH
8476do
8477  IFS=$as_save_IFS
8478  test -z "$as_dir" && as_dir=.
8479    for ac_exec_ext in '' $ac_executable_extensions; do
8480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8481    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8483    break 2
8484  fi
8485done
8486  done
8487IFS=$as_save_IFS
8488
8489  ;;
8490esac
8491fi
8492MKDIR=$ac_cv_path_MKDIR
8493if test -n "$MKDIR"; then
8494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8495$as_echo "$MKDIR" >&6; }
8496else
8497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8498$as_echo "no" >&6; }
8499fi
8500
8501
8502  test -n "$MKDIR" && break
8503done
8504
8505  else
8506    # The variable is set, but is it from the command line or the environment?
8507
8508    # Try to remove the string !MKDIR! from our list.
8509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8511      # If it failed, the variable was not from the command line. Ignore it,
8512      # but warn the user (except for BASH, which is always set by the calling BASH).
8513      if test "xMKDIR" != xBASH; then
8514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8515$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8516      fi
8517      # Try to locate tool using the code snippet
8518      for ac_prog in mkdir
8519do
8520  # Extract the first word of "$ac_prog", so it can be a program name with args.
8521set dummy $ac_prog; ac_word=$2
8522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8523$as_echo_n "checking for $ac_word... " >&6; }
8524if ${ac_cv_path_MKDIR+:} false; then :
8525  $as_echo_n "(cached) " >&6
8526else
8527  case $MKDIR in
8528  [\\/]* | ?:[\\/]*)
8529  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8530  ;;
8531  *)
8532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8533for as_dir in $PATH
8534do
8535  IFS=$as_save_IFS
8536  test -z "$as_dir" && as_dir=.
8537    for ac_exec_ext in '' $ac_executable_extensions; do
8538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8539    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8541    break 2
8542  fi
8543done
8544  done
8545IFS=$as_save_IFS
8546
8547  ;;
8548esac
8549fi
8550MKDIR=$ac_cv_path_MKDIR
8551if test -n "$MKDIR"; then
8552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8553$as_echo "$MKDIR" >&6; }
8554else
8555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8556$as_echo "no" >&6; }
8557fi
8558
8559
8560  test -n "$MKDIR" && break
8561done
8562
8563    else
8564      # If it succeeded, then it was overridden by the user. We will use it
8565      # for the tool.
8566
8567      # First remove it from the list of overridden variables, so we can test
8568      # for unknown variables in the end.
8569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8570
8571      # Check if we try to supply an empty value
8572      if test "x$MKDIR" = x; then
8573        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8574$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8575        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8576$as_echo_n "checking for MKDIR... " >&6; }
8577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8578$as_echo "disabled" >&6; }
8579      else
8580        # Check if the provided tool contains a complete path.
8581        tool_specified="$MKDIR"
8582        tool_basename="${tool_specified##*/}"
8583        if test "x$tool_basename" = "x$tool_specified"; then
8584          # A command without a complete path is provided, search $PATH.
8585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8586$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8587          # Extract the first word of "$tool_basename", so it can be a program name with args.
8588set dummy $tool_basename; ac_word=$2
8589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8590$as_echo_n "checking for $ac_word... " >&6; }
8591if ${ac_cv_path_MKDIR+:} false; then :
8592  $as_echo_n "(cached) " >&6
8593else
8594  case $MKDIR in
8595  [\\/]* | ?:[\\/]*)
8596  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8597  ;;
8598  *)
8599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8600for as_dir in $PATH
8601do
8602  IFS=$as_save_IFS
8603  test -z "$as_dir" && as_dir=.
8604    for ac_exec_ext in '' $ac_executable_extensions; do
8605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8606    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8608    break 2
8609  fi
8610done
8611  done
8612IFS=$as_save_IFS
8613
8614  ;;
8615esac
8616fi
8617MKDIR=$ac_cv_path_MKDIR
8618if test -n "$MKDIR"; then
8619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8620$as_echo "$MKDIR" >&6; }
8621else
8622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8623$as_echo "no" >&6; }
8624fi
8625
8626
8627          if test "x$MKDIR" = x; then
8628            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8629          fi
8630        else
8631          # Otherwise we believe it is a complete path. Use it as it is.
8632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8633$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8634          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8635$as_echo_n "checking for MKDIR... " >&6; }
8636          if test ! -x "$tool_specified"; then
8637            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8638$as_echo "not found" >&6; }
8639            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8640          fi
8641          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8642$as_echo "$tool_specified" >&6; }
8643        fi
8644      fi
8645    fi
8646
8647  fi
8648
8649
8650
8651  if test "x$MKDIR" = x; then
8652    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8653  fi
8654
8655
8656
8657
8658
8659  # Publish this variable in the help.
8660
8661
8662  if [ -z "${MKTEMP+x}" ]; then
8663    # The variable is not set by user, try to locate tool using the code snippet
8664    for ac_prog in mktemp
8665do
8666  # Extract the first word of "$ac_prog", so it can be a program name with args.
8667set dummy $ac_prog; ac_word=$2
8668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8669$as_echo_n "checking for $ac_word... " >&6; }
8670if ${ac_cv_path_MKTEMP+:} false; then :
8671  $as_echo_n "(cached) " >&6
8672else
8673  case $MKTEMP in
8674  [\\/]* | ?:[\\/]*)
8675  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8676  ;;
8677  *)
8678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8679for as_dir in $PATH
8680do
8681  IFS=$as_save_IFS
8682  test -z "$as_dir" && as_dir=.
8683    for ac_exec_ext in '' $ac_executable_extensions; do
8684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8685    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8687    break 2
8688  fi
8689done
8690  done
8691IFS=$as_save_IFS
8692
8693  ;;
8694esac
8695fi
8696MKTEMP=$ac_cv_path_MKTEMP
8697if test -n "$MKTEMP"; then
8698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8699$as_echo "$MKTEMP" >&6; }
8700else
8701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8702$as_echo "no" >&6; }
8703fi
8704
8705
8706  test -n "$MKTEMP" && break
8707done
8708
8709  else
8710    # The variable is set, but is it from the command line or the environment?
8711
8712    # Try to remove the string !MKTEMP! from our list.
8713    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8714    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8715      # If it failed, the variable was not from the command line. Ignore it,
8716      # but warn the user (except for BASH, which is always set by the calling BASH).
8717      if test "xMKTEMP" != xBASH; then
8718        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8719$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8720      fi
8721      # Try to locate tool using the code snippet
8722      for ac_prog in mktemp
8723do
8724  # Extract the first word of "$ac_prog", so it can be a program name with args.
8725set dummy $ac_prog; ac_word=$2
8726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8727$as_echo_n "checking for $ac_word... " >&6; }
8728if ${ac_cv_path_MKTEMP+:} false; then :
8729  $as_echo_n "(cached) " >&6
8730else
8731  case $MKTEMP in
8732  [\\/]* | ?:[\\/]*)
8733  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8734  ;;
8735  *)
8736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8737for as_dir in $PATH
8738do
8739  IFS=$as_save_IFS
8740  test -z "$as_dir" && as_dir=.
8741    for ac_exec_ext in '' $ac_executable_extensions; do
8742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8743    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8745    break 2
8746  fi
8747done
8748  done
8749IFS=$as_save_IFS
8750
8751  ;;
8752esac
8753fi
8754MKTEMP=$ac_cv_path_MKTEMP
8755if test -n "$MKTEMP"; then
8756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8757$as_echo "$MKTEMP" >&6; }
8758else
8759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8760$as_echo "no" >&6; }
8761fi
8762
8763
8764  test -n "$MKTEMP" && break
8765done
8766
8767    else
8768      # If it succeeded, then it was overridden by the user. We will use it
8769      # for the tool.
8770
8771      # First remove it from the list of overridden variables, so we can test
8772      # for unknown variables in the end.
8773      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8774
8775      # Check if we try to supply an empty value
8776      if test "x$MKTEMP" = x; then
8777        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8778$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8779        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8780$as_echo_n "checking for MKTEMP... " >&6; }
8781        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8782$as_echo "disabled" >&6; }
8783      else
8784        # Check if the provided tool contains a complete path.
8785        tool_specified="$MKTEMP"
8786        tool_basename="${tool_specified##*/}"
8787        if test "x$tool_basename" = "x$tool_specified"; then
8788          # A command without a complete path is provided, search $PATH.
8789          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8790$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8791          # Extract the first word of "$tool_basename", so it can be a program name with args.
8792set dummy $tool_basename; ac_word=$2
8793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8794$as_echo_n "checking for $ac_word... " >&6; }
8795if ${ac_cv_path_MKTEMP+:} false; then :
8796  $as_echo_n "(cached) " >&6
8797else
8798  case $MKTEMP in
8799  [\\/]* | ?:[\\/]*)
8800  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8801  ;;
8802  *)
8803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8804for as_dir in $PATH
8805do
8806  IFS=$as_save_IFS
8807  test -z "$as_dir" && as_dir=.
8808    for ac_exec_ext in '' $ac_executable_extensions; do
8809  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8810    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8811    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8812    break 2
8813  fi
8814done
8815  done
8816IFS=$as_save_IFS
8817
8818  ;;
8819esac
8820fi
8821MKTEMP=$ac_cv_path_MKTEMP
8822if test -n "$MKTEMP"; then
8823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8824$as_echo "$MKTEMP" >&6; }
8825else
8826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827$as_echo "no" >&6; }
8828fi
8829
8830
8831          if test "x$MKTEMP" = x; then
8832            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8833          fi
8834        else
8835          # Otherwise we believe it is a complete path. Use it as it is.
8836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8837$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8838          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8839$as_echo_n "checking for MKTEMP... " >&6; }
8840          if test ! -x "$tool_specified"; then
8841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8842$as_echo "not found" >&6; }
8843            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8844          fi
8845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8846$as_echo "$tool_specified" >&6; }
8847        fi
8848      fi
8849    fi
8850
8851  fi
8852
8853
8854
8855  if test "x$MKTEMP" = x; then
8856    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8857  fi
8858
8859
8860
8861
8862
8863  # Publish this variable in the help.
8864
8865
8866  if [ -z "${MV+x}" ]; then
8867    # The variable is not set by user, try to locate tool using the code snippet
8868    for ac_prog in mv
8869do
8870  # Extract the first word of "$ac_prog", so it can be a program name with args.
8871set dummy $ac_prog; ac_word=$2
8872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8873$as_echo_n "checking for $ac_word... " >&6; }
8874if ${ac_cv_path_MV+:} false; then :
8875  $as_echo_n "(cached) " >&6
8876else
8877  case $MV in
8878  [\\/]* | ?:[\\/]*)
8879  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8880  ;;
8881  *)
8882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8883for as_dir in $PATH
8884do
8885  IFS=$as_save_IFS
8886  test -z "$as_dir" && as_dir=.
8887    for ac_exec_ext in '' $ac_executable_extensions; do
8888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8889    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8891    break 2
8892  fi
8893done
8894  done
8895IFS=$as_save_IFS
8896
8897  ;;
8898esac
8899fi
8900MV=$ac_cv_path_MV
8901if test -n "$MV"; then
8902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8903$as_echo "$MV" >&6; }
8904else
8905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8906$as_echo "no" >&6; }
8907fi
8908
8909
8910  test -n "$MV" && break
8911done
8912
8913  else
8914    # The variable is set, but is it from the command line or the environment?
8915
8916    # Try to remove the string !MV! from our list.
8917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8919      # If it failed, the variable was not from the command line. Ignore it,
8920      # but warn the user (except for BASH, which is always set by the calling BASH).
8921      if test "xMV" != xBASH; then
8922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8923$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8924      fi
8925      # Try to locate tool using the code snippet
8926      for ac_prog in mv
8927do
8928  # Extract the first word of "$ac_prog", so it can be a program name with args.
8929set dummy $ac_prog; ac_word=$2
8930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8931$as_echo_n "checking for $ac_word... " >&6; }
8932if ${ac_cv_path_MV+:} false; then :
8933  $as_echo_n "(cached) " >&6
8934else
8935  case $MV in
8936  [\\/]* | ?:[\\/]*)
8937  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8938  ;;
8939  *)
8940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8941for as_dir in $PATH
8942do
8943  IFS=$as_save_IFS
8944  test -z "$as_dir" && as_dir=.
8945    for ac_exec_ext in '' $ac_executable_extensions; do
8946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8947    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8949    break 2
8950  fi
8951done
8952  done
8953IFS=$as_save_IFS
8954
8955  ;;
8956esac
8957fi
8958MV=$ac_cv_path_MV
8959if test -n "$MV"; then
8960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8961$as_echo "$MV" >&6; }
8962else
8963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8964$as_echo "no" >&6; }
8965fi
8966
8967
8968  test -n "$MV" && break
8969done
8970
8971    else
8972      # If it succeeded, then it was overridden by the user. We will use it
8973      # for the tool.
8974
8975      # First remove it from the list of overridden variables, so we can test
8976      # for unknown variables in the end.
8977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8978
8979      # Check if we try to supply an empty value
8980      if test "x$MV" = x; then
8981        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8982$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8983        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8984$as_echo_n "checking for MV... " >&6; }
8985        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8986$as_echo "disabled" >&6; }
8987      else
8988        # Check if the provided tool contains a complete path.
8989        tool_specified="$MV"
8990        tool_basename="${tool_specified##*/}"
8991        if test "x$tool_basename" = "x$tool_specified"; then
8992          # A command without a complete path is provided, search $PATH.
8993          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8994$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8995          # Extract the first word of "$tool_basename", so it can be a program name with args.
8996set dummy $tool_basename; ac_word=$2
8997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8998$as_echo_n "checking for $ac_word... " >&6; }
8999if ${ac_cv_path_MV+:} false; then :
9000  $as_echo_n "(cached) " >&6
9001else
9002  case $MV in
9003  [\\/]* | ?:[\\/]*)
9004  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9005  ;;
9006  *)
9007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9008for as_dir in $PATH
9009do
9010  IFS=$as_save_IFS
9011  test -z "$as_dir" && as_dir=.
9012    for ac_exec_ext in '' $ac_executable_extensions; do
9013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9014    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9016    break 2
9017  fi
9018done
9019  done
9020IFS=$as_save_IFS
9021
9022  ;;
9023esac
9024fi
9025MV=$ac_cv_path_MV
9026if test -n "$MV"; then
9027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9028$as_echo "$MV" >&6; }
9029else
9030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9031$as_echo "no" >&6; }
9032fi
9033
9034
9035          if test "x$MV" = x; then
9036            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9037          fi
9038        else
9039          # Otherwise we believe it is a complete path. Use it as it is.
9040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9041$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9042          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9043$as_echo_n "checking for MV... " >&6; }
9044          if test ! -x "$tool_specified"; then
9045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9046$as_echo "not found" >&6; }
9047            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9048          fi
9049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9050$as_echo "$tool_specified" >&6; }
9051        fi
9052      fi
9053    fi
9054
9055  fi
9056
9057
9058
9059  if test "x$MV" = x; then
9060    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9061  fi
9062
9063
9064
9065
9066
9067  # Publish this variable in the help.
9068
9069
9070  if [ -z "${NAWK+x}" ]; then
9071    # The variable is not set by user, try to locate tool using the code snippet
9072    for ac_prog in nawk gawk awk
9073do
9074  # Extract the first word of "$ac_prog", so it can be a program name with args.
9075set dummy $ac_prog; ac_word=$2
9076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9077$as_echo_n "checking for $ac_word... " >&6; }
9078if ${ac_cv_path_NAWK+:} false; then :
9079  $as_echo_n "(cached) " >&6
9080else
9081  case $NAWK in
9082  [\\/]* | ?:[\\/]*)
9083  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9084  ;;
9085  *)
9086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9087for as_dir in $PATH
9088do
9089  IFS=$as_save_IFS
9090  test -z "$as_dir" && as_dir=.
9091    for ac_exec_ext in '' $ac_executable_extensions; do
9092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9093    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9095    break 2
9096  fi
9097done
9098  done
9099IFS=$as_save_IFS
9100
9101  ;;
9102esac
9103fi
9104NAWK=$ac_cv_path_NAWK
9105if test -n "$NAWK"; then
9106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9107$as_echo "$NAWK" >&6; }
9108else
9109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9110$as_echo "no" >&6; }
9111fi
9112
9113
9114  test -n "$NAWK" && break
9115done
9116
9117  else
9118    # The variable is set, but is it from the command line or the environment?
9119
9120    # Try to remove the string !NAWK! from our list.
9121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9123      # If it failed, the variable was not from the command line. Ignore it,
9124      # but warn the user (except for BASH, which is always set by the calling BASH).
9125      if test "xNAWK" != xBASH; then
9126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9127$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9128      fi
9129      # Try to locate tool using the code snippet
9130      for ac_prog in nawk gawk awk
9131do
9132  # Extract the first word of "$ac_prog", so it can be a program name with args.
9133set dummy $ac_prog; ac_word=$2
9134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9135$as_echo_n "checking for $ac_word... " >&6; }
9136if ${ac_cv_path_NAWK+:} false; then :
9137  $as_echo_n "(cached) " >&6
9138else
9139  case $NAWK in
9140  [\\/]* | ?:[\\/]*)
9141  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9142  ;;
9143  *)
9144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9145for as_dir in $PATH
9146do
9147  IFS=$as_save_IFS
9148  test -z "$as_dir" && as_dir=.
9149    for ac_exec_ext in '' $ac_executable_extensions; do
9150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9151    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9153    break 2
9154  fi
9155done
9156  done
9157IFS=$as_save_IFS
9158
9159  ;;
9160esac
9161fi
9162NAWK=$ac_cv_path_NAWK
9163if test -n "$NAWK"; then
9164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9165$as_echo "$NAWK" >&6; }
9166else
9167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9168$as_echo "no" >&6; }
9169fi
9170
9171
9172  test -n "$NAWK" && break
9173done
9174
9175    else
9176      # If it succeeded, then it was overridden by the user. We will use it
9177      # for the tool.
9178
9179      # First remove it from the list of overridden variables, so we can test
9180      # for unknown variables in the end.
9181      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9182
9183      # Check if we try to supply an empty value
9184      if test "x$NAWK" = x; then
9185        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9186$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9188$as_echo_n "checking for NAWK... " >&6; }
9189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9190$as_echo "disabled" >&6; }
9191      else
9192        # Check if the provided tool contains a complete path.
9193        tool_specified="$NAWK"
9194        tool_basename="${tool_specified##*/}"
9195        if test "x$tool_basename" = "x$tool_specified"; then
9196          # A command without a complete path is provided, search $PATH.
9197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9198$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9199          # Extract the first word of "$tool_basename", so it can be a program name with args.
9200set dummy $tool_basename; ac_word=$2
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9202$as_echo_n "checking for $ac_word... " >&6; }
9203if ${ac_cv_path_NAWK+:} false; then :
9204  $as_echo_n "(cached) " >&6
9205else
9206  case $NAWK in
9207  [\\/]* | ?:[\\/]*)
9208  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9209  ;;
9210  *)
9211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9212for as_dir in $PATH
9213do
9214  IFS=$as_save_IFS
9215  test -z "$as_dir" && as_dir=.
9216    for ac_exec_ext in '' $ac_executable_extensions; do
9217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9218    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9220    break 2
9221  fi
9222done
9223  done
9224IFS=$as_save_IFS
9225
9226  ;;
9227esac
9228fi
9229NAWK=$ac_cv_path_NAWK
9230if test -n "$NAWK"; then
9231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9232$as_echo "$NAWK" >&6; }
9233else
9234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9235$as_echo "no" >&6; }
9236fi
9237
9238
9239          if test "x$NAWK" = x; then
9240            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9241          fi
9242        else
9243          # Otherwise we believe it is a complete path. Use it as it is.
9244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9245$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9246          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9247$as_echo_n "checking for NAWK... " >&6; }
9248          if test ! -x "$tool_specified"; then
9249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9250$as_echo "not found" >&6; }
9251            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9252          fi
9253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9254$as_echo "$tool_specified" >&6; }
9255        fi
9256      fi
9257    fi
9258
9259  fi
9260
9261
9262
9263  if test "x$NAWK" = x; then
9264    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9265  fi
9266
9267
9268
9269
9270
9271  # Publish this variable in the help.
9272
9273
9274  if [ -z "${PRINTF+x}" ]; then
9275    # The variable is not set by user, try to locate tool using the code snippet
9276    for ac_prog in printf
9277do
9278  # Extract the first word of "$ac_prog", so it can be a program name with args.
9279set dummy $ac_prog; ac_word=$2
9280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9281$as_echo_n "checking for $ac_word... " >&6; }
9282if ${ac_cv_path_PRINTF+:} false; then :
9283  $as_echo_n "(cached) " >&6
9284else
9285  case $PRINTF in
9286  [\\/]* | ?:[\\/]*)
9287  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9288  ;;
9289  *)
9290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9291for as_dir in $PATH
9292do
9293  IFS=$as_save_IFS
9294  test -z "$as_dir" && as_dir=.
9295    for ac_exec_ext in '' $ac_executable_extensions; do
9296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9297    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9299    break 2
9300  fi
9301done
9302  done
9303IFS=$as_save_IFS
9304
9305  ;;
9306esac
9307fi
9308PRINTF=$ac_cv_path_PRINTF
9309if test -n "$PRINTF"; then
9310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9311$as_echo "$PRINTF" >&6; }
9312else
9313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9314$as_echo "no" >&6; }
9315fi
9316
9317
9318  test -n "$PRINTF" && break
9319done
9320
9321  else
9322    # The variable is set, but is it from the command line or the environment?
9323
9324    # Try to remove the string !PRINTF! from our list.
9325    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9326    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9327      # If it failed, the variable was not from the command line. Ignore it,
9328      # but warn the user (except for BASH, which is always set by the calling BASH).
9329      if test "xPRINTF" != xBASH; then
9330        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9331$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9332      fi
9333      # Try to locate tool using the code snippet
9334      for ac_prog in printf
9335do
9336  # Extract the first word of "$ac_prog", so it can be a program name with args.
9337set dummy $ac_prog; ac_word=$2
9338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9339$as_echo_n "checking for $ac_word... " >&6; }
9340if ${ac_cv_path_PRINTF+:} false; then :
9341  $as_echo_n "(cached) " >&6
9342else
9343  case $PRINTF in
9344  [\\/]* | ?:[\\/]*)
9345  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9346  ;;
9347  *)
9348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9349for as_dir in $PATH
9350do
9351  IFS=$as_save_IFS
9352  test -z "$as_dir" && as_dir=.
9353    for ac_exec_ext in '' $ac_executable_extensions; do
9354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9355    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9357    break 2
9358  fi
9359done
9360  done
9361IFS=$as_save_IFS
9362
9363  ;;
9364esac
9365fi
9366PRINTF=$ac_cv_path_PRINTF
9367if test -n "$PRINTF"; then
9368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9369$as_echo "$PRINTF" >&6; }
9370else
9371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9372$as_echo "no" >&6; }
9373fi
9374
9375
9376  test -n "$PRINTF" && break
9377done
9378
9379    else
9380      # If it succeeded, then it was overridden by the user. We will use it
9381      # for the tool.
9382
9383      # First remove it from the list of overridden variables, so we can test
9384      # for unknown variables in the end.
9385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9386
9387      # Check if we try to supply an empty value
9388      if test "x$PRINTF" = x; then
9389        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9390$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9391        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9392$as_echo_n "checking for PRINTF... " >&6; }
9393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9394$as_echo "disabled" >&6; }
9395      else
9396        # Check if the provided tool contains a complete path.
9397        tool_specified="$PRINTF"
9398        tool_basename="${tool_specified##*/}"
9399        if test "x$tool_basename" = "x$tool_specified"; then
9400          # A command without a complete path is provided, search $PATH.
9401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9402$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9403          # Extract the first word of "$tool_basename", so it can be a program name with args.
9404set dummy $tool_basename; ac_word=$2
9405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9406$as_echo_n "checking for $ac_word... " >&6; }
9407if ${ac_cv_path_PRINTF+:} false; then :
9408  $as_echo_n "(cached) " >&6
9409else
9410  case $PRINTF in
9411  [\\/]* | ?:[\\/]*)
9412  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9413  ;;
9414  *)
9415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9416for as_dir in $PATH
9417do
9418  IFS=$as_save_IFS
9419  test -z "$as_dir" && as_dir=.
9420    for ac_exec_ext in '' $ac_executable_extensions; do
9421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9422    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9424    break 2
9425  fi
9426done
9427  done
9428IFS=$as_save_IFS
9429
9430  ;;
9431esac
9432fi
9433PRINTF=$ac_cv_path_PRINTF
9434if test -n "$PRINTF"; then
9435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9436$as_echo "$PRINTF" >&6; }
9437else
9438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9439$as_echo "no" >&6; }
9440fi
9441
9442
9443          if test "x$PRINTF" = x; then
9444            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9445          fi
9446        else
9447          # Otherwise we believe it is a complete path. Use it as it is.
9448          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9449$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9450          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9451$as_echo_n "checking for PRINTF... " >&6; }
9452          if test ! -x "$tool_specified"; then
9453            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9454$as_echo "not found" >&6; }
9455            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9456          fi
9457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9458$as_echo "$tool_specified" >&6; }
9459        fi
9460      fi
9461    fi
9462
9463  fi
9464
9465
9466
9467  if test "x$PRINTF" = x; then
9468    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9469  fi
9470
9471
9472
9473
9474
9475  # Publish this variable in the help.
9476
9477
9478  if [ -z "${RM+x}" ]; then
9479    # The variable is not set by user, try to locate tool using the code snippet
9480    for ac_prog in rm
9481do
9482  # Extract the first word of "$ac_prog", so it can be a program name with args.
9483set dummy $ac_prog; ac_word=$2
9484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9485$as_echo_n "checking for $ac_word... " >&6; }
9486if ${ac_cv_path_RM+:} false; then :
9487  $as_echo_n "(cached) " >&6
9488else
9489  case $RM in
9490  [\\/]* | ?:[\\/]*)
9491  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9492  ;;
9493  *)
9494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9495for as_dir in $PATH
9496do
9497  IFS=$as_save_IFS
9498  test -z "$as_dir" && as_dir=.
9499    for ac_exec_ext in '' $ac_executable_extensions; do
9500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9501    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9503    break 2
9504  fi
9505done
9506  done
9507IFS=$as_save_IFS
9508
9509  ;;
9510esac
9511fi
9512RM=$ac_cv_path_RM
9513if test -n "$RM"; then
9514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9515$as_echo "$RM" >&6; }
9516else
9517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9518$as_echo "no" >&6; }
9519fi
9520
9521
9522  test -n "$RM" && break
9523done
9524
9525  else
9526    # The variable is set, but is it from the command line or the environment?
9527
9528    # Try to remove the string !RM! from our list.
9529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9531      # If it failed, the variable was not from the command line. Ignore it,
9532      # but warn the user (except for BASH, which is always set by the calling BASH).
9533      if test "xRM" != xBASH; then
9534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9535$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9536      fi
9537      # Try to locate tool using the code snippet
9538      for ac_prog in rm
9539do
9540  # Extract the first word of "$ac_prog", so it can be a program name with args.
9541set dummy $ac_prog; ac_word=$2
9542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9543$as_echo_n "checking for $ac_word... " >&6; }
9544if ${ac_cv_path_RM+:} false; then :
9545  $as_echo_n "(cached) " >&6
9546else
9547  case $RM in
9548  [\\/]* | ?:[\\/]*)
9549  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9550  ;;
9551  *)
9552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9553for as_dir in $PATH
9554do
9555  IFS=$as_save_IFS
9556  test -z "$as_dir" && as_dir=.
9557    for ac_exec_ext in '' $ac_executable_extensions; do
9558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9559    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9561    break 2
9562  fi
9563done
9564  done
9565IFS=$as_save_IFS
9566
9567  ;;
9568esac
9569fi
9570RM=$ac_cv_path_RM
9571if test -n "$RM"; then
9572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9573$as_echo "$RM" >&6; }
9574else
9575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9576$as_echo "no" >&6; }
9577fi
9578
9579
9580  test -n "$RM" && break
9581done
9582
9583    else
9584      # If it succeeded, then it was overridden by the user. We will use it
9585      # for the tool.
9586
9587      # First remove it from the list of overridden variables, so we can test
9588      # for unknown variables in the end.
9589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9590
9591      # Check if we try to supply an empty value
9592      if test "x$RM" = x; then
9593        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9594$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9596$as_echo_n "checking for RM... " >&6; }
9597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9598$as_echo "disabled" >&6; }
9599      else
9600        # Check if the provided tool contains a complete path.
9601        tool_specified="$RM"
9602        tool_basename="${tool_specified##*/}"
9603        if test "x$tool_basename" = "x$tool_specified"; then
9604          # A command without a complete path is provided, search $PATH.
9605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9606$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9607          # Extract the first word of "$tool_basename", so it can be a program name with args.
9608set dummy $tool_basename; ac_word=$2
9609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9610$as_echo_n "checking for $ac_word... " >&6; }
9611if ${ac_cv_path_RM+:} false; then :
9612  $as_echo_n "(cached) " >&6
9613else
9614  case $RM in
9615  [\\/]* | ?:[\\/]*)
9616  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9617  ;;
9618  *)
9619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9620for as_dir in $PATH
9621do
9622  IFS=$as_save_IFS
9623  test -z "$as_dir" && as_dir=.
9624    for ac_exec_ext in '' $ac_executable_extensions; do
9625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9626    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9628    break 2
9629  fi
9630done
9631  done
9632IFS=$as_save_IFS
9633
9634  ;;
9635esac
9636fi
9637RM=$ac_cv_path_RM
9638if test -n "$RM"; then
9639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9640$as_echo "$RM" >&6; }
9641else
9642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9643$as_echo "no" >&6; }
9644fi
9645
9646
9647          if test "x$RM" = x; then
9648            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9649          fi
9650        else
9651          # Otherwise we believe it is a complete path. Use it as it is.
9652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9653$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9654          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9655$as_echo_n "checking for RM... " >&6; }
9656          if test ! -x "$tool_specified"; then
9657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9658$as_echo "not found" >&6; }
9659            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9660          fi
9661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9662$as_echo "$tool_specified" >&6; }
9663        fi
9664      fi
9665    fi
9666
9667  fi
9668
9669
9670
9671  if test "x$RM" = x; then
9672    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9673  fi
9674
9675
9676
9677
9678
9679  # Publish this variable in the help.
9680
9681
9682  if [ -z "${RMDIR+x}" ]; then
9683    # The variable is not set by user, try to locate tool using the code snippet
9684    for ac_prog in rmdir
9685do
9686  # Extract the first word of "$ac_prog", so it can be a program name with args.
9687set dummy $ac_prog; ac_word=$2
9688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9689$as_echo_n "checking for $ac_word... " >&6; }
9690if ${ac_cv_path_RMDIR+:} false; then :
9691  $as_echo_n "(cached) " >&6
9692else
9693  case $RMDIR in
9694  [\\/]* | ?:[\\/]*)
9695  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9696  ;;
9697  *)
9698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9699for as_dir in $PATH
9700do
9701  IFS=$as_save_IFS
9702  test -z "$as_dir" && as_dir=.
9703    for ac_exec_ext in '' $ac_executable_extensions; do
9704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9705    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9707    break 2
9708  fi
9709done
9710  done
9711IFS=$as_save_IFS
9712
9713  ;;
9714esac
9715fi
9716RMDIR=$ac_cv_path_RMDIR
9717if test -n "$RMDIR"; then
9718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9719$as_echo "$RMDIR" >&6; }
9720else
9721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9722$as_echo "no" >&6; }
9723fi
9724
9725
9726  test -n "$RMDIR" && break
9727done
9728
9729  else
9730    # The variable is set, but is it from the command line or the environment?
9731
9732    # Try to remove the string !RMDIR! from our list.
9733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9735      # If it failed, the variable was not from the command line. Ignore it,
9736      # but warn the user (except for BASH, which is always set by the calling BASH).
9737      if test "xRMDIR" != xBASH; then
9738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9739$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9740      fi
9741      # Try to locate tool using the code snippet
9742      for ac_prog in rmdir
9743do
9744  # Extract the first word of "$ac_prog", so it can be a program name with args.
9745set dummy $ac_prog; ac_word=$2
9746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9747$as_echo_n "checking for $ac_word... " >&6; }
9748if ${ac_cv_path_RMDIR+:} false; then :
9749  $as_echo_n "(cached) " >&6
9750else
9751  case $RMDIR in
9752  [\\/]* | ?:[\\/]*)
9753  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9754  ;;
9755  *)
9756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9757for as_dir in $PATH
9758do
9759  IFS=$as_save_IFS
9760  test -z "$as_dir" && as_dir=.
9761    for ac_exec_ext in '' $ac_executable_extensions; do
9762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9763    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9765    break 2
9766  fi
9767done
9768  done
9769IFS=$as_save_IFS
9770
9771  ;;
9772esac
9773fi
9774RMDIR=$ac_cv_path_RMDIR
9775if test -n "$RMDIR"; then
9776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9777$as_echo "$RMDIR" >&6; }
9778else
9779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9780$as_echo "no" >&6; }
9781fi
9782
9783
9784  test -n "$RMDIR" && break
9785done
9786
9787    else
9788      # If it succeeded, then it was overridden by the user. We will use it
9789      # for the tool.
9790
9791      # First remove it from the list of overridden variables, so we can test
9792      # for unknown variables in the end.
9793      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9794
9795      # Check if we try to supply an empty value
9796      if test "x$RMDIR" = x; then
9797        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9798$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9799        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9800$as_echo_n "checking for RMDIR... " >&6; }
9801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9802$as_echo "disabled" >&6; }
9803      else
9804        # Check if the provided tool contains a complete path.
9805        tool_specified="$RMDIR"
9806        tool_basename="${tool_specified##*/}"
9807        if test "x$tool_basename" = "x$tool_specified"; then
9808          # A command without a complete path is provided, search $PATH.
9809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9810$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9811          # Extract the first word of "$tool_basename", so it can be a program name with args.
9812set dummy $tool_basename; ac_word=$2
9813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9814$as_echo_n "checking for $ac_word... " >&6; }
9815if ${ac_cv_path_RMDIR+:} false; then :
9816  $as_echo_n "(cached) " >&6
9817else
9818  case $RMDIR in
9819  [\\/]* | ?:[\\/]*)
9820  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9821  ;;
9822  *)
9823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9824for as_dir in $PATH
9825do
9826  IFS=$as_save_IFS
9827  test -z "$as_dir" && as_dir=.
9828    for ac_exec_ext in '' $ac_executable_extensions; do
9829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9830    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9832    break 2
9833  fi
9834done
9835  done
9836IFS=$as_save_IFS
9837
9838  ;;
9839esac
9840fi
9841RMDIR=$ac_cv_path_RMDIR
9842if test -n "$RMDIR"; then
9843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9844$as_echo "$RMDIR" >&6; }
9845else
9846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9847$as_echo "no" >&6; }
9848fi
9849
9850
9851          if test "x$RMDIR" = x; then
9852            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9853          fi
9854        else
9855          # Otherwise we believe it is a complete path. Use it as it is.
9856          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9857$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9858          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9859$as_echo_n "checking for RMDIR... " >&6; }
9860          if test ! -x "$tool_specified"; then
9861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9862$as_echo "not found" >&6; }
9863            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9864          fi
9865          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9866$as_echo "$tool_specified" >&6; }
9867        fi
9868      fi
9869    fi
9870
9871  fi
9872
9873
9874
9875  if test "x$RMDIR" = x; then
9876    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9877  fi
9878
9879
9880
9881
9882
9883  # Publish this variable in the help.
9884
9885
9886  if [ -z "${SH+x}" ]; then
9887    # The variable is not set by user, try to locate tool using the code snippet
9888    for ac_prog in sh
9889do
9890  # Extract the first word of "$ac_prog", so it can be a program name with args.
9891set dummy $ac_prog; ac_word=$2
9892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9893$as_echo_n "checking for $ac_word... " >&6; }
9894if ${ac_cv_path_SH+:} false; then :
9895  $as_echo_n "(cached) " >&6
9896else
9897  case $SH in
9898  [\\/]* | ?:[\\/]*)
9899  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9900  ;;
9901  *)
9902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9903for as_dir in $PATH
9904do
9905  IFS=$as_save_IFS
9906  test -z "$as_dir" && as_dir=.
9907    for ac_exec_ext in '' $ac_executable_extensions; do
9908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9909    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9911    break 2
9912  fi
9913done
9914  done
9915IFS=$as_save_IFS
9916
9917  ;;
9918esac
9919fi
9920SH=$ac_cv_path_SH
9921if test -n "$SH"; then
9922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9923$as_echo "$SH" >&6; }
9924else
9925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9926$as_echo "no" >&6; }
9927fi
9928
9929
9930  test -n "$SH" && break
9931done
9932
9933  else
9934    # The variable is set, but is it from the command line or the environment?
9935
9936    # Try to remove the string !SH! from our list.
9937    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9938    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9939      # If it failed, the variable was not from the command line. Ignore it,
9940      # but warn the user (except for BASH, which is always set by the calling BASH).
9941      if test "xSH" != xBASH; then
9942        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9943$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9944      fi
9945      # Try to locate tool using the code snippet
9946      for ac_prog in sh
9947do
9948  # Extract the first word of "$ac_prog", so it can be a program name with args.
9949set dummy $ac_prog; ac_word=$2
9950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9951$as_echo_n "checking for $ac_word... " >&6; }
9952if ${ac_cv_path_SH+:} false; then :
9953  $as_echo_n "(cached) " >&6
9954else
9955  case $SH in
9956  [\\/]* | ?:[\\/]*)
9957  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9958  ;;
9959  *)
9960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9961for as_dir in $PATH
9962do
9963  IFS=$as_save_IFS
9964  test -z "$as_dir" && as_dir=.
9965    for ac_exec_ext in '' $ac_executable_extensions; do
9966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9967    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9969    break 2
9970  fi
9971done
9972  done
9973IFS=$as_save_IFS
9974
9975  ;;
9976esac
9977fi
9978SH=$ac_cv_path_SH
9979if test -n "$SH"; then
9980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9981$as_echo "$SH" >&6; }
9982else
9983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984$as_echo "no" >&6; }
9985fi
9986
9987
9988  test -n "$SH" && break
9989done
9990
9991    else
9992      # If it succeeded, then it was overridden by the user. We will use it
9993      # for the tool.
9994
9995      # First remove it from the list of overridden variables, so we can test
9996      # for unknown variables in the end.
9997      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9998
9999      # Check if we try to supply an empty value
10000      if test "x$SH" = x; then
10001        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10002$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10003        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10004$as_echo_n "checking for SH... " >&6; }
10005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10006$as_echo "disabled" >&6; }
10007      else
10008        # Check if the provided tool contains a complete path.
10009        tool_specified="$SH"
10010        tool_basename="${tool_specified##*/}"
10011        if test "x$tool_basename" = "x$tool_specified"; then
10012          # A command without a complete path is provided, search $PATH.
10013          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10014$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10015          # Extract the first word of "$tool_basename", so it can be a program name with args.
10016set dummy $tool_basename; ac_word=$2
10017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10018$as_echo_n "checking for $ac_word... " >&6; }
10019if ${ac_cv_path_SH+:} false; then :
10020  $as_echo_n "(cached) " >&6
10021else
10022  case $SH in
10023  [\\/]* | ?:[\\/]*)
10024  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10025  ;;
10026  *)
10027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10028for as_dir in $PATH
10029do
10030  IFS=$as_save_IFS
10031  test -z "$as_dir" && as_dir=.
10032    for ac_exec_ext in '' $ac_executable_extensions; do
10033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10034    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10036    break 2
10037  fi
10038done
10039  done
10040IFS=$as_save_IFS
10041
10042  ;;
10043esac
10044fi
10045SH=$ac_cv_path_SH
10046if test -n "$SH"; then
10047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10048$as_echo "$SH" >&6; }
10049else
10050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10051$as_echo "no" >&6; }
10052fi
10053
10054
10055          if test "x$SH" = x; then
10056            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10057          fi
10058        else
10059          # Otherwise we believe it is a complete path. Use it as it is.
10060          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10061$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10062          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10063$as_echo_n "checking for SH... " >&6; }
10064          if test ! -x "$tool_specified"; then
10065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10066$as_echo "not found" >&6; }
10067            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10068          fi
10069          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10070$as_echo "$tool_specified" >&6; }
10071        fi
10072      fi
10073    fi
10074
10075  fi
10076
10077
10078
10079  if test "x$SH" = x; then
10080    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10081  fi
10082
10083
10084
10085
10086
10087  # Publish this variable in the help.
10088
10089
10090  if [ -z "${SORT+x}" ]; then
10091    # The variable is not set by user, try to locate tool using the code snippet
10092    for ac_prog in sort
10093do
10094  # Extract the first word of "$ac_prog", so it can be a program name with args.
10095set dummy $ac_prog; ac_word=$2
10096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10097$as_echo_n "checking for $ac_word... " >&6; }
10098if ${ac_cv_path_SORT+:} false; then :
10099  $as_echo_n "(cached) " >&6
10100else
10101  case $SORT in
10102  [\\/]* | ?:[\\/]*)
10103  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10104  ;;
10105  *)
10106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10107for as_dir in $PATH
10108do
10109  IFS=$as_save_IFS
10110  test -z "$as_dir" && as_dir=.
10111    for ac_exec_ext in '' $ac_executable_extensions; do
10112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10113    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10115    break 2
10116  fi
10117done
10118  done
10119IFS=$as_save_IFS
10120
10121  ;;
10122esac
10123fi
10124SORT=$ac_cv_path_SORT
10125if test -n "$SORT"; then
10126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10127$as_echo "$SORT" >&6; }
10128else
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130$as_echo "no" >&6; }
10131fi
10132
10133
10134  test -n "$SORT" && break
10135done
10136
10137  else
10138    # The variable is set, but is it from the command line or the environment?
10139
10140    # Try to remove the string !SORT! from our list.
10141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10143      # If it failed, the variable was not from the command line. Ignore it,
10144      # but warn the user (except for BASH, which is always set by the calling BASH).
10145      if test "xSORT" != xBASH; then
10146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10147$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10148      fi
10149      # Try to locate tool using the code snippet
10150      for ac_prog in sort
10151do
10152  # Extract the first word of "$ac_prog", so it can be a program name with args.
10153set dummy $ac_prog; ac_word=$2
10154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10155$as_echo_n "checking for $ac_word... " >&6; }
10156if ${ac_cv_path_SORT+:} false; then :
10157  $as_echo_n "(cached) " >&6
10158else
10159  case $SORT in
10160  [\\/]* | ?:[\\/]*)
10161  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10162  ;;
10163  *)
10164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10165for as_dir in $PATH
10166do
10167  IFS=$as_save_IFS
10168  test -z "$as_dir" && as_dir=.
10169    for ac_exec_ext in '' $ac_executable_extensions; do
10170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10171    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10173    break 2
10174  fi
10175done
10176  done
10177IFS=$as_save_IFS
10178
10179  ;;
10180esac
10181fi
10182SORT=$ac_cv_path_SORT
10183if test -n "$SORT"; then
10184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10185$as_echo "$SORT" >&6; }
10186else
10187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10188$as_echo "no" >&6; }
10189fi
10190
10191
10192  test -n "$SORT" && break
10193done
10194
10195    else
10196      # If it succeeded, then it was overridden by the user. We will use it
10197      # for the tool.
10198
10199      # First remove it from the list of overridden variables, so we can test
10200      # for unknown variables in the end.
10201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10202
10203      # Check if we try to supply an empty value
10204      if test "x$SORT" = x; then
10205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10206$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10208$as_echo_n "checking for SORT... " >&6; }
10209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10210$as_echo "disabled" >&6; }
10211      else
10212        # Check if the provided tool contains a complete path.
10213        tool_specified="$SORT"
10214        tool_basename="${tool_specified##*/}"
10215        if test "x$tool_basename" = "x$tool_specified"; then
10216          # A command without a complete path is provided, search $PATH.
10217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10218$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10219          # Extract the first word of "$tool_basename", so it can be a program name with args.
10220set dummy $tool_basename; ac_word=$2
10221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10222$as_echo_n "checking for $ac_word... " >&6; }
10223if ${ac_cv_path_SORT+:} false; then :
10224  $as_echo_n "(cached) " >&6
10225else
10226  case $SORT in
10227  [\\/]* | ?:[\\/]*)
10228  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10229  ;;
10230  *)
10231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10232for as_dir in $PATH
10233do
10234  IFS=$as_save_IFS
10235  test -z "$as_dir" && as_dir=.
10236    for ac_exec_ext in '' $ac_executable_extensions; do
10237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10238    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10240    break 2
10241  fi
10242done
10243  done
10244IFS=$as_save_IFS
10245
10246  ;;
10247esac
10248fi
10249SORT=$ac_cv_path_SORT
10250if test -n "$SORT"; then
10251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10252$as_echo "$SORT" >&6; }
10253else
10254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10255$as_echo "no" >&6; }
10256fi
10257
10258
10259          if test "x$SORT" = x; then
10260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10261          fi
10262        else
10263          # Otherwise we believe it is a complete path. Use it as it is.
10264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10265$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10267$as_echo_n "checking for SORT... " >&6; }
10268          if test ! -x "$tool_specified"; then
10269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10270$as_echo "not found" >&6; }
10271            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10272          fi
10273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10274$as_echo "$tool_specified" >&6; }
10275        fi
10276      fi
10277    fi
10278
10279  fi
10280
10281
10282
10283  if test "x$SORT" = x; then
10284    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10285  fi
10286
10287
10288
10289
10290
10291  # Publish this variable in the help.
10292
10293
10294  if [ -z "${TAIL+x}" ]; then
10295    # The variable is not set by user, try to locate tool using the code snippet
10296    for ac_prog in tail
10297do
10298  # Extract the first word of "$ac_prog", so it can be a program name with args.
10299set dummy $ac_prog; ac_word=$2
10300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10301$as_echo_n "checking for $ac_word... " >&6; }
10302if ${ac_cv_path_TAIL+:} false; then :
10303  $as_echo_n "(cached) " >&6
10304else
10305  case $TAIL in
10306  [\\/]* | ?:[\\/]*)
10307  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10308  ;;
10309  *)
10310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10311for as_dir in $PATH
10312do
10313  IFS=$as_save_IFS
10314  test -z "$as_dir" && as_dir=.
10315    for ac_exec_ext in '' $ac_executable_extensions; do
10316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10317    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10319    break 2
10320  fi
10321done
10322  done
10323IFS=$as_save_IFS
10324
10325  ;;
10326esac
10327fi
10328TAIL=$ac_cv_path_TAIL
10329if test -n "$TAIL"; then
10330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10331$as_echo "$TAIL" >&6; }
10332else
10333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10334$as_echo "no" >&6; }
10335fi
10336
10337
10338  test -n "$TAIL" && break
10339done
10340
10341  else
10342    # The variable is set, but is it from the command line or the environment?
10343
10344    # Try to remove the string !TAIL! from our list.
10345    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10346    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10347      # If it failed, the variable was not from the command line. Ignore it,
10348      # but warn the user (except for BASH, which is always set by the calling BASH).
10349      if test "xTAIL" != xBASH; then
10350        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10351$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10352      fi
10353      # Try to locate tool using the code snippet
10354      for ac_prog in tail
10355do
10356  # Extract the first word of "$ac_prog", so it can be a program name with args.
10357set dummy $ac_prog; ac_word=$2
10358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10359$as_echo_n "checking for $ac_word... " >&6; }
10360if ${ac_cv_path_TAIL+:} false; then :
10361  $as_echo_n "(cached) " >&6
10362else
10363  case $TAIL in
10364  [\\/]* | ?:[\\/]*)
10365  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10366  ;;
10367  *)
10368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10369for as_dir in $PATH
10370do
10371  IFS=$as_save_IFS
10372  test -z "$as_dir" && as_dir=.
10373    for ac_exec_ext in '' $ac_executable_extensions; do
10374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10375    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10377    break 2
10378  fi
10379done
10380  done
10381IFS=$as_save_IFS
10382
10383  ;;
10384esac
10385fi
10386TAIL=$ac_cv_path_TAIL
10387if test -n "$TAIL"; then
10388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10389$as_echo "$TAIL" >&6; }
10390else
10391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392$as_echo "no" >&6; }
10393fi
10394
10395
10396  test -n "$TAIL" && break
10397done
10398
10399    else
10400      # If it succeeded, then it was overridden by the user. We will use it
10401      # for the tool.
10402
10403      # First remove it from the list of overridden variables, so we can test
10404      # for unknown variables in the end.
10405      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10406
10407      # Check if we try to supply an empty value
10408      if test "x$TAIL" = x; then
10409        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10410$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10412$as_echo_n "checking for TAIL... " >&6; }
10413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10414$as_echo "disabled" >&6; }
10415      else
10416        # Check if the provided tool contains a complete path.
10417        tool_specified="$TAIL"
10418        tool_basename="${tool_specified##*/}"
10419        if test "x$tool_basename" = "x$tool_specified"; then
10420          # A command without a complete path is provided, search $PATH.
10421          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10422$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10423          # Extract the first word of "$tool_basename", so it can be a program name with args.
10424set dummy $tool_basename; ac_word=$2
10425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10426$as_echo_n "checking for $ac_word... " >&6; }
10427if ${ac_cv_path_TAIL+:} false; then :
10428  $as_echo_n "(cached) " >&6
10429else
10430  case $TAIL in
10431  [\\/]* | ?:[\\/]*)
10432  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10433  ;;
10434  *)
10435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10436for as_dir in $PATH
10437do
10438  IFS=$as_save_IFS
10439  test -z "$as_dir" && as_dir=.
10440    for ac_exec_ext in '' $ac_executable_extensions; do
10441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10442    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10444    break 2
10445  fi
10446done
10447  done
10448IFS=$as_save_IFS
10449
10450  ;;
10451esac
10452fi
10453TAIL=$ac_cv_path_TAIL
10454if test -n "$TAIL"; then
10455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10456$as_echo "$TAIL" >&6; }
10457else
10458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10459$as_echo "no" >&6; }
10460fi
10461
10462
10463          if test "x$TAIL" = x; then
10464            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10465          fi
10466        else
10467          # Otherwise we believe it is a complete path. Use it as it is.
10468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10469$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10470          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10471$as_echo_n "checking for TAIL... " >&6; }
10472          if test ! -x "$tool_specified"; then
10473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10474$as_echo "not found" >&6; }
10475            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10476          fi
10477          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10478$as_echo "$tool_specified" >&6; }
10479        fi
10480      fi
10481    fi
10482
10483  fi
10484
10485
10486
10487  if test "x$TAIL" = x; then
10488    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10489  fi
10490
10491
10492
10493
10494
10495  # Publish this variable in the help.
10496
10497
10498  if [ -z "${TAR+x}" ]; then
10499    # The variable is not set by user, try to locate tool using the code snippet
10500    for ac_prog in tar
10501do
10502  # Extract the first word of "$ac_prog", so it can be a program name with args.
10503set dummy $ac_prog; ac_word=$2
10504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10505$as_echo_n "checking for $ac_word... " >&6; }
10506if ${ac_cv_path_TAR+:} false; then :
10507  $as_echo_n "(cached) " >&6
10508else
10509  case $TAR in
10510  [\\/]* | ?:[\\/]*)
10511  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10512  ;;
10513  *)
10514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10515for as_dir in $PATH
10516do
10517  IFS=$as_save_IFS
10518  test -z "$as_dir" && as_dir=.
10519    for ac_exec_ext in '' $ac_executable_extensions; do
10520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10521    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10523    break 2
10524  fi
10525done
10526  done
10527IFS=$as_save_IFS
10528
10529  ;;
10530esac
10531fi
10532TAR=$ac_cv_path_TAR
10533if test -n "$TAR"; then
10534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10535$as_echo "$TAR" >&6; }
10536else
10537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10538$as_echo "no" >&6; }
10539fi
10540
10541
10542  test -n "$TAR" && break
10543done
10544
10545  else
10546    # The variable is set, but is it from the command line or the environment?
10547
10548    # Try to remove the string !TAR! from our list.
10549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10551      # If it failed, the variable was not from the command line. Ignore it,
10552      # but warn the user (except for BASH, which is always set by the calling BASH).
10553      if test "xTAR" != xBASH; then
10554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10555$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10556      fi
10557      # Try to locate tool using the code snippet
10558      for ac_prog in tar
10559do
10560  # Extract the first word of "$ac_prog", so it can be a program name with args.
10561set dummy $ac_prog; ac_word=$2
10562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10563$as_echo_n "checking for $ac_word... " >&6; }
10564if ${ac_cv_path_TAR+:} false; then :
10565  $as_echo_n "(cached) " >&6
10566else
10567  case $TAR in
10568  [\\/]* | ?:[\\/]*)
10569  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10570  ;;
10571  *)
10572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10573for as_dir in $PATH
10574do
10575  IFS=$as_save_IFS
10576  test -z "$as_dir" && as_dir=.
10577    for ac_exec_ext in '' $ac_executable_extensions; do
10578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10579    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10581    break 2
10582  fi
10583done
10584  done
10585IFS=$as_save_IFS
10586
10587  ;;
10588esac
10589fi
10590TAR=$ac_cv_path_TAR
10591if test -n "$TAR"; then
10592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10593$as_echo "$TAR" >&6; }
10594else
10595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10596$as_echo "no" >&6; }
10597fi
10598
10599
10600  test -n "$TAR" && break
10601done
10602
10603    else
10604      # If it succeeded, then it was overridden by the user. We will use it
10605      # for the tool.
10606
10607      # First remove it from the list of overridden variables, so we can test
10608      # for unknown variables in the end.
10609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10610
10611      # Check if we try to supply an empty value
10612      if test "x$TAR" = x; then
10613        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10614$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10615        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10616$as_echo_n "checking for TAR... " >&6; }
10617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10618$as_echo "disabled" >&6; }
10619      else
10620        # Check if the provided tool contains a complete path.
10621        tool_specified="$TAR"
10622        tool_basename="${tool_specified##*/}"
10623        if test "x$tool_basename" = "x$tool_specified"; then
10624          # A command without a complete path is provided, search $PATH.
10625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10626$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10627          # Extract the first word of "$tool_basename", so it can be a program name with args.
10628set dummy $tool_basename; ac_word=$2
10629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10630$as_echo_n "checking for $ac_word... " >&6; }
10631if ${ac_cv_path_TAR+:} false; then :
10632  $as_echo_n "(cached) " >&6
10633else
10634  case $TAR in
10635  [\\/]* | ?:[\\/]*)
10636  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10637  ;;
10638  *)
10639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10640for as_dir in $PATH
10641do
10642  IFS=$as_save_IFS
10643  test -z "$as_dir" && as_dir=.
10644    for ac_exec_ext in '' $ac_executable_extensions; do
10645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10646    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10648    break 2
10649  fi
10650done
10651  done
10652IFS=$as_save_IFS
10653
10654  ;;
10655esac
10656fi
10657TAR=$ac_cv_path_TAR
10658if test -n "$TAR"; then
10659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10660$as_echo "$TAR" >&6; }
10661else
10662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10663$as_echo "no" >&6; }
10664fi
10665
10666
10667          if test "x$TAR" = x; then
10668            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10669          fi
10670        else
10671          # Otherwise we believe it is a complete path. Use it as it is.
10672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10673$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10674          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10675$as_echo_n "checking for TAR... " >&6; }
10676          if test ! -x "$tool_specified"; then
10677            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10678$as_echo "not found" >&6; }
10679            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10680          fi
10681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10682$as_echo "$tool_specified" >&6; }
10683        fi
10684      fi
10685    fi
10686
10687  fi
10688
10689
10690
10691  if test "x$TAR" = x; then
10692    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10693  fi
10694
10695
10696
10697
10698
10699  # Publish this variable in the help.
10700
10701
10702  if [ -z "${TEE+x}" ]; then
10703    # The variable is not set by user, try to locate tool using the code snippet
10704    for ac_prog in tee
10705do
10706  # Extract the first word of "$ac_prog", so it can be a program name with args.
10707set dummy $ac_prog; ac_word=$2
10708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10709$as_echo_n "checking for $ac_word... " >&6; }
10710if ${ac_cv_path_TEE+:} false; then :
10711  $as_echo_n "(cached) " >&6
10712else
10713  case $TEE in
10714  [\\/]* | ?:[\\/]*)
10715  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10716  ;;
10717  *)
10718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10719for as_dir in $PATH
10720do
10721  IFS=$as_save_IFS
10722  test -z "$as_dir" && as_dir=.
10723    for ac_exec_ext in '' $ac_executable_extensions; do
10724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10725    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10727    break 2
10728  fi
10729done
10730  done
10731IFS=$as_save_IFS
10732
10733  ;;
10734esac
10735fi
10736TEE=$ac_cv_path_TEE
10737if test -n "$TEE"; then
10738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10739$as_echo "$TEE" >&6; }
10740else
10741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10742$as_echo "no" >&6; }
10743fi
10744
10745
10746  test -n "$TEE" && break
10747done
10748
10749  else
10750    # The variable is set, but is it from the command line or the environment?
10751
10752    # Try to remove the string !TEE! from our list.
10753    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10754    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10755      # If it failed, the variable was not from the command line. Ignore it,
10756      # but warn the user (except for BASH, which is always set by the calling BASH).
10757      if test "xTEE" != xBASH; then
10758        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10759$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10760      fi
10761      # Try to locate tool using the code snippet
10762      for ac_prog in tee
10763do
10764  # Extract the first word of "$ac_prog", so it can be a program name with args.
10765set dummy $ac_prog; ac_word=$2
10766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10767$as_echo_n "checking for $ac_word... " >&6; }
10768if ${ac_cv_path_TEE+:} false; then :
10769  $as_echo_n "(cached) " >&6
10770else
10771  case $TEE in
10772  [\\/]* | ?:[\\/]*)
10773  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10774  ;;
10775  *)
10776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10777for as_dir in $PATH
10778do
10779  IFS=$as_save_IFS
10780  test -z "$as_dir" && as_dir=.
10781    for ac_exec_ext in '' $ac_executable_extensions; do
10782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10783    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10785    break 2
10786  fi
10787done
10788  done
10789IFS=$as_save_IFS
10790
10791  ;;
10792esac
10793fi
10794TEE=$ac_cv_path_TEE
10795if test -n "$TEE"; then
10796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10797$as_echo "$TEE" >&6; }
10798else
10799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10800$as_echo "no" >&6; }
10801fi
10802
10803
10804  test -n "$TEE" && break
10805done
10806
10807    else
10808      # If it succeeded, then it was overridden by the user. We will use it
10809      # for the tool.
10810
10811      # First remove it from the list of overridden variables, so we can test
10812      # for unknown variables in the end.
10813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10814
10815      # Check if we try to supply an empty value
10816      if test "x$TEE" = x; then
10817        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10818$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10819        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10820$as_echo_n "checking for TEE... " >&6; }
10821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10822$as_echo "disabled" >&6; }
10823      else
10824        # Check if the provided tool contains a complete path.
10825        tool_specified="$TEE"
10826        tool_basename="${tool_specified##*/}"
10827        if test "x$tool_basename" = "x$tool_specified"; then
10828          # A command without a complete path is provided, search $PATH.
10829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10830$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10831          # Extract the first word of "$tool_basename", so it can be a program name with args.
10832set dummy $tool_basename; ac_word=$2
10833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10834$as_echo_n "checking for $ac_word... " >&6; }
10835if ${ac_cv_path_TEE+:} false; then :
10836  $as_echo_n "(cached) " >&6
10837else
10838  case $TEE in
10839  [\\/]* | ?:[\\/]*)
10840  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10841  ;;
10842  *)
10843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10844for as_dir in $PATH
10845do
10846  IFS=$as_save_IFS
10847  test -z "$as_dir" && as_dir=.
10848    for ac_exec_ext in '' $ac_executable_extensions; do
10849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10850    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10852    break 2
10853  fi
10854done
10855  done
10856IFS=$as_save_IFS
10857
10858  ;;
10859esac
10860fi
10861TEE=$ac_cv_path_TEE
10862if test -n "$TEE"; then
10863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10864$as_echo "$TEE" >&6; }
10865else
10866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10867$as_echo "no" >&6; }
10868fi
10869
10870
10871          if test "x$TEE" = x; then
10872            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10873          fi
10874        else
10875          # Otherwise we believe it is a complete path. Use it as it is.
10876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10877$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10878          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10879$as_echo_n "checking for TEE... " >&6; }
10880          if test ! -x "$tool_specified"; then
10881            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10882$as_echo "not found" >&6; }
10883            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10884          fi
10885          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10886$as_echo "$tool_specified" >&6; }
10887        fi
10888      fi
10889    fi
10890
10891  fi
10892
10893
10894
10895  if test "x$TEE" = x; then
10896    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10897  fi
10898
10899
10900
10901
10902
10903  # Publish this variable in the help.
10904
10905
10906  if [ -z "${TOUCH+x}" ]; then
10907    # The variable is not set by user, try to locate tool using the code snippet
10908    for ac_prog in touch
10909do
10910  # Extract the first word of "$ac_prog", so it can be a program name with args.
10911set dummy $ac_prog; ac_word=$2
10912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10913$as_echo_n "checking for $ac_word... " >&6; }
10914if ${ac_cv_path_TOUCH+:} false; then :
10915  $as_echo_n "(cached) " >&6
10916else
10917  case $TOUCH in
10918  [\\/]* | ?:[\\/]*)
10919  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10920  ;;
10921  *)
10922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10923for as_dir in $PATH
10924do
10925  IFS=$as_save_IFS
10926  test -z "$as_dir" && as_dir=.
10927    for ac_exec_ext in '' $ac_executable_extensions; do
10928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10929    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10931    break 2
10932  fi
10933done
10934  done
10935IFS=$as_save_IFS
10936
10937  ;;
10938esac
10939fi
10940TOUCH=$ac_cv_path_TOUCH
10941if test -n "$TOUCH"; then
10942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10943$as_echo "$TOUCH" >&6; }
10944else
10945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10946$as_echo "no" >&6; }
10947fi
10948
10949
10950  test -n "$TOUCH" && break
10951done
10952
10953  else
10954    # The variable is set, but is it from the command line or the environment?
10955
10956    # Try to remove the string !TOUCH! from our list.
10957    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10958    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10959      # If it failed, the variable was not from the command line. Ignore it,
10960      # but warn the user (except for BASH, which is always set by the calling BASH).
10961      if test "xTOUCH" != xBASH; then
10962        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10963$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10964      fi
10965      # Try to locate tool using the code snippet
10966      for ac_prog in touch
10967do
10968  # Extract the first word of "$ac_prog", so it can be a program name with args.
10969set dummy $ac_prog; ac_word=$2
10970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10971$as_echo_n "checking for $ac_word... " >&6; }
10972if ${ac_cv_path_TOUCH+:} false; then :
10973  $as_echo_n "(cached) " >&6
10974else
10975  case $TOUCH in
10976  [\\/]* | ?:[\\/]*)
10977  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10978  ;;
10979  *)
10980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10981for as_dir in $PATH
10982do
10983  IFS=$as_save_IFS
10984  test -z "$as_dir" && as_dir=.
10985    for ac_exec_ext in '' $ac_executable_extensions; do
10986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10987    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10989    break 2
10990  fi
10991done
10992  done
10993IFS=$as_save_IFS
10994
10995  ;;
10996esac
10997fi
10998TOUCH=$ac_cv_path_TOUCH
10999if test -n "$TOUCH"; then
11000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11001$as_echo "$TOUCH" >&6; }
11002else
11003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11004$as_echo "no" >&6; }
11005fi
11006
11007
11008  test -n "$TOUCH" && break
11009done
11010
11011    else
11012      # If it succeeded, then it was overridden by the user. We will use it
11013      # for the tool.
11014
11015      # First remove it from the list of overridden variables, so we can test
11016      # for unknown variables in the end.
11017      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11018
11019      # Check if we try to supply an empty value
11020      if test "x$TOUCH" = x; then
11021        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11022$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11023        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11024$as_echo_n "checking for TOUCH... " >&6; }
11025        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11026$as_echo "disabled" >&6; }
11027      else
11028        # Check if the provided tool contains a complete path.
11029        tool_specified="$TOUCH"
11030        tool_basename="${tool_specified##*/}"
11031        if test "x$tool_basename" = "x$tool_specified"; then
11032          # A command without a complete path is provided, search $PATH.
11033          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11034$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11035          # Extract the first word of "$tool_basename", so it can be a program name with args.
11036set dummy $tool_basename; ac_word=$2
11037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11038$as_echo_n "checking for $ac_word... " >&6; }
11039if ${ac_cv_path_TOUCH+:} false; then :
11040  $as_echo_n "(cached) " >&6
11041else
11042  case $TOUCH in
11043  [\\/]* | ?:[\\/]*)
11044  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11045  ;;
11046  *)
11047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11048for as_dir in $PATH
11049do
11050  IFS=$as_save_IFS
11051  test -z "$as_dir" && as_dir=.
11052    for ac_exec_ext in '' $ac_executable_extensions; do
11053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11054    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11056    break 2
11057  fi
11058done
11059  done
11060IFS=$as_save_IFS
11061
11062  ;;
11063esac
11064fi
11065TOUCH=$ac_cv_path_TOUCH
11066if test -n "$TOUCH"; then
11067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11068$as_echo "$TOUCH" >&6; }
11069else
11070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11071$as_echo "no" >&6; }
11072fi
11073
11074
11075          if test "x$TOUCH" = x; then
11076            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11077          fi
11078        else
11079          # Otherwise we believe it is a complete path. Use it as it is.
11080          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11081$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11082          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11083$as_echo_n "checking for TOUCH... " >&6; }
11084          if test ! -x "$tool_specified"; then
11085            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11086$as_echo "not found" >&6; }
11087            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11088          fi
11089          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11090$as_echo "$tool_specified" >&6; }
11091        fi
11092      fi
11093    fi
11094
11095  fi
11096
11097
11098
11099  if test "x$TOUCH" = x; then
11100    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11101  fi
11102
11103
11104
11105
11106
11107  # Publish this variable in the help.
11108
11109
11110  if [ -z "${TR+x}" ]; then
11111    # The variable is not set by user, try to locate tool using the code snippet
11112    for ac_prog in tr
11113do
11114  # Extract the first word of "$ac_prog", so it can be a program name with args.
11115set dummy $ac_prog; ac_word=$2
11116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11117$as_echo_n "checking for $ac_word... " >&6; }
11118if ${ac_cv_path_TR+:} false; then :
11119  $as_echo_n "(cached) " >&6
11120else
11121  case $TR in
11122  [\\/]* | ?:[\\/]*)
11123  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11124  ;;
11125  *)
11126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11127for as_dir in $PATH
11128do
11129  IFS=$as_save_IFS
11130  test -z "$as_dir" && as_dir=.
11131    for ac_exec_ext in '' $ac_executable_extensions; do
11132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11133    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11135    break 2
11136  fi
11137done
11138  done
11139IFS=$as_save_IFS
11140
11141  ;;
11142esac
11143fi
11144TR=$ac_cv_path_TR
11145if test -n "$TR"; then
11146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11147$as_echo "$TR" >&6; }
11148else
11149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11150$as_echo "no" >&6; }
11151fi
11152
11153
11154  test -n "$TR" && break
11155done
11156
11157  else
11158    # The variable is set, but is it from the command line or the environment?
11159
11160    # Try to remove the string !TR! from our list.
11161    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11162    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11163      # If it failed, the variable was not from the command line. Ignore it,
11164      # but warn the user (except for BASH, which is always set by the calling BASH).
11165      if test "xTR" != xBASH; then
11166        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11167$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11168      fi
11169      # Try to locate tool using the code snippet
11170      for ac_prog in tr
11171do
11172  # Extract the first word of "$ac_prog", so it can be a program name with args.
11173set dummy $ac_prog; ac_word=$2
11174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11175$as_echo_n "checking for $ac_word... " >&6; }
11176if ${ac_cv_path_TR+:} false; then :
11177  $as_echo_n "(cached) " >&6
11178else
11179  case $TR in
11180  [\\/]* | ?:[\\/]*)
11181  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11182  ;;
11183  *)
11184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11185for as_dir in $PATH
11186do
11187  IFS=$as_save_IFS
11188  test -z "$as_dir" && as_dir=.
11189    for ac_exec_ext in '' $ac_executable_extensions; do
11190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11191    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11193    break 2
11194  fi
11195done
11196  done
11197IFS=$as_save_IFS
11198
11199  ;;
11200esac
11201fi
11202TR=$ac_cv_path_TR
11203if test -n "$TR"; then
11204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11205$as_echo "$TR" >&6; }
11206else
11207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11208$as_echo "no" >&6; }
11209fi
11210
11211
11212  test -n "$TR" && break
11213done
11214
11215    else
11216      # If it succeeded, then it was overridden by the user. We will use it
11217      # for the tool.
11218
11219      # First remove it from the list of overridden variables, so we can test
11220      # for unknown variables in the end.
11221      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11222
11223      # Check if we try to supply an empty value
11224      if test "x$TR" = x; then
11225        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11226$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11228$as_echo_n "checking for TR... " >&6; }
11229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11230$as_echo "disabled" >&6; }
11231      else
11232        # Check if the provided tool contains a complete path.
11233        tool_specified="$TR"
11234        tool_basename="${tool_specified##*/}"
11235        if test "x$tool_basename" = "x$tool_specified"; then
11236          # A command without a complete path is provided, search $PATH.
11237          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11238$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11239          # Extract the first word of "$tool_basename", so it can be a program name with args.
11240set dummy $tool_basename; ac_word=$2
11241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11242$as_echo_n "checking for $ac_word... " >&6; }
11243if ${ac_cv_path_TR+:} false; then :
11244  $as_echo_n "(cached) " >&6
11245else
11246  case $TR in
11247  [\\/]* | ?:[\\/]*)
11248  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11249  ;;
11250  *)
11251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11252for as_dir in $PATH
11253do
11254  IFS=$as_save_IFS
11255  test -z "$as_dir" && as_dir=.
11256    for ac_exec_ext in '' $ac_executable_extensions; do
11257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11258    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11260    break 2
11261  fi
11262done
11263  done
11264IFS=$as_save_IFS
11265
11266  ;;
11267esac
11268fi
11269TR=$ac_cv_path_TR
11270if test -n "$TR"; then
11271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11272$as_echo "$TR" >&6; }
11273else
11274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11275$as_echo "no" >&6; }
11276fi
11277
11278
11279          if test "x$TR" = x; then
11280            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11281          fi
11282        else
11283          # Otherwise we believe it is a complete path. Use it as it is.
11284          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11285$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11286          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11287$as_echo_n "checking for TR... " >&6; }
11288          if test ! -x "$tool_specified"; then
11289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11290$as_echo "not found" >&6; }
11291            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11292          fi
11293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11294$as_echo "$tool_specified" >&6; }
11295        fi
11296      fi
11297    fi
11298
11299  fi
11300
11301
11302
11303  if test "x$TR" = x; then
11304    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11305  fi
11306
11307
11308
11309
11310
11311  # Publish this variable in the help.
11312
11313
11314  if [ -z "${UNAME+x}" ]; then
11315    # The variable is not set by user, try to locate tool using the code snippet
11316    for ac_prog in uname
11317do
11318  # Extract the first word of "$ac_prog", so it can be a program name with args.
11319set dummy $ac_prog; ac_word=$2
11320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11321$as_echo_n "checking for $ac_word... " >&6; }
11322if ${ac_cv_path_UNAME+:} false; then :
11323  $as_echo_n "(cached) " >&6
11324else
11325  case $UNAME in
11326  [\\/]* | ?:[\\/]*)
11327  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11328  ;;
11329  *)
11330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11331for as_dir in $PATH
11332do
11333  IFS=$as_save_IFS
11334  test -z "$as_dir" && as_dir=.
11335    for ac_exec_ext in '' $ac_executable_extensions; do
11336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11337    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11339    break 2
11340  fi
11341done
11342  done
11343IFS=$as_save_IFS
11344
11345  ;;
11346esac
11347fi
11348UNAME=$ac_cv_path_UNAME
11349if test -n "$UNAME"; then
11350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11351$as_echo "$UNAME" >&6; }
11352else
11353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11354$as_echo "no" >&6; }
11355fi
11356
11357
11358  test -n "$UNAME" && break
11359done
11360
11361  else
11362    # The variable is set, but is it from the command line or the environment?
11363
11364    # Try to remove the string !UNAME! from our list.
11365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11367      # If it failed, the variable was not from the command line. Ignore it,
11368      # but warn the user (except for BASH, which is always set by the calling BASH).
11369      if test "xUNAME" != xBASH; then
11370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11371$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11372      fi
11373      # Try to locate tool using the code snippet
11374      for ac_prog in uname
11375do
11376  # Extract the first word of "$ac_prog", so it can be a program name with args.
11377set dummy $ac_prog; ac_word=$2
11378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11379$as_echo_n "checking for $ac_word... " >&6; }
11380if ${ac_cv_path_UNAME+:} false; then :
11381  $as_echo_n "(cached) " >&6
11382else
11383  case $UNAME in
11384  [\\/]* | ?:[\\/]*)
11385  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11386  ;;
11387  *)
11388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11389for as_dir in $PATH
11390do
11391  IFS=$as_save_IFS
11392  test -z "$as_dir" && as_dir=.
11393    for ac_exec_ext in '' $ac_executable_extensions; do
11394  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11395    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11396    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11397    break 2
11398  fi
11399done
11400  done
11401IFS=$as_save_IFS
11402
11403  ;;
11404esac
11405fi
11406UNAME=$ac_cv_path_UNAME
11407if test -n "$UNAME"; then
11408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11409$as_echo "$UNAME" >&6; }
11410else
11411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11412$as_echo "no" >&6; }
11413fi
11414
11415
11416  test -n "$UNAME" && break
11417done
11418
11419    else
11420      # If it succeeded, then it was overridden by the user. We will use it
11421      # for the tool.
11422
11423      # First remove it from the list of overridden variables, so we can test
11424      # for unknown variables in the end.
11425      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11426
11427      # Check if we try to supply an empty value
11428      if test "x$UNAME" = x; then
11429        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11430$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11431        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11432$as_echo_n "checking for UNAME... " >&6; }
11433        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11434$as_echo "disabled" >&6; }
11435      else
11436        # Check if the provided tool contains a complete path.
11437        tool_specified="$UNAME"
11438        tool_basename="${tool_specified##*/}"
11439        if test "x$tool_basename" = "x$tool_specified"; then
11440          # A command without a complete path is provided, search $PATH.
11441          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11442$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11443          # Extract the first word of "$tool_basename", so it can be a program name with args.
11444set dummy $tool_basename; ac_word=$2
11445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11446$as_echo_n "checking for $ac_word... " >&6; }
11447if ${ac_cv_path_UNAME+:} false; then :
11448  $as_echo_n "(cached) " >&6
11449else
11450  case $UNAME in
11451  [\\/]* | ?:[\\/]*)
11452  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11453  ;;
11454  *)
11455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11456for as_dir in $PATH
11457do
11458  IFS=$as_save_IFS
11459  test -z "$as_dir" && as_dir=.
11460    for ac_exec_ext in '' $ac_executable_extensions; do
11461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11462    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11464    break 2
11465  fi
11466done
11467  done
11468IFS=$as_save_IFS
11469
11470  ;;
11471esac
11472fi
11473UNAME=$ac_cv_path_UNAME
11474if test -n "$UNAME"; then
11475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11476$as_echo "$UNAME" >&6; }
11477else
11478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479$as_echo "no" >&6; }
11480fi
11481
11482
11483          if test "x$UNAME" = x; then
11484            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11485          fi
11486        else
11487          # Otherwise we believe it is a complete path. Use it as it is.
11488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11489$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11490          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11491$as_echo_n "checking for UNAME... " >&6; }
11492          if test ! -x "$tool_specified"; then
11493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11494$as_echo "not found" >&6; }
11495            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11496          fi
11497          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11498$as_echo "$tool_specified" >&6; }
11499        fi
11500      fi
11501    fi
11502
11503  fi
11504
11505
11506
11507  if test "x$UNAME" = x; then
11508    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11509  fi
11510
11511
11512
11513
11514
11515  # Publish this variable in the help.
11516
11517
11518  if [ -z "${UNIQ+x}" ]; then
11519    # The variable is not set by user, try to locate tool using the code snippet
11520    for ac_prog in uniq
11521do
11522  # Extract the first word of "$ac_prog", so it can be a program name with args.
11523set dummy $ac_prog; ac_word=$2
11524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11525$as_echo_n "checking for $ac_word... " >&6; }
11526if ${ac_cv_path_UNIQ+:} false; then :
11527  $as_echo_n "(cached) " >&6
11528else
11529  case $UNIQ in
11530  [\\/]* | ?:[\\/]*)
11531  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11532  ;;
11533  *)
11534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11535for as_dir in $PATH
11536do
11537  IFS=$as_save_IFS
11538  test -z "$as_dir" && as_dir=.
11539    for ac_exec_ext in '' $ac_executable_extensions; do
11540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11541    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11543    break 2
11544  fi
11545done
11546  done
11547IFS=$as_save_IFS
11548
11549  ;;
11550esac
11551fi
11552UNIQ=$ac_cv_path_UNIQ
11553if test -n "$UNIQ"; then
11554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11555$as_echo "$UNIQ" >&6; }
11556else
11557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11558$as_echo "no" >&6; }
11559fi
11560
11561
11562  test -n "$UNIQ" && break
11563done
11564
11565  else
11566    # The variable is set, but is it from the command line or the environment?
11567
11568    # Try to remove the string !UNIQ! from our list.
11569    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11570    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11571      # If it failed, the variable was not from the command line. Ignore it,
11572      # but warn the user (except for BASH, which is always set by the calling BASH).
11573      if test "xUNIQ" != xBASH; then
11574        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11575$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11576      fi
11577      # Try to locate tool using the code snippet
11578      for ac_prog in uniq
11579do
11580  # Extract the first word of "$ac_prog", so it can be a program name with args.
11581set dummy $ac_prog; ac_word=$2
11582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11583$as_echo_n "checking for $ac_word... " >&6; }
11584if ${ac_cv_path_UNIQ+:} false; then :
11585  $as_echo_n "(cached) " >&6
11586else
11587  case $UNIQ in
11588  [\\/]* | ?:[\\/]*)
11589  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11590  ;;
11591  *)
11592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11593for as_dir in $PATH
11594do
11595  IFS=$as_save_IFS
11596  test -z "$as_dir" && as_dir=.
11597    for ac_exec_ext in '' $ac_executable_extensions; do
11598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11599    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11601    break 2
11602  fi
11603done
11604  done
11605IFS=$as_save_IFS
11606
11607  ;;
11608esac
11609fi
11610UNIQ=$ac_cv_path_UNIQ
11611if test -n "$UNIQ"; then
11612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11613$as_echo "$UNIQ" >&6; }
11614else
11615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11616$as_echo "no" >&6; }
11617fi
11618
11619
11620  test -n "$UNIQ" && break
11621done
11622
11623    else
11624      # If it succeeded, then it was overridden by the user. We will use it
11625      # for the tool.
11626
11627      # First remove it from the list of overridden variables, so we can test
11628      # for unknown variables in the end.
11629      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11630
11631      # Check if we try to supply an empty value
11632      if test "x$UNIQ" = x; then
11633        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11634$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11636$as_echo_n "checking for UNIQ... " >&6; }
11637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11638$as_echo "disabled" >&6; }
11639      else
11640        # Check if the provided tool contains a complete path.
11641        tool_specified="$UNIQ"
11642        tool_basename="${tool_specified##*/}"
11643        if test "x$tool_basename" = "x$tool_specified"; then
11644          # A command without a complete path is provided, search $PATH.
11645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11646$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11647          # Extract the first word of "$tool_basename", so it can be a program name with args.
11648set dummy $tool_basename; ac_word=$2
11649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11650$as_echo_n "checking for $ac_word... " >&6; }
11651if ${ac_cv_path_UNIQ+:} false; then :
11652  $as_echo_n "(cached) " >&6
11653else
11654  case $UNIQ in
11655  [\\/]* | ?:[\\/]*)
11656  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11657  ;;
11658  *)
11659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11660for as_dir in $PATH
11661do
11662  IFS=$as_save_IFS
11663  test -z "$as_dir" && as_dir=.
11664    for ac_exec_ext in '' $ac_executable_extensions; do
11665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11666    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11668    break 2
11669  fi
11670done
11671  done
11672IFS=$as_save_IFS
11673
11674  ;;
11675esac
11676fi
11677UNIQ=$ac_cv_path_UNIQ
11678if test -n "$UNIQ"; then
11679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11680$as_echo "$UNIQ" >&6; }
11681else
11682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11683$as_echo "no" >&6; }
11684fi
11685
11686
11687          if test "x$UNIQ" = x; then
11688            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11689          fi
11690        else
11691          # Otherwise we believe it is a complete path. Use it as it is.
11692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11693$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11694          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11695$as_echo_n "checking for UNIQ... " >&6; }
11696          if test ! -x "$tool_specified"; then
11697            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11698$as_echo "not found" >&6; }
11699            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11700          fi
11701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11702$as_echo "$tool_specified" >&6; }
11703        fi
11704      fi
11705    fi
11706
11707  fi
11708
11709
11710
11711  if test "x$UNIQ" = x; then
11712    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11713  fi
11714
11715
11716
11717
11718
11719  # Publish this variable in the help.
11720
11721
11722  if [ -z "${WC+x}" ]; then
11723    # The variable is not set by user, try to locate tool using the code snippet
11724    for ac_prog in wc
11725do
11726  # Extract the first word of "$ac_prog", so it can be a program name with args.
11727set dummy $ac_prog; ac_word=$2
11728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11729$as_echo_n "checking for $ac_word... " >&6; }
11730if ${ac_cv_path_WC+:} false; then :
11731  $as_echo_n "(cached) " >&6
11732else
11733  case $WC in
11734  [\\/]* | ?:[\\/]*)
11735  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11736  ;;
11737  *)
11738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11739for as_dir in $PATH
11740do
11741  IFS=$as_save_IFS
11742  test -z "$as_dir" && as_dir=.
11743    for ac_exec_ext in '' $ac_executable_extensions; do
11744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11745    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11747    break 2
11748  fi
11749done
11750  done
11751IFS=$as_save_IFS
11752
11753  ;;
11754esac
11755fi
11756WC=$ac_cv_path_WC
11757if test -n "$WC"; then
11758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11759$as_echo "$WC" >&6; }
11760else
11761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11762$as_echo "no" >&6; }
11763fi
11764
11765
11766  test -n "$WC" && break
11767done
11768
11769  else
11770    # The variable is set, but is it from the command line or the environment?
11771
11772    # Try to remove the string !WC! from our list.
11773    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11774    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11775      # If it failed, the variable was not from the command line. Ignore it,
11776      # but warn the user (except for BASH, which is always set by the calling BASH).
11777      if test "xWC" != xBASH; then
11778        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11779$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11780      fi
11781      # Try to locate tool using the code snippet
11782      for ac_prog in wc
11783do
11784  # Extract the first word of "$ac_prog", so it can be a program name with args.
11785set dummy $ac_prog; ac_word=$2
11786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11787$as_echo_n "checking for $ac_word... " >&6; }
11788if ${ac_cv_path_WC+:} false; then :
11789  $as_echo_n "(cached) " >&6
11790else
11791  case $WC in
11792  [\\/]* | ?:[\\/]*)
11793  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11794  ;;
11795  *)
11796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11797for as_dir in $PATH
11798do
11799  IFS=$as_save_IFS
11800  test -z "$as_dir" && as_dir=.
11801    for ac_exec_ext in '' $ac_executable_extensions; do
11802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11803    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11805    break 2
11806  fi
11807done
11808  done
11809IFS=$as_save_IFS
11810
11811  ;;
11812esac
11813fi
11814WC=$ac_cv_path_WC
11815if test -n "$WC"; then
11816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11817$as_echo "$WC" >&6; }
11818else
11819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11820$as_echo "no" >&6; }
11821fi
11822
11823
11824  test -n "$WC" && break
11825done
11826
11827    else
11828      # If it succeeded, then it was overridden by the user. We will use it
11829      # for the tool.
11830
11831      # First remove it from the list of overridden variables, so we can test
11832      # for unknown variables in the end.
11833      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11834
11835      # Check if we try to supply an empty value
11836      if test "x$WC" = x; then
11837        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11838$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11839        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11840$as_echo_n "checking for WC... " >&6; }
11841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11842$as_echo "disabled" >&6; }
11843      else
11844        # Check if the provided tool contains a complete path.
11845        tool_specified="$WC"
11846        tool_basename="${tool_specified##*/}"
11847        if test "x$tool_basename" = "x$tool_specified"; then
11848          # A command without a complete path is provided, search $PATH.
11849          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11850$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11851          # Extract the first word of "$tool_basename", so it can be a program name with args.
11852set dummy $tool_basename; ac_word=$2
11853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11854$as_echo_n "checking for $ac_word... " >&6; }
11855if ${ac_cv_path_WC+:} false; then :
11856  $as_echo_n "(cached) " >&6
11857else
11858  case $WC in
11859  [\\/]* | ?:[\\/]*)
11860  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11861  ;;
11862  *)
11863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11864for as_dir in $PATH
11865do
11866  IFS=$as_save_IFS
11867  test -z "$as_dir" && as_dir=.
11868    for ac_exec_ext in '' $ac_executable_extensions; do
11869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11870    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11872    break 2
11873  fi
11874done
11875  done
11876IFS=$as_save_IFS
11877
11878  ;;
11879esac
11880fi
11881WC=$ac_cv_path_WC
11882if test -n "$WC"; then
11883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11884$as_echo "$WC" >&6; }
11885else
11886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11887$as_echo "no" >&6; }
11888fi
11889
11890
11891          if test "x$WC" = x; then
11892            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11893          fi
11894        else
11895          # Otherwise we believe it is a complete path. Use it as it is.
11896          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11897$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11898          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11899$as_echo_n "checking for WC... " >&6; }
11900          if test ! -x "$tool_specified"; then
11901            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11902$as_echo "not found" >&6; }
11903            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11904          fi
11905          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11906$as_echo "$tool_specified" >&6; }
11907        fi
11908      fi
11909    fi
11910
11911  fi
11912
11913
11914
11915  if test "x$WC" = x; then
11916    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11917  fi
11918
11919
11920
11921
11922
11923  # Publish this variable in the help.
11924
11925
11926  if [ -z "${WHICH+x}" ]; then
11927    # The variable is not set by user, try to locate tool using the code snippet
11928    for ac_prog in which
11929do
11930  # Extract the first word of "$ac_prog", so it can be a program name with args.
11931set dummy $ac_prog; ac_word=$2
11932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11933$as_echo_n "checking for $ac_word... " >&6; }
11934if ${ac_cv_path_WHICH+:} false; then :
11935  $as_echo_n "(cached) " >&6
11936else
11937  case $WHICH in
11938  [\\/]* | ?:[\\/]*)
11939  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11940  ;;
11941  *)
11942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11943for as_dir in $PATH
11944do
11945  IFS=$as_save_IFS
11946  test -z "$as_dir" && as_dir=.
11947    for ac_exec_ext in '' $ac_executable_extensions; do
11948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11949    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11951    break 2
11952  fi
11953done
11954  done
11955IFS=$as_save_IFS
11956
11957  ;;
11958esac
11959fi
11960WHICH=$ac_cv_path_WHICH
11961if test -n "$WHICH"; then
11962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11963$as_echo "$WHICH" >&6; }
11964else
11965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11966$as_echo "no" >&6; }
11967fi
11968
11969
11970  test -n "$WHICH" && break
11971done
11972
11973  else
11974    # The variable is set, but is it from the command line or the environment?
11975
11976    # Try to remove the string !WHICH! from our list.
11977    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11978    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11979      # If it failed, the variable was not from the command line. Ignore it,
11980      # but warn the user (except for BASH, which is always set by the calling BASH).
11981      if test "xWHICH" != xBASH; then
11982        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11983$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11984      fi
11985      # Try to locate tool using the code snippet
11986      for ac_prog in which
11987do
11988  # Extract the first word of "$ac_prog", so it can be a program name with args.
11989set dummy $ac_prog; ac_word=$2
11990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11991$as_echo_n "checking for $ac_word... " >&6; }
11992if ${ac_cv_path_WHICH+:} false; then :
11993  $as_echo_n "(cached) " >&6
11994else
11995  case $WHICH in
11996  [\\/]* | ?:[\\/]*)
11997  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11998  ;;
11999  *)
12000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12001for as_dir in $PATH
12002do
12003  IFS=$as_save_IFS
12004  test -z "$as_dir" && as_dir=.
12005    for ac_exec_ext in '' $ac_executable_extensions; do
12006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12007    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12009    break 2
12010  fi
12011done
12012  done
12013IFS=$as_save_IFS
12014
12015  ;;
12016esac
12017fi
12018WHICH=$ac_cv_path_WHICH
12019if test -n "$WHICH"; then
12020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12021$as_echo "$WHICH" >&6; }
12022else
12023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12024$as_echo "no" >&6; }
12025fi
12026
12027
12028  test -n "$WHICH" && break
12029done
12030
12031    else
12032      # If it succeeded, then it was overridden by the user. We will use it
12033      # for the tool.
12034
12035      # First remove it from the list of overridden variables, so we can test
12036      # for unknown variables in the end.
12037      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12038
12039      # Check if we try to supply an empty value
12040      if test "x$WHICH" = x; then
12041        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12042$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12044$as_echo_n "checking for WHICH... " >&6; }
12045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12046$as_echo "disabled" >&6; }
12047      else
12048        # Check if the provided tool contains a complete path.
12049        tool_specified="$WHICH"
12050        tool_basename="${tool_specified##*/}"
12051        if test "x$tool_basename" = "x$tool_specified"; then
12052          # A command without a complete path is provided, search $PATH.
12053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12054$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12055          # Extract the first word of "$tool_basename", so it can be a program name with args.
12056set dummy $tool_basename; ac_word=$2
12057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12058$as_echo_n "checking for $ac_word... " >&6; }
12059if ${ac_cv_path_WHICH+:} false; then :
12060  $as_echo_n "(cached) " >&6
12061else
12062  case $WHICH in
12063  [\\/]* | ?:[\\/]*)
12064  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12065  ;;
12066  *)
12067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12068for as_dir in $PATH
12069do
12070  IFS=$as_save_IFS
12071  test -z "$as_dir" && as_dir=.
12072    for ac_exec_ext in '' $ac_executable_extensions; do
12073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12074    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12076    break 2
12077  fi
12078done
12079  done
12080IFS=$as_save_IFS
12081
12082  ;;
12083esac
12084fi
12085WHICH=$ac_cv_path_WHICH
12086if test -n "$WHICH"; then
12087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12088$as_echo "$WHICH" >&6; }
12089else
12090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12091$as_echo "no" >&6; }
12092fi
12093
12094
12095          if test "x$WHICH" = x; then
12096            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12097          fi
12098        else
12099          # Otherwise we believe it is a complete path. Use it as it is.
12100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12101$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12102          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12103$as_echo_n "checking for WHICH... " >&6; }
12104          if test ! -x "$tool_specified"; then
12105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12106$as_echo "not found" >&6; }
12107            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12108          fi
12109          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12110$as_echo "$tool_specified" >&6; }
12111        fi
12112      fi
12113    fi
12114
12115  fi
12116
12117
12118
12119  if test "x$WHICH" = x; then
12120    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12121  fi
12122
12123
12124
12125
12126
12127  # Publish this variable in the help.
12128
12129
12130  if [ -z "${XARGS+x}" ]; then
12131    # The variable is not set by user, try to locate tool using the code snippet
12132    for ac_prog in xargs
12133do
12134  # Extract the first word of "$ac_prog", so it can be a program name with args.
12135set dummy $ac_prog; ac_word=$2
12136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12137$as_echo_n "checking for $ac_word... " >&6; }
12138if ${ac_cv_path_XARGS+:} false; then :
12139  $as_echo_n "(cached) " >&6
12140else
12141  case $XARGS in
12142  [\\/]* | ?:[\\/]*)
12143  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12144  ;;
12145  *)
12146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12147for as_dir in $PATH
12148do
12149  IFS=$as_save_IFS
12150  test -z "$as_dir" && as_dir=.
12151    for ac_exec_ext in '' $ac_executable_extensions; do
12152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12153    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12155    break 2
12156  fi
12157done
12158  done
12159IFS=$as_save_IFS
12160
12161  ;;
12162esac
12163fi
12164XARGS=$ac_cv_path_XARGS
12165if test -n "$XARGS"; then
12166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12167$as_echo "$XARGS" >&6; }
12168else
12169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12170$as_echo "no" >&6; }
12171fi
12172
12173
12174  test -n "$XARGS" && break
12175done
12176
12177  else
12178    # The variable is set, but is it from the command line or the environment?
12179
12180    # Try to remove the string !XARGS! from our list.
12181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12183      # If it failed, the variable was not from the command line. Ignore it,
12184      # but warn the user (except for BASH, which is always set by the calling BASH).
12185      if test "xXARGS" != xBASH; then
12186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12187$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12188      fi
12189      # Try to locate tool using the code snippet
12190      for ac_prog in xargs
12191do
12192  # Extract the first word of "$ac_prog", so it can be a program name with args.
12193set dummy $ac_prog; ac_word=$2
12194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12195$as_echo_n "checking for $ac_word... " >&6; }
12196if ${ac_cv_path_XARGS+:} false; then :
12197  $as_echo_n "(cached) " >&6
12198else
12199  case $XARGS in
12200  [\\/]* | ?:[\\/]*)
12201  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12202  ;;
12203  *)
12204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12205for as_dir in $PATH
12206do
12207  IFS=$as_save_IFS
12208  test -z "$as_dir" && as_dir=.
12209    for ac_exec_ext in '' $ac_executable_extensions; do
12210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12211    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12213    break 2
12214  fi
12215done
12216  done
12217IFS=$as_save_IFS
12218
12219  ;;
12220esac
12221fi
12222XARGS=$ac_cv_path_XARGS
12223if test -n "$XARGS"; then
12224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12225$as_echo "$XARGS" >&6; }
12226else
12227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12228$as_echo "no" >&6; }
12229fi
12230
12231
12232  test -n "$XARGS" && break
12233done
12234
12235    else
12236      # If it succeeded, then it was overridden by the user. We will use it
12237      # for the tool.
12238
12239      # First remove it from the list of overridden variables, so we can test
12240      # for unknown variables in the end.
12241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12242
12243      # Check if we try to supply an empty value
12244      if test "x$XARGS" = x; then
12245        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12246$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12247        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12248$as_echo_n "checking for XARGS... " >&6; }
12249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12250$as_echo "disabled" >&6; }
12251      else
12252        # Check if the provided tool contains a complete path.
12253        tool_specified="$XARGS"
12254        tool_basename="${tool_specified##*/}"
12255        if test "x$tool_basename" = "x$tool_specified"; then
12256          # A command without a complete path is provided, search $PATH.
12257          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12258$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12259          # Extract the first word of "$tool_basename", so it can be a program name with args.
12260set dummy $tool_basename; ac_word=$2
12261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12262$as_echo_n "checking for $ac_word... " >&6; }
12263if ${ac_cv_path_XARGS+:} false; then :
12264  $as_echo_n "(cached) " >&6
12265else
12266  case $XARGS in
12267  [\\/]* | ?:[\\/]*)
12268  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12269  ;;
12270  *)
12271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12272for as_dir in $PATH
12273do
12274  IFS=$as_save_IFS
12275  test -z "$as_dir" && as_dir=.
12276    for ac_exec_ext in '' $ac_executable_extensions; do
12277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12278    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12280    break 2
12281  fi
12282done
12283  done
12284IFS=$as_save_IFS
12285
12286  ;;
12287esac
12288fi
12289XARGS=$ac_cv_path_XARGS
12290if test -n "$XARGS"; then
12291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12292$as_echo "$XARGS" >&6; }
12293else
12294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12295$as_echo "no" >&6; }
12296fi
12297
12298
12299          if test "x$XARGS" = x; then
12300            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12301          fi
12302        else
12303          # Otherwise we believe it is a complete path. Use it as it is.
12304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12305$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12306          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12307$as_echo_n "checking for XARGS... " >&6; }
12308          if test ! -x "$tool_specified"; then
12309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12310$as_echo "not found" >&6; }
12311            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12312          fi
12313          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12314$as_echo "$tool_specified" >&6; }
12315        fi
12316      fi
12317    fi
12318
12319  fi
12320
12321
12322
12323  if test "x$XARGS" = x; then
12324    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12325  fi
12326
12327
12328
12329  # Then required tools that require some special treatment.
12330
12331
12332  # Publish this variable in the help.
12333
12334
12335  if [ -z "${AWK+x}" ]; then
12336    # The variable is not set by user, try to locate tool using the code snippet
12337    for ac_prog in gawk mawk nawk awk
12338do
12339  # Extract the first word of "$ac_prog", so it can be a program name with args.
12340set dummy $ac_prog; ac_word=$2
12341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12342$as_echo_n "checking for $ac_word... " >&6; }
12343if ${ac_cv_prog_AWK+:} false; then :
12344  $as_echo_n "(cached) " >&6
12345else
12346  if test -n "$AWK"; then
12347  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12348else
12349as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12350for as_dir in $PATH
12351do
12352  IFS=$as_save_IFS
12353  test -z "$as_dir" && as_dir=.
12354    for ac_exec_ext in '' $ac_executable_extensions; do
12355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12356    ac_cv_prog_AWK="$ac_prog"
12357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12358    break 2
12359  fi
12360done
12361  done
12362IFS=$as_save_IFS
12363
12364fi
12365fi
12366AWK=$ac_cv_prog_AWK
12367if test -n "$AWK"; then
12368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12369$as_echo "$AWK" >&6; }
12370else
12371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12372$as_echo "no" >&6; }
12373fi
12374
12375
12376  test -n "$AWK" && break
12377done
12378
12379  else
12380    # The variable is set, but is it from the command line or the environment?
12381
12382    # Try to remove the string !AWK! from our list.
12383    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12384    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12385      # If it failed, the variable was not from the command line. Ignore it,
12386      # but warn the user (except for BASH, which is always set by the calling BASH).
12387      if test "xAWK" != xBASH; then
12388        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12389$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12390      fi
12391      # Try to locate tool using the code snippet
12392      for ac_prog in gawk mawk nawk awk
12393do
12394  # Extract the first word of "$ac_prog", so it can be a program name with args.
12395set dummy $ac_prog; ac_word=$2
12396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12397$as_echo_n "checking for $ac_word... " >&6; }
12398if ${ac_cv_prog_AWK+:} false; then :
12399  $as_echo_n "(cached) " >&6
12400else
12401  if test -n "$AWK"; then
12402  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12403else
12404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12405for as_dir in $PATH
12406do
12407  IFS=$as_save_IFS
12408  test -z "$as_dir" && as_dir=.
12409    for ac_exec_ext in '' $ac_executable_extensions; do
12410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12411    ac_cv_prog_AWK="$ac_prog"
12412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12413    break 2
12414  fi
12415done
12416  done
12417IFS=$as_save_IFS
12418
12419fi
12420fi
12421AWK=$ac_cv_prog_AWK
12422if test -n "$AWK"; then
12423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12424$as_echo "$AWK" >&6; }
12425else
12426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12427$as_echo "no" >&6; }
12428fi
12429
12430
12431  test -n "$AWK" && break
12432done
12433
12434    else
12435      # If it succeeded, then it was overridden by the user. We will use it
12436      # for the tool.
12437
12438      # First remove it from the list of overridden variables, so we can test
12439      # for unknown variables in the end.
12440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12441
12442      # Check if we try to supply an empty value
12443      if test "x$AWK" = x; then
12444        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12445$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12446        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12447$as_echo_n "checking for AWK... " >&6; }
12448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12449$as_echo "disabled" >&6; }
12450      else
12451        # Check if the provided tool contains a complete path.
12452        tool_specified="$AWK"
12453        tool_basename="${tool_specified##*/}"
12454        if test "x$tool_basename" = "x$tool_specified"; then
12455          # A command without a complete path is provided, search $PATH.
12456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12457$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12458          # Extract the first word of "$tool_basename", so it can be a program name with args.
12459set dummy $tool_basename; ac_word=$2
12460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12461$as_echo_n "checking for $ac_word... " >&6; }
12462if ${ac_cv_path_AWK+:} false; then :
12463  $as_echo_n "(cached) " >&6
12464else
12465  case $AWK in
12466  [\\/]* | ?:[\\/]*)
12467  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12468  ;;
12469  *)
12470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12471for as_dir in $PATH
12472do
12473  IFS=$as_save_IFS
12474  test -z "$as_dir" && as_dir=.
12475    for ac_exec_ext in '' $ac_executable_extensions; do
12476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12477    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12479    break 2
12480  fi
12481done
12482  done
12483IFS=$as_save_IFS
12484
12485  ;;
12486esac
12487fi
12488AWK=$ac_cv_path_AWK
12489if test -n "$AWK"; then
12490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12491$as_echo "$AWK" >&6; }
12492else
12493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12494$as_echo "no" >&6; }
12495fi
12496
12497
12498          if test "x$AWK" = x; then
12499            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12500          fi
12501        else
12502          # Otherwise we believe it is a complete path. Use it as it is.
12503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12504$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12505          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12506$as_echo_n "checking for AWK... " >&6; }
12507          if test ! -x "$tool_specified"; then
12508            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12509$as_echo "not found" >&6; }
12510            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12511          fi
12512          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12513$as_echo "$tool_specified" >&6; }
12514        fi
12515      fi
12516    fi
12517
12518  fi
12519
12520
12521  if test "x$AWK" = x; then
12522    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12523  fi
12524
12525
12526
12527
12528  # Publish this variable in the help.
12529
12530
12531  if [ -z "${GREP+x}" ]; then
12532    # The variable is not set by user, try to locate tool using the code snippet
12533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12534$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12535if ${ac_cv_path_GREP+:} false; then :
12536  $as_echo_n "(cached) " >&6
12537else
12538  if test -z "$GREP"; then
12539  ac_path_GREP_found=false
12540  # Loop through the user's path and test for each of PROGNAME-LIST
12541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12542for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12543do
12544  IFS=$as_save_IFS
12545  test -z "$as_dir" && as_dir=.
12546    for ac_prog in grep ggrep; do
12547    for ac_exec_ext in '' $ac_executable_extensions; do
12548      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12549      as_fn_executable_p "$ac_path_GREP" || continue
12550# Check for GNU ac_path_GREP and select it if it is found.
12551  # Check for GNU $ac_path_GREP
12552case `"$ac_path_GREP" --version 2>&1` in
12553*GNU*)
12554  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12555*)
12556  ac_count=0
12557  $as_echo_n 0123456789 >"conftest.in"
12558  while :
12559  do
12560    cat "conftest.in" "conftest.in" >"conftest.tmp"
12561    mv "conftest.tmp" "conftest.in"
12562    cp "conftest.in" "conftest.nl"
12563    $as_echo 'GREP' >> "conftest.nl"
12564    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12565    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12566    as_fn_arith $ac_count + 1 && ac_count=$as_val
12567    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12568      # Best one so far, save it but keep looking for a better one
12569      ac_cv_path_GREP="$ac_path_GREP"
12570      ac_path_GREP_max=$ac_count
12571    fi
12572    # 10*(2^10) chars as input seems more than enough
12573    test $ac_count -gt 10 && break
12574  done
12575  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12576esac
12577
12578      $ac_path_GREP_found && break 3
12579    done
12580  done
12581  done
12582IFS=$as_save_IFS
12583  if test -z "$ac_cv_path_GREP"; then
12584    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12585  fi
12586else
12587  ac_cv_path_GREP=$GREP
12588fi
12589
12590fi
12591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12592$as_echo "$ac_cv_path_GREP" >&6; }
12593 GREP="$ac_cv_path_GREP"
12594
12595
12596  else
12597    # The variable is set, but is it from the command line or the environment?
12598
12599    # Try to remove the string !GREP! from our list.
12600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12602      # If it failed, the variable was not from the command line. Ignore it,
12603      # but warn the user (except for BASH, which is always set by the calling BASH).
12604      if test "xGREP" != xBASH; then
12605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12606$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12607      fi
12608      # Try to locate tool using the code snippet
12609      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12610$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12611if ${ac_cv_path_GREP+:} false; then :
12612  $as_echo_n "(cached) " >&6
12613else
12614  if test -z "$GREP"; then
12615  ac_path_GREP_found=false
12616  # Loop through the user's path and test for each of PROGNAME-LIST
12617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12618for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12619do
12620  IFS=$as_save_IFS
12621  test -z "$as_dir" && as_dir=.
12622    for ac_prog in grep ggrep; do
12623    for ac_exec_ext in '' $ac_executable_extensions; do
12624      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12625      as_fn_executable_p "$ac_path_GREP" || continue
12626# Check for GNU ac_path_GREP and select it if it is found.
12627  # Check for GNU $ac_path_GREP
12628case `"$ac_path_GREP" --version 2>&1` in
12629*GNU*)
12630  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12631*)
12632  ac_count=0
12633  $as_echo_n 0123456789 >"conftest.in"
12634  while :
12635  do
12636    cat "conftest.in" "conftest.in" >"conftest.tmp"
12637    mv "conftest.tmp" "conftest.in"
12638    cp "conftest.in" "conftest.nl"
12639    $as_echo 'GREP' >> "conftest.nl"
12640    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12641    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12642    as_fn_arith $ac_count + 1 && ac_count=$as_val
12643    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12644      # Best one so far, save it but keep looking for a better one
12645      ac_cv_path_GREP="$ac_path_GREP"
12646      ac_path_GREP_max=$ac_count
12647    fi
12648    # 10*(2^10) chars as input seems more than enough
12649    test $ac_count -gt 10 && break
12650  done
12651  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12652esac
12653
12654      $ac_path_GREP_found && break 3
12655    done
12656  done
12657  done
12658IFS=$as_save_IFS
12659  if test -z "$ac_cv_path_GREP"; then
12660    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12661  fi
12662else
12663  ac_cv_path_GREP=$GREP
12664fi
12665
12666fi
12667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12668$as_echo "$ac_cv_path_GREP" >&6; }
12669 GREP="$ac_cv_path_GREP"
12670
12671
12672    else
12673      # If it succeeded, then it was overridden by the user. We will use it
12674      # for the tool.
12675
12676      # First remove it from the list of overridden variables, so we can test
12677      # for unknown variables in the end.
12678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12679
12680      # Check if we try to supply an empty value
12681      if test "x$GREP" = x; then
12682        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12683$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12685$as_echo_n "checking for GREP... " >&6; }
12686        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12687$as_echo "disabled" >&6; }
12688      else
12689        # Check if the provided tool contains a complete path.
12690        tool_specified="$GREP"
12691        tool_basename="${tool_specified##*/}"
12692        if test "x$tool_basename" = "x$tool_specified"; then
12693          # A command without a complete path is provided, search $PATH.
12694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12695$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12696          # Extract the first word of "$tool_basename", so it can be a program name with args.
12697set dummy $tool_basename; ac_word=$2
12698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12699$as_echo_n "checking for $ac_word... " >&6; }
12700if ${ac_cv_path_GREP+:} false; then :
12701  $as_echo_n "(cached) " >&6
12702else
12703  case $GREP in
12704  [\\/]* | ?:[\\/]*)
12705  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12706  ;;
12707  *)
12708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12709for as_dir in $PATH
12710do
12711  IFS=$as_save_IFS
12712  test -z "$as_dir" && as_dir=.
12713    for ac_exec_ext in '' $ac_executable_extensions; do
12714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12715    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12717    break 2
12718  fi
12719done
12720  done
12721IFS=$as_save_IFS
12722
12723  ;;
12724esac
12725fi
12726GREP=$ac_cv_path_GREP
12727if test -n "$GREP"; then
12728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12729$as_echo "$GREP" >&6; }
12730else
12731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12732$as_echo "no" >&6; }
12733fi
12734
12735
12736          if test "x$GREP" = x; then
12737            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12738          fi
12739        else
12740          # Otherwise we believe it is a complete path. Use it as it is.
12741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12742$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12743          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12744$as_echo_n "checking for GREP... " >&6; }
12745          if test ! -x "$tool_specified"; then
12746            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12747$as_echo "not found" >&6; }
12748            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12749          fi
12750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12751$as_echo "$tool_specified" >&6; }
12752        fi
12753      fi
12754    fi
12755
12756  fi
12757
12758
12759  if test "x$GREP" = x; then
12760    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12761  fi
12762
12763
12764
12765
12766  # Publish this variable in the help.
12767
12768
12769  if [ -z "${EGREP+x}" ]; then
12770    # The variable is not set by user, try to locate tool using the code snippet
12771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12772$as_echo_n "checking for egrep... " >&6; }
12773if ${ac_cv_path_EGREP+:} false; then :
12774  $as_echo_n "(cached) " >&6
12775else
12776  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12777   then ac_cv_path_EGREP="$GREP -E"
12778   else
12779     if test -z "$EGREP"; then
12780  ac_path_EGREP_found=false
12781  # Loop through the user's path and test for each of PROGNAME-LIST
12782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12784do
12785  IFS=$as_save_IFS
12786  test -z "$as_dir" && as_dir=.
12787    for ac_prog in egrep; do
12788    for ac_exec_ext in '' $ac_executable_extensions; do
12789      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12790      as_fn_executable_p "$ac_path_EGREP" || continue
12791# Check for GNU ac_path_EGREP and select it if it is found.
12792  # Check for GNU $ac_path_EGREP
12793case `"$ac_path_EGREP" --version 2>&1` in
12794*GNU*)
12795  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12796*)
12797  ac_count=0
12798  $as_echo_n 0123456789 >"conftest.in"
12799  while :
12800  do
12801    cat "conftest.in" "conftest.in" >"conftest.tmp"
12802    mv "conftest.tmp" "conftest.in"
12803    cp "conftest.in" "conftest.nl"
12804    $as_echo 'EGREP' >> "conftest.nl"
12805    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12806    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12807    as_fn_arith $ac_count + 1 && ac_count=$as_val
12808    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12809      # Best one so far, save it but keep looking for a better one
12810      ac_cv_path_EGREP="$ac_path_EGREP"
12811      ac_path_EGREP_max=$ac_count
12812    fi
12813    # 10*(2^10) chars as input seems more than enough
12814    test $ac_count -gt 10 && break
12815  done
12816  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12817esac
12818
12819      $ac_path_EGREP_found && break 3
12820    done
12821  done
12822  done
12823IFS=$as_save_IFS
12824  if test -z "$ac_cv_path_EGREP"; then
12825    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12826  fi
12827else
12828  ac_cv_path_EGREP=$EGREP
12829fi
12830
12831   fi
12832fi
12833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12834$as_echo "$ac_cv_path_EGREP" >&6; }
12835 EGREP="$ac_cv_path_EGREP"
12836
12837
12838  else
12839    # The variable is set, but is it from the command line or the environment?
12840
12841    # Try to remove the string !EGREP! from our list.
12842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12844      # If it failed, the variable was not from the command line. Ignore it,
12845      # but warn the user (except for BASH, which is always set by the calling BASH).
12846      if test "xEGREP" != xBASH; then
12847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12848$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12849      fi
12850      # Try to locate tool using the code snippet
12851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12852$as_echo_n "checking for egrep... " >&6; }
12853if ${ac_cv_path_EGREP+:} false; then :
12854  $as_echo_n "(cached) " >&6
12855else
12856  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12857   then ac_cv_path_EGREP="$GREP -E"
12858   else
12859     if test -z "$EGREP"; then
12860  ac_path_EGREP_found=false
12861  # Loop through the user's path and test for each of PROGNAME-LIST
12862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12863for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12864do
12865  IFS=$as_save_IFS
12866  test -z "$as_dir" && as_dir=.
12867    for ac_prog in egrep; do
12868    for ac_exec_ext in '' $ac_executable_extensions; do
12869      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12870      as_fn_executable_p "$ac_path_EGREP" || continue
12871# Check for GNU ac_path_EGREP and select it if it is found.
12872  # Check for GNU $ac_path_EGREP
12873case `"$ac_path_EGREP" --version 2>&1` in
12874*GNU*)
12875  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12876*)
12877  ac_count=0
12878  $as_echo_n 0123456789 >"conftest.in"
12879  while :
12880  do
12881    cat "conftest.in" "conftest.in" >"conftest.tmp"
12882    mv "conftest.tmp" "conftest.in"
12883    cp "conftest.in" "conftest.nl"
12884    $as_echo 'EGREP' >> "conftest.nl"
12885    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12886    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12887    as_fn_arith $ac_count + 1 && ac_count=$as_val
12888    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12889      # Best one so far, save it but keep looking for a better one
12890      ac_cv_path_EGREP="$ac_path_EGREP"
12891      ac_path_EGREP_max=$ac_count
12892    fi
12893    # 10*(2^10) chars as input seems more than enough
12894    test $ac_count -gt 10 && break
12895  done
12896  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12897esac
12898
12899      $ac_path_EGREP_found && break 3
12900    done
12901  done
12902  done
12903IFS=$as_save_IFS
12904  if test -z "$ac_cv_path_EGREP"; then
12905    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12906  fi
12907else
12908  ac_cv_path_EGREP=$EGREP
12909fi
12910
12911   fi
12912fi
12913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12914$as_echo "$ac_cv_path_EGREP" >&6; }
12915 EGREP="$ac_cv_path_EGREP"
12916
12917
12918    else
12919      # If it succeeded, then it was overridden by the user. We will use it
12920      # for the tool.
12921
12922      # First remove it from the list of overridden variables, so we can test
12923      # for unknown variables in the end.
12924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12925
12926      # Check if we try to supply an empty value
12927      if test "x$EGREP" = x; then
12928        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12929$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12931$as_echo_n "checking for EGREP... " >&6; }
12932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12933$as_echo "disabled" >&6; }
12934      else
12935        # Check if the provided tool contains a complete path.
12936        tool_specified="$EGREP"
12937        tool_basename="${tool_specified##*/}"
12938        if test "x$tool_basename" = "x$tool_specified"; then
12939          # A command without a complete path is provided, search $PATH.
12940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12941$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12942          # Extract the first word of "$tool_basename", so it can be a program name with args.
12943set dummy $tool_basename; ac_word=$2
12944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12945$as_echo_n "checking for $ac_word... " >&6; }
12946if ${ac_cv_path_EGREP+:} false; then :
12947  $as_echo_n "(cached) " >&6
12948else
12949  case $EGREP in
12950  [\\/]* | ?:[\\/]*)
12951  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12952  ;;
12953  *)
12954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12955for as_dir in $PATH
12956do
12957  IFS=$as_save_IFS
12958  test -z "$as_dir" && as_dir=.
12959    for ac_exec_ext in '' $ac_executable_extensions; do
12960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12961    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12963    break 2
12964  fi
12965done
12966  done
12967IFS=$as_save_IFS
12968
12969  ;;
12970esac
12971fi
12972EGREP=$ac_cv_path_EGREP
12973if test -n "$EGREP"; then
12974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12975$as_echo "$EGREP" >&6; }
12976else
12977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12978$as_echo "no" >&6; }
12979fi
12980
12981
12982          if test "x$EGREP" = x; then
12983            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12984          fi
12985        else
12986          # Otherwise we believe it is a complete path. Use it as it is.
12987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12988$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12989          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12990$as_echo_n "checking for EGREP... " >&6; }
12991          if test ! -x "$tool_specified"; then
12992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12993$as_echo "not found" >&6; }
12994            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12995          fi
12996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12997$as_echo "$tool_specified" >&6; }
12998        fi
12999      fi
13000    fi
13001
13002  fi
13003
13004
13005  if test "x$EGREP" = x; then
13006    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13007  fi
13008
13009
13010
13011
13012  # Publish this variable in the help.
13013
13014
13015  if [ -z "${FGREP+x}" ]; then
13016    # The variable is not set by user, try to locate tool using the code snippet
13017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13018$as_echo_n "checking for fgrep... " >&6; }
13019if ${ac_cv_path_FGREP+:} false; then :
13020  $as_echo_n "(cached) " >&6
13021else
13022  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13023   then ac_cv_path_FGREP="$GREP -F"
13024   else
13025     if test -z "$FGREP"; then
13026  ac_path_FGREP_found=false
13027  # Loop through the user's path and test for each of PROGNAME-LIST
13028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13029for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13030do
13031  IFS=$as_save_IFS
13032  test -z "$as_dir" && as_dir=.
13033    for ac_prog in fgrep; do
13034    for ac_exec_ext in '' $ac_executable_extensions; do
13035      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13036      as_fn_executable_p "$ac_path_FGREP" || continue
13037# Check for GNU ac_path_FGREP and select it if it is found.
13038  # Check for GNU $ac_path_FGREP
13039case `"$ac_path_FGREP" --version 2>&1` in
13040*GNU*)
13041  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13042*)
13043  ac_count=0
13044  $as_echo_n 0123456789 >"conftest.in"
13045  while :
13046  do
13047    cat "conftest.in" "conftest.in" >"conftest.tmp"
13048    mv "conftest.tmp" "conftest.in"
13049    cp "conftest.in" "conftest.nl"
13050    $as_echo 'FGREP' >> "conftest.nl"
13051    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13052    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13053    as_fn_arith $ac_count + 1 && ac_count=$as_val
13054    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13055      # Best one so far, save it but keep looking for a better one
13056      ac_cv_path_FGREP="$ac_path_FGREP"
13057      ac_path_FGREP_max=$ac_count
13058    fi
13059    # 10*(2^10) chars as input seems more than enough
13060    test $ac_count -gt 10 && break
13061  done
13062  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13063esac
13064
13065      $ac_path_FGREP_found && break 3
13066    done
13067  done
13068  done
13069IFS=$as_save_IFS
13070  if test -z "$ac_cv_path_FGREP"; then
13071    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13072  fi
13073else
13074  ac_cv_path_FGREP=$FGREP
13075fi
13076
13077   fi
13078fi
13079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13080$as_echo "$ac_cv_path_FGREP" >&6; }
13081 FGREP="$ac_cv_path_FGREP"
13082
13083
13084  else
13085    # The variable is set, but is it from the command line or the environment?
13086
13087    # Try to remove the string !FGREP! from our list.
13088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13090      # If it failed, the variable was not from the command line. Ignore it,
13091      # but warn the user (except for BASH, which is always set by the calling BASH).
13092      if test "xFGREP" != xBASH; then
13093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13094$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13095      fi
13096      # Try to locate tool using the code snippet
13097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13098$as_echo_n "checking for fgrep... " >&6; }
13099if ${ac_cv_path_FGREP+:} false; then :
13100  $as_echo_n "(cached) " >&6
13101else
13102  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13103   then ac_cv_path_FGREP="$GREP -F"
13104   else
13105     if test -z "$FGREP"; then
13106  ac_path_FGREP_found=false
13107  # Loop through the user's path and test for each of PROGNAME-LIST
13108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13109for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13110do
13111  IFS=$as_save_IFS
13112  test -z "$as_dir" && as_dir=.
13113    for ac_prog in fgrep; do
13114    for ac_exec_ext in '' $ac_executable_extensions; do
13115      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13116      as_fn_executable_p "$ac_path_FGREP" || continue
13117# Check for GNU ac_path_FGREP and select it if it is found.
13118  # Check for GNU $ac_path_FGREP
13119case `"$ac_path_FGREP" --version 2>&1` in
13120*GNU*)
13121  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13122*)
13123  ac_count=0
13124  $as_echo_n 0123456789 >"conftest.in"
13125  while :
13126  do
13127    cat "conftest.in" "conftest.in" >"conftest.tmp"
13128    mv "conftest.tmp" "conftest.in"
13129    cp "conftest.in" "conftest.nl"
13130    $as_echo 'FGREP' >> "conftest.nl"
13131    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13132    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13133    as_fn_arith $ac_count + 1 && ac_count=$as_val
13134    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13135      # Best one so far, save it but keep looking for a better one
13136      ac_cv_path_FGREP="$ac_path_FGREP"
13137      ac_path_FGREP_max=$ac_count
13138    fi
13139    # 10*(2^10) chars as input seems more than enough
13140    test $ac_count -gt 10 && break
13141  done
13142  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13143esac
13144
13145      $ac_path_FGREP_found && break 3
13146    done
13147  done
13148  done
13149IFS=$as_save_IFS
13150  if test -z "$ac_cv_path_FGREP"; then
13151    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13152  fi
13153else
13154  ac_cv_path_FGREP=$FGREP
13155fi
13156
13157   fi
13158fi
13159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13160$as_echo "$ac_cv_path_FGREP" >&6; }
13161 FGREP="$ac_cv_path_FGREP"
13162
13163
13164    else
13165      # If it succeeded, then it was overridden by the user. We will use it
13166      # for the tool.
13167
13168      # First remove it from the list of overridden variables, so we can test
13169      # for unknown variables in the end.
13170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13171
13172      # Check if we try to supply an empty value
13173      if test "x$FGREP" = x; then
13174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13175$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13177$as_echo_n "checking for FGREP... " >&6; }
13178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13179$as_echo "disabled" >&6; }
13180      else
13181        # Check if the provided tool contains a complete path.
13182        tool_specified="$FGREP"
13183        tool_basename="${tool_specified##*/}"
13184        if test "x$tool_basename" = "x$tool_specified"; then
13185          # A command without a complete path is provided, search $PATH.
13186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13187$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13188          # Extract the first word of "$tool_basename", so it can be a program name with args.
13189set dummy $tool_basename; ac_word=$2
13190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13191$as_echo_n "checking for $ac_word... " >&6; }
13192if ${ac_cv_path_FGREP+:} false; then :
13193  $as_echo_n "(cached) " >&6
13194else
13195  case $FGREP in
13196  [\\/]* | ?:[\\/]*)
13197  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13198  ;;
13199  *)
13200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13201for as_dir in $PATH
13202do
13203  IFS=$as_save_IFS
13204  test -z "$as_dir" && as_dir=.
13205    for ac_exec_ext in '' $ac_executable_extensions; do
13206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13207    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13209    break 2
13210  fi
13211done
13212  done
13213IFS=$as_save_IFS
13214
13215  ;;
13216esac
13217fi
13218FGREP=$ac_cv_path_FGREP
13219if test -n "$FGREP"; then
13220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13221$as_echo "$FGREP" >&6; }
13222else
13223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13224$as_echo "no" >&6; }
13225fi
13226
13227
13228          if test "x$FGREP" = x; then
13229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13230          fi
13231        else
13232          # Otherwise we believe it is a complete path. Use it as it is.
13233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13234$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13236$as_echo_n "checking for FGREP... " >&6; }
13237          if test ! -x "$tool_specified"; then
13238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13239$as_echo "not found" >&6; }
13240            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13241          fi
13242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13243$as_echo "$tool_specified" >&6; }
13244        fi
13245      fi
13246    fi
13247
13248  fi
13249
13250
13251  if test "x$FGREP" = x; then
13252    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13253  fi
13254
13255
13256
13257
13258  # Publish this variable in the help.
13259
13260
13261  if [ -z "${SED+x}" ]; then
13262    # The variable is not set by user, try to locate tool using the code snippet
13263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13264$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13265if ${ac_cv_path_SED+:} false; then :
13266  $as_echo_n "(cached) " >&6
13267else
13268            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13269     for ac_i in 1 2 3 4 5 6 7; do
13270       ac_script="$ac_script$as_nl$ac_script"
13271     done
13272     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13273     { ac_script=; unset ac_script;}
13274     if test -z "$SED"; then
13275  ac_path_SED_found=false
13276  # Loop through the user's path and test for each of PROGNAME-LIST
13277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13278for as_dir in $PATH
13279do
13280  IFS=$as_save_IFS
13281  test -z "$as_dir" && as_dir=.
13282    for ac_prog in sed gsed; do
13283    for ac_exec_ext in '' $ac_executable_extensions; do
13284      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13285      as_fn_executable_p "$ac_path_SED" || continue
13286# Check for GNU ac_path_SED and select it if it is found.
13287  # Check for GNU $ac_path_SED
13288case `"$ac_path_SED" --version 2>&1` in
13289*GNU*)
13290  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13291*)
13292  ac_count=0
13293  $as_echo_n 0123456789 >"conftest.in"
13294  while :
13295  do
13296    cat "conftest.in" "conftest.in" >"conftest.tmp"
13297    mv "conftest.tmp" "conftest.in"
13298    cp "conftest.in" "conftest.nl"
13299    $as_echo '' >> "conftest.nl"
13300    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13301    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13302    as_fn_arith $ac_count + 1 && ac_count=$as_val
13303    if test $ac_count -gt ${ac_path_SED_max-0}; then
13304      # Best one so far, save it but keep looking for a better one
13305      ac_cv_path_SED="$ac_path_SED"
13306      ac_path_SED_max=$ac_count
13307    fi
13308    # 10*(2^10) chars as input seems more than enough
13309    test $ac_count -gt 10 && break
13310  done
13311  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13312esac
13313
13314      $ac_path_SED_found && break 3
13315    done
13316  done
13317  done
13318IFS=$as_save_IFS
13319  if test -z "$ac_cv_path_SED"; then
13320    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13321  fi
13322else
13323  ac_cv_path_SED=$SED
13324fi
13325
13326fi
13327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13328$as_echo "$ac_cv_path_SED" >&6; }
13329 SED="$ac_cv_path_SED"
13330  rm -f conftest.sed
13331
13332  else
13333    # The variable is set, but is it from the command line or the environment?
13334
13335    # Try to remove the string !SED! from our list.
13336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13338      # If it failed, the variable was not from the command line. Ignore it,
13339      # but warn the user (except for BASH, which is always set by the calling BASH).
13340      if test "xSED" != xBASH; then
13341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13342$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13343      fi
13344      # Try to locate tool using the code snippet
13345      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13346$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13347if ${ac_cv_path_SED+:} false; then :
13348  $as_echo_n "(cached) " >&6
13349else
13350            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13351     for ac_i in 1 2 3 4 5 6 7; do
13352       ac_script="$ac_script$as_nl$ac_script"
13353     done
13354     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13355     { ac_script=; unset ac_script;}
13356     if test -z "$SED"; then
13357  ac_path_SED_found=false
13358  # Loop through the user's path and test for each of PROGNAME-LIST
13359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13360for as_dir in $PATH
13361do
13362  IFS=$as_save_IFS
13363  test -z "$as_dir" && as_dir=.
13364    for ac_prog in sed gsed; do
13365    for ac_exec_ext in '' $ac_executable_extensions; do
13366      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13367      as_fn_executable_p "$ac_path_SED" || continue
13368# Check for GNU ac_path_SED and select it if it is found.
13369  # Check for GNU $ac_path_SED
13370case `"$ac_path_SED" --version 2>&1` in
13371*GNU*)
13372  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13373*)
13374  ac_count=0
13375  $as_echo_n 0123456789 >"conftest.in"
13376  while :
13377  do
13378    cat "conftest.in" "conftest.in" >"conftest.tmp"
13379    mv "conftest.tmp" "conftest.in"
13380    cp "conftest.in" "conftest.nl"
13381    $as_echo '' >> "conftest.nl"
13382    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13383    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13384    as_fn_arith $ac_count + 1 && ac_count=$as_val
13385    if test $ac_count -gt ${ac_path_SED_max-0}; then
13386      # Best one so far, save it but keep looking for a better one
13387      ac_cv_path_SED="$ac_path_SED"
13388      ac_path_SED_max=$ac_count
13389    fi
13390    # 10*(2^10) chars as input seems more than enough
13391    test $ac_count -gt 10 && break
13392  done
13393  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13394esac
13395
13396      $ac_path_SED_found && break 3
13397    done
13398  done
13399  done
13400IFS=$as_save_IFS
13401  if test -z "$ac_cv_path_SED"; then
13402    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13403  fi
13404else
13405  ac_cv_path_SED=$SED
13406fi
13407
13408fi
13409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13410$as_echo "$ac_cv_path_SED" >&6; }
13411 SED="$ac_cv_path_SED"
13412  rm -f conftest.sed
13413
13414    else
13415      # If it succeeded, then it was overridden by the user. We will use it
13416      # for the tool.
13417
13418      # First remove it from the list of overridden variables, so we can test
13419      # for unknown variables in the end.
13420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13421
13422      # Check if we try to supply an empty value
13423      if test "x$SED" = x; then
13424        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13425$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13426        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13427$as_echo_n "checking for SED... " >&6; }
13428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13429$as_echo "disabled" >&6; }
13430      else
13431        # Check if the provided tool contains a complete path.
13432        tool_specified="$SED"
13433        tool_basename="${tool_specified##*/}"
13434        if test "x$tool_basename" = "x$tool_specified"; then
13435          # A command without a complete path is provided, search $PATH.
13436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13437$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13438          # Extract the first word of "$tool_basename", so it can be a program name with args.
13439set dummy $tool_basename; ac_word=$2
13440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13441$as_echo_n "checking for $ac_word... " >&6; }
13442if ${ac_cv_path_SED+:} false; then :
13443  $as_echo_n "(cached) " >&6
13444else
13445  case $SED in
13446  [\\/]* | ?:[\\/]*)
13447  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13448  ;;
13449  *)
13450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13451for as_dir in $PATH
13452do
13453  IFS=$as_save_IFS
13454  test -z "$as_dir" && as_dir=.
13455    for ac_exec_ext in '' $ac_executable_extensions; do
13456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13457    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13459    break 2
13460  fi
13461done
13462  done
13463IFS=$as_save_IFS
13464
13465  ;;
13466esac
13467fi
13468SED=$ac_cv_path_SED
13469if test -n "$SED"; then
13470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13471$as_echo "$SED" >&6; }
13472else
13473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13474$as_echo "no" >&6; }
13475fi
13476
13477
13478          if test "x$SED" = x; then
13479            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13480          fi
13481        else
13482          # Otherwise we believe it is a complete path. Use it as it is.
13483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13484$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13485          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13486$as_echo_n "checking for SED... " >&6; }
13487          if test ! -x "$tool_specified"; then
13488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13489$as_echo "not found" >&6; }
13490            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13491          fi
13492          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13493$as_echo "$tool_specified" >&6; }
13494        fi
13495      fi
13496    fi
13497
13498  fi
13499
13500
13501  if test "x$SED" = x; then
13502    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13503  fi
13504
13505
13506
13507  # Always force rm.
13508  RM="$RM -f"
13509
13510  # pwd behaves differently on various platforms and some don't support the -L flag.
13511  # Always use the bash builtin pwd to get uniform behavior.
13512  THEPWDCMD=pwd
13513
13514  # These are not required on all platforms
13515
13516
13517  # Publish this variable in the help.
13518
13519
13520  if [ -z "${CYGPATH+x}" ]; then
13521    # The variable is not set by user, try to locate tool using the code snippet
13522    for ac_prog in cygpath
13523do
13524  # Extract the first word of "$ac_prog", so it can be a program name with args.
13525set dummy $ac_prog; ac_word=$2
13526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13527$as_echo_n "checking for $ac_word... " >&6; }
13528if ${ac_cv_path_CYGPATH+:} false; then :
13529  $as_echo_n "(cached) " >&6
13530else
13531  case $CYGPATH in
13532  [\\/]* | ?:[\\/]*)
13533  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13534  ;;
13535  *)
13536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13537for as_dir in $PATH
13538do
13539  IFS=$as_save_IFS
13540  test -z "$as_dir" && as_dir=.
13541    for ac_exec_ext in '' $ac_executable_extensions; do
13542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13543    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13545    break 2
13546  fi
13547done
13548  done
13549IFS=$as_save_IFS
13550
13551  ;;
13552esac
13553fi
13554CYGPATH=$ac_cv_path_CYGPATH
13555if test -n "$CYGPATH"; then
13556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13557$as_echo "$CYGPATH" >&6; }
13558else
13559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13560$as_echo "no" >&6; }
13561fi
13562
13563
13564  test -n "$CYGPATH" && break
13565done
13566
13567  else
13568    # The variable is set, but is it from the command line or the environment?
13569
13570    # Try to remove the string !CYGPATH! from our list.
13571    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13572    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13573      # If it failed, the variable was not from the command line. Ignore it,
13574      # but warn the user (except for BASH, which is always set by the calling BASH).
13575      if test "xCYGPATH" != xBASH; then
13576        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13577$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13578      fi
13579      # Try to locate tool using the code snippet
13580      for ac_prog in cygpath
13581do
13582  # Extract the first word of "$ac_prog", so it can be a program name with args.
13583set dummy $ac_prog; ac_word=$2
13584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13585$as_echo_n "checking for $ac_word... " >&6; }
13586if ${ac_cv_path_CYGPATH+:} false; then :
13587  $as_echo_n "(cached) " >&6
13588else
13589  case $CYGPATH in
13590  [\\/]* | ?:[\\/]*)
13591  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13592  ;;
13593  *)
13594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13595for as_dir in $PATH
13596do
13597  IFS=$as_save_IFS
13598  test -z "$as_dir" && as_dir=.
13599    for ac_exec_ext in '' $ac_executable_extensions; do
13600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13601    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13603    break 2
13604  fi
13605done
13606  done
13607IFS=$as_save_IFS
13608
13609  ;;
13610esac
13611fi
13612CYGPATH=$ac_cv_path_CYGPATH
13613if test -n "$CYGPATH"; then
13614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13615$as_echo "$CYGPATH" >&6; }
13616else
13617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13618$as_echo "no" >&6; }
13619fi
13620
13621
13622  test -n "$CYGPATH" && break
13623done
13624
13625    else
13626      # If it succeeded, then it was overridden by the user. We will use it
13627      # for the tool.
13628
13629      # First remove it from the list of overridden variables, so we can test
13630      # for unknown variables in the end.
13631      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13632
13633      # Check if we try to supply an empty value
13634      if test "x$CYGPATH" = x; then
13635        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13636$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13637        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13638$as_echo_n "checking for CYGPATH... " >&6; }
13639        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13640$as_echo "disabled" >&6; }
13641      else
13642        # Check if the provided tool contains a complete path.
13643        tool_specified="$CYGPATH"
13644        tool_basename="${tool_specified##*/}"
13645        if test "x$tool_basename" = "x$tool_specified"; then
13646          # A command without a complete path is provided, search $PATH.
13647          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13648$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13649          # Extract the first word of "$tool_basename", so it can be a program name with args.
13650set dummy $tool_basename; ac_word=$2
13651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13652$as_echo_n "checking for $ac_word... " >&6; }
13653if ${ac_cv_path_CYGPATH+:} false; then :
13654  $as_echo_n "(cached) " >&6
13655else
13656  case $CYGPATH in
13657  [\\/]* | ?:[\\/]*)
13658  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13659  ;;
13660  *)
13661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13662for as_dir in $PATH
13663do
13664  IFS=$as_save_IFS
13665  test -z "$as_dir" && as_dir=.
13666    for ac_exec_ext in '' $ac_executable_extensions; do
13667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13668    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13670    break 2
13671  fi
13672done
13673  done
13674IFS=$as_save_IFS
13675
13676  ;;
13677esac
13678fi
13679CYGPATH=$ac_cv_path_CYGPATH
13680if test -n "$CYGPATH"; then
13681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13682$as_echo "$CYGPATH" >&6; }
13683else
13684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13685$as_echo "no" >&6; }
13686fi
13687
13688
13689          if test "x$CYGPATH" = x; then
13690            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13691          fi
13692        else
13693          # Otherwise we believe it is a complete path. Use it as it is.
13694          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13695$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13696          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13697$as_echo_n "checking for CYGPATH... " >&6; }
13698          if test ! -x "$tool_specified"; then
13699            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13700$as_echo "not found" >&6; }
13701            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13702          fi
13703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13704$as_echo "$tool_specified" >&6; }
13705        fi
13706      fi
13707    fi
13708
13709  fi
13710
13711
13712
13713
13714  # Publish this variable in the help.
13715
13716
13717  if [ -z "${READLINK+x}" ]; then
13718    # The variable is not set by user, try to locate tool using the code snippet
13719    for ac_prog in greadlink readlink
13720do
13721  # Extract the first word of "$ac_prog", so it can be a program name with args.
13722set dummy $ac_prog; ac_word=$2
13723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13724$as_echo_n "checking for $ac_word... " >&6; }
13725if ${ac_cv_path_READLINK+:} false; then :
13726  $as_echo_n "(cached) " >&6
13727else
13728  case $READLINK in
13729  [\\/]* | ?:[\\/]*)
13730  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13731  ;;
13732  *)
13733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13734for as_dir in $PATH
13735do
13736  IFS=$as_save_IFS
13737  test -z "$as_dir" && as_dir=.
13738    for ac_exec_ext in '' $ac_executable_extensions; do
13739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13740    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13742    break 2
13743  fi
13744done
13745  done
13746IFS=$as_save_IFS
13747
13748  ;;
13749esac
13750fi
13751READLINK=$ac_cv_path_READLINK
13752if test -n "$READLINK"; then
13753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13754$as_echo "$READLINK" >&6; }
13755else
13756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13757$as_echo "no" >&6; }
13758fi
13759
13760
13761  test -n "$READLINK" && break
13762done
13763
13764  else
13765    # The variable is set, but is it from the command line or the environment?
13766
13767    # Try to remove the string !READLINK! from our list.
13768    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13769    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13770      # If it failed, the variable was not from the command line. Ignore it,
13771      # but warn the user (except for BASH, which is always set by the calling BASH).
13772      if test "xREADLINK" != xBASH; then
13773        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13774$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13775      fi
13776      # Try to locate tool using the code snippet
13777      for ac_prog in greadlink readlink
13778do
13779  # Extract the first word of "$ac_prog", so it can be a program name with args.
13780set dummy $ac_prog; ac_word=$2
13781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13782$as_echo_n "checking for $ac_word... " >&6; }
13783if ${ac_cv_path_READLINK+:} false; then :
13784  $as_echo_n "(cached) " >&6
13785else
13786  case $READLINK in
13787  [\\/]* | ?:[\\/]*)
13788  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13789  ;;
13790  *)
13791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13792for as_dir in $PATH
13793do
13794  IFS=$as_save_IFS
13795  test -z "$as_dir" && as_dir=.
13796    for ac_exec_ext in '' $ac_executable_extensions; do
13797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13798    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13800    break 2
13801  fi
13802done
13803  done
13804IFS=$as_save_IFS
13805
13806  ;;
13807esac
13808fi
13809READLINK=$ac_cv_path_READLINK
13810if test -n "$READLINK"; then
13811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13812$as_echo "$READLINK" >&6; }
13813else
13814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13815$as_echo "no" >&6; }
13816fi
13817
13818
13819  test -n "$READLINK" && break
13820done
13821
13822    else
13823      # If it succeeded, then it was overridden by the user. We will use it
13824      # for the tool.
13825
13826      # First remove it from the list of overridden variables, so we can test
13827      # for unknown variables in the end.
13828      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13829
13830      # Check if we try to supply an empty value
13831      if test "x$READLINK" = x; then
13832        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13833$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13835$as_echo_n "checking for READLINK... " >&6; }
13836        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13837$as_echo "disabled" >&6; }
13838      else
13839        # Check if the provided tool contains a complete path.
13840        tool_specified="$READLINK"
13841        tool_basename="${tool_specified##*/}"
13842        if test "x$tool_basename" = "x$tool_specified"; then
13843          # A command without a complete path is provided, search $PATH.
13844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13845$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13846          # Extract the first word of "$tool_basename", so it can be a program name with args.
13847set dummy $tool_basename; ac_word=$2
13848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13849$as_echo_n "checking for $ac_word... " >&6; }
13850if ${ac_cv_path_READLINK+:} false; then :
13851  $as_echo_n "(cached) " >&6
13852else
13853  case $READLINK in
13854  [\\/]* | ?:[\\/]*)
13855  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13856  ;;
13857  *)
13858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13859for as_dir in $PATH
13860do
13861  IFS=$as_save_IFS
13862  test -z "$as_dir" && as_dir=.
13863    for ac_exec_ext in '' $ac_executable_extensions; do
13864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13865    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13867    break 2
13868  fi
13869done
13870  done
13871IFS=$as_save_IFS
13872
13873  ;;
13874esac
13875fi
13876READLINK=$ac_cv_path_READLINK
13877if test -n "$READLINK"; then
13878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13879$as_echo "$READLINK" >&6; }
13880else
13881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13882$as_echo "no" >&6; }
13883fi
13884
13885
13886          if test "x$READLINK" = x; then
13887            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13888          fi
13889        else
13890          # Otherwise we believe it is a complete path. Use it as it is.
13891          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13892$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13893          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13894$as_echo_n "checking for READLINK... " >&6; }
13895          if test ! -x "$tool_specified"; then
13896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13897$as_echo "not found" >&6; }
13898            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13899          fi
13900          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13901$as_echo "$tool_specified" >&6; }
13902        fi
13903      fi
13904    fi
13905
13906  fi
13907
13908
13909
13910
13911  # Publish this variable in the help.
13912
13913
13914  if [ -z "${DF+x}" ]; then
13915    # The variable is not set by user, try to locate tool using the code snippet
13916    for ac_prog in df
13917do
13918  # Extract the first word of "$ac_prog", so it can be a program name with args.
13919set dummy $ac_prog; ac_word=$2
13920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13921$as_echo_n "checking for $ac_word... " >&6; }
13922if ${ac_cv_path_DF+:} false; then :
13923  $as_echo_n "(cached) " >&6
13924else
13925  case $DF in
13926  [\\/]* | ?:[\\/]*)
13927  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13928  ;;
13929  *)
13930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13931for as_dir in $PATH
13932do
13933  IFS=$as_save_IFS
13934  test -z "$as_dir" && as_dir=.
13935    for ac_exec_ext in '' $ac_executable_extensions; do
13936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13937    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13939    break 2
13940  fi
13941done
13942  done
13943IFS=$as_save_IFS
13944
13945  ;;
13946esac
13947fi
13948DF=$ac_cv_path_DF
13949if test -n "$DF"; then
13950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13951$as_echo "$DF" >&6; }
13952else
13953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13954$as_echo "no" >&6; }
13955fi
13956
13957
13958  test -n "$DF" && break
13959done
13960
13961  else
13962    # The variable is set, but is it from the command line or the environment?
13963
13964    # Try to remove the string !DF! from our list.
13965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13967      # If it failed, the variable was not from the command line. Ignore it,
13968      # but warn the user (except for BASH, which is always set by the calling BASH).
13969      if test "xDF" != xBASH; then
13970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13971$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13972      fi
13973      # Try to locate tool using the code snippet
13974      for ac_prog in df
13975do
13976  # Extract the first word of "$ac_prog", so it can be a program name with args.
13977set dummy $ac_prog; ac_word=$2
13978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13979$as_echo_n "checking for $ac_word... " >&6; }
13980if ${ac_cv_path_DF+:} false; then :
13981  $as_echo_n "(cached) " >&6
13982else
13983  case $DF in
13984  [\\/]* | ?:[\\/]*)
13985  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13986  ;;
13987  *)
13988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13989for as_dir in $PATH
13990do
13991  IFS=$as_save_IFS
13992  test -z "$as_dir" && as_dir=.
13993    for ac_exec_ext in '' $ac_executable_extensions; do
13994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13995    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13997    break 2
13998  fi
13999done
14000  done
14001IFS=$as_save_IFS
14002
14003  ;;
14004esac
14005fi
14006DF=$ac_cv_path_DF
14007if test -n "$DF"; then
14008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14009$as_echo "$DF" >&6; }
14010else
14011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14012$as_echo "no" >&6; }
14013fi
14014
14015
14016  test -n "$DF" && break
14017done
14018
14019    else
14020      # If it succeeded, then it was overridden by the user. We will use it
14021      # for the tool.
14022
14023      # First remove it from the list of overridden variables, so we can test
14024      # for unknown variables in the end.
14025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14026
14027      # Check if we try to supply an empty value
14028      if test "x$DF" = x; then
14029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14030$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14032$as_echo_n "checking for DF... " >&6; }
14033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14034$as_echo "disabled" >&6; }
14035      else
14036        # Check if the provided tool contains a complete path.
14037        tool_specified="$DF"
14038        tool_basename="${tool_specified##*/}"
14039        if test "x$tool_basename" = "x$tool_specified"; then
14040          # A command without a complete path is provided, search $PATH.
14041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14042$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14043          # Extract the first word of "$tool_basename", so it can be a program name with args.
14044set dummy $tool_basename; ac_word=$2
14045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14046$as_echo_n "checking for $ac_word... " >&6; }
14047if ${ac_cv_path_DF+:} false; then :
14048  $as_echo_n "(cached) " >&6
14049else
14050  case $DF in
14051  [\\/]* | ?:[\\/]*)
14052  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14053  ;;
14054  *)
14055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14056for as_dir in $PATH
14057do
14058  IFS=$as_save_IFS
14059  test -z "$as_dir" && as_dir=.
14060    for ac_exec_ext in '' $ac_executable_extensions; do
14061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14062    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14064    break 2
14065  fi
14066done
14067  done
14068IFS=$as_save_IFS
14069
14070  ;;
14071esac
14072fi
14073DF=$ac_cv_path_DF
14074if test -n "$DF"; then
14075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14076$as_echo "$DF" >&6; }
14077else
14078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14079$as_echo "no" >&6; }
14080fi
14081
14082
14083          if test "x$DF" = x; then
14084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14085          fi
14086        else
14087          # Otherwise we believe it is a complete path. Use it as it is.
14088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14089$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14091$as_echo_n "checking for DF... " >&6; }
14092          if test ! -x "$tool_specified"; then
14093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14094$as_echo "not found" >&6; }
14095            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14096          fi
14097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14098$as_echo "$tool_specified" >&6; }
14099        fi
14100      fi
14101    fi
14102
14103  fi
14104
14105
14106
14107
14108  # Publish this variable in the help.
14109
14110
14111  if [ -z "${CPIO+x}" ]; then
14112    # The variable is not set by user, try to locate tool using the code snippet
14113    for ac_prog in cpio bsdcpio
14114do
14115  # Extract the first word of "$ac_prog", so it can be a program name with args.
14116set dummy $ac_prog; ac_word=$2
14117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14118$as_echo_n "checking for $ac_word... " >&6; }
14119if ${ac_cv_path_CPIO+:} false; then :
14120  $as_echo_n "(cached) " >&6
14121else
14122  case $CPIO in
14123  [\\/]* | ?:[\\/]*)
14124  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14125  ;;
14126  *)
14127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14128for as_dir in $PATH
14129do
14130  IFS=$as_save_IFS
14131  test -z "$as_dir" && as_dir=.
14132    for ac_exec_ext in '' $ac_executable_extensions; do
14133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14134    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14136    break 2
14137  fi
14138done
14139  done
14140IFS=$as_save_IFS
14141
14142  ;;
14143esac
14144fi
14145CPIO=$ac_cv_path_CPIO
14146if test -n "$CPIO"; then
14147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14148$as_echo "$CPIO" >&6; }
14149else
14150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14151$as_echo "no" >&6; }
14152fi
14153
14154
14155  test -n "$CPIO" && break
14156done
14157
14158  else
14159    # The variable is set, but is it from the command line or the environment?
14160
14161    # Try to remove the string !CPIO! from our list.
14162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14164      # If it failed, the variable was not from the command line. Ignore it,
14165      # but warn the user (except for BASH, which is always set by the calling BASH).
14166      if test "xCPIO" != xBASH; then
14167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14168$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14169      fi
14170      # Try to locate tool using the code snippet
14171      for ac_prog in cpio bsdcpio
14172do
14173  # Extract the first word of "$ac_prog", so it can be a program name with args.
14174set dummy $ac_prog; ac_word=$2
14175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14176$as_echo_n "checking for $ac_word... " >&6; }
14177if ${ac_cv_path_CPIO+:} false; then :
14178  $as_echo_n "(cached) " >&6
14179else
14180  case $CPIO in
14181  [\\/]* | ?:[\\/]*)
14182  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14183  ;;
14184  *)
14185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14186for as_dir in $PATH
14187do
14188  IFS=$as_save_IFS
14189  test -z "$as_dir" && as_dir=.
14190    for ac_exec_ext in '' $ac_executable_extensions; do
14191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14192    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14194    break 2
14195  fi
14196done
14197  done
14198IFS=$as_save_IFS
14199
14200  ;;
14201esac
14202fi
14203CPIO=$ac_cv_path_CPIO
14204if test -n "$CPIO"; then
14205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14206$as_echo "$CPIO" >&6; }
14207else
14208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14209$as_echo "no" >&6; }
14210fi
14211
14212
14213  test -n "$CPIO" && break
14214done
14215
14216    else
14217      # If it succeeded, then it was overridden by the user. We will use it
14218      # for the tool.
14219
14220      # First remove it from the list of overridden variables, so we can test
14221      # for unknown variables in the end.
14222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14223
14224      # Check if we try to supply an empty value
14225      if test "x$CPIO" = x; then
14226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14227$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14229$as_echo_n "checking for CPIO... " >&6; }
14230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14231$as_echo "disabled" >&6; }
14232      else
14233        # Check if the provided tool contains a complete path.
14234        tool_specified="$CPIO"
14235        tool_basename="${tool_specified##*/}"
14236        if test "x$tool_basename" = "x$tool_specified"; then
14237          # A command without a complete path is provided, search $PATH.
14238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14239$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14240          # Extract the first word of "$tool_basename", so it can be a program name with args.
14241set dummy $tool_basename; ac_word=$2
14242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14243$as_echo_n "checking for $ac_word... " >&6; }
14244if ${ac_cv_path_CPIO+:} false; then :
14245  $as_echo_n "(cached) " >&6
14246else
14247  case $CPIO in
14248  [\\/]* | ?:[\\/]*)
14249  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14250  ;;
14251  *)
14252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14253for as_dir in $PATH
14254do
14255  IFS=$as_save_IFS
14256  test -z "$as_dir" && as_dir=.
14257    for ac_exec_ext in '' $ac_executable_extensions; do
14258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14259    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14261    break 2
14262  fi
14263done
14264  done
14265IFS=$as_save_IFS
14266
14267  ;;
14268esac
14269fi
14270CPIO=$ac_cv_path_CPIO
14271if test -n "$CPIO"; then
14272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14273$as_echo "$CPIO" >&6; }
14274else
14275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14276$as_echo "no" >&6; }
14277fi
14278
14279
14280          if test "x$CPIO" = x; then
14281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14282          fi
14283        else
14284          # Otherwise we believe it is a complete path. Use it as it is.
14285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14286$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14288$as_echo_n "checking for CPIO... " >&6; }
14289          if test ! -x "$tool_specified"; then
14290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14291$as_echo "not found" >&6; }
14292            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14293          fi
14294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14295$as_echo "$tool_specified" >&6; }
14296        fi
14297      fi
14298    fi
14299
14300  fi
14301
14302
14303
14304
14305  # Publish this variable in the help.
14306
14307
14308  if [ -z "${NICE+x}" ]; then
14309    # The variable is not set by user, try to locate tool using the code snippet
14310    for ac_prog in nice
14311do
14312  # Extract the first word of "$ac_prog", so it can be a program name with args.
14313set dummy $ac_prog; ac_word=$2
14314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14315$as_echo_n "checking for $ac_word... " >&6; }
14316if ${ac_cv_path_NICE+:} false; then :
14317  $as_echo_n "(cached) " >&6
14318else
14319  case $NICE in
14320  [\\/]* | ?:[\\/]*)
14321  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14322  ;;
14323  *)
14324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14325for as_dir in $PATH
14326do
14327  IFS=$as_save_IFS
14328  test -z "$as_dir" && as_dir=.
14329    for ac_exec_ext in '' $ac_executable_extensions; do
14330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14331    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14333    break 2
14334  fi
14335done
14336  done
14337IFS=$as_save_IFS
14338
14339  ;;
14340esac
14341fi
14342NICE=$ac_cv_path_NICE
14343if test -n "$NICE"; then
14344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14345$as_echo "$NICE" >&6; }
14346else
14347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14348$as_echo "no" >&6; }
14349fi
14350
14351
14352  test -n "$NICE" && break
14353done
14354
14355  else
14356    # The variable is set, but is it from the command line or the environment?
14357
14358    # Try to remove the string !NICE! from our list.
14359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14361      # If it failed, the variable was not from the command line. Ignore it,
14362      # but warn the user (except for BASH, which is always set by the calling BASH).
14363      if test "xNICE" != xBASH; then
14364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14365$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14366      fi
14367      # Try to locate tool using the code snippet
14368      for ac_prog in nice
14369do
14370  # Extract the first word of "$ac_prog", so it can be a program name with args.
14371set dummy $ac_prog; ac_word=$2
14372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14373$as_echo_n "checking for $ac_word... " >&6; }
14374if ${ac_cv_path_NICE+:} false; then :
14375  $as_echo_n "(cached) " >&6
14376else
14377  case $NICE in
14378  [\\/]* | ?:[\\/]*)
14379  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14380  ;;
14381  *)
14382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14383for as_dir in $PATH
14384do
14385  IFS=$as_save_IFS
14386  test -z "$as_dir" && as_dir=.
14387    for ac_exec_ext in '' $ac_executable_extensions; do
14388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14389    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14391    break 2
14392  fi
14393done
14394  done
14395IFS=$as_save_IFS
14396
14397  ;;
14398esac
14399fi
14400NICE=$ac_cv_path_NICE
14401if test -n "$NICE"; then
14402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14403$as_echo "$NICE" >&6; }
14404else
14405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14406$as_echo "no" >&6; }
14407fi
14408
14409
14410  test -n "$NICE" && break
14411done
14412
14413    else
14414      # If it succeeded, then it was overridden by the user. We will use it
14415      # for the tool.
14416
14417      # First remove it from the list of overridden variables, so we can test
14418      # for unknown variables in the end.
14419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14420
14421      # Check if we try to supply an empty value
14422      if test "x$NICE" = x; then
14423        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14424$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14425        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14426$as_echo_n "checking for NICE... " >&6; }
14427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14428$as_echo "disabled" >&6; }
14429      else
14430        # Check if the provided tool contains a complete path.
14431        tool_specified="$NICE"
14432        tool_basename="${tool_specified##*/}"
14433        if test "x$tool_basename" = "x$tool_specified"; then
14434          # A command without a complete path is provided, search $PATH.
14435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14436$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14437          # Extract the first word of "$tool_basename", so it can be a program name with args.
14438set dummy $tool_basename; ac_word=$2
14439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14440$as_echo_n "checking for $ac_word... " >&6; }
14441if ${ac_cv_path_NICE+:} false; then :
14442  $as_echo_n "(cached) " >&6
14443else
14444  case $NICE in
14445  [\\/]* | ?:[\\/]*)
14446  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14447  ;;
14448  *)
14449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14450for as_dir in $PATH
14451do
14452  IFS=$as_save_IFS
14453  test -z "$as_dir" && as_dir=.
14454    for ac_exec_ext in '' $ac_executable_extensions; do
14455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14456    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14458    break 2
14459  fi
14460done
14461  done
14462IFS=$as_save_IFS
14463
14464  ;;
14465esac
14466fi
14467NICE=$ac_cv_path_NICE
14468if test -n "$NICE"; then
14469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14470$as_echo "$NICE" >&6; }
14471else
14472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14473$as_echo "no" >&6; }
14474fi
14475
14476
14477          if test "x$NICE" = x; then
14478            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14479          fi
14480        else
14481          # Otherwise we believe it is a complete path. Use it as it is.
14482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14483$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14484          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14485$as_echo_n "checking for NICE... " >&6; }
14486          if test ! -x "$tool_specified"; then
14487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14488$as_echo "not found" >&6; }
14489            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14490          fi
14491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14492$as_echo "$tool_specified" >&6; }
14493        fi
14494      fi
14495    fi
14496
14497  fi
14498
14499
14500
14501
14502# Now we can determine OpenJDK build and target platforms. This is required to
14503# have early on.
14504# Make sure we can run config.sub.
14505$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14506  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14507
14508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14509$as_echo_n "checking build system type... " >&6; }
14510if ${ac_cv_build+:} false; then :
14511  $as_echo_n "(cached) " >&6
14512else
14513  ac_build_alias=$build_alias
14514test "x$ac_build_alias" = x &&
14515  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14516test "x$ac_build_alias" = x &&
14517  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14518ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14519  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14520
14521fi
14522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14523$as_echo "$ac_cv_build" >&6; }
14524case $ac_cv_build in
14525*-*-*) ;;
14526*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14527esac
14528build=$ac_cv_build
14529ac_save_IFS=$IFS; IFS='-'
14530set x $ac_cv_build
14531shift
14532build_cpu=$1
14533build_vendor=$2
14534shift; shift
14535# Remember, the first character of IFS is used to create $*,
14536# except with old shells:
14537build_os=$*
14538IFS=$ac_save_IFS
14539case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14540
14541
14542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14543$as_echo_n "checking host system type... " >&6; }
14544if ${ac_cv_host+:} false; then :
14545  $as_echo_n "(cached) " >&6
14546else
14547  if test "x$host_alias" = x; then
14548  ac_cv_host=$ac_cv_build
14549else
14550  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14551    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14552fi
14553
14554fi
14555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14556$as_echo "$ac_cv_host" >&6; }
14557case $ac_cv_host in
14558*-*-*) ;;
14559*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14560esac
14561host=$ac_cv_host
14562ac_save_IFS=$IFS; IFS='-'
14563set x $ac_cv_host
14564shift
14565host_cpu=$1
14566host_vendor=$2
14567shift; shift
14568# Remember, the first character of IFS is used to create $*,
14569# except with old shells:
14570host_os=$*
14571IFS=$ac_save_IFS
14572case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14573
14574
14575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14576$as_echo_n "checking target system type... " >&6; }
14577if ${ac_cv_target+:} false; then :
14578  $as_echo_n "(cached) " >&6
14579else
14580  if test "x$target_alias" = x; then
14581  ac_cv_target=$ac_cv_host
14582else
14583  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14584    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14585fi
14586
14587fi
14588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14589$as_echo "$ac_cv_target" >&6; }
14590case $ac_cv_target in
14591*-*-*) ;;
14592*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14593esac
14594target=$ac_cv_target
14595ac_save_IFS=$IFS; IFS='-'
14596set x $ac_cv_target
14597shift
14598target_cpu=$1
14599target_vendor=$2
14600shift; shift
14601# Remember, the first character of IFS is used to create $*,
14602# except with old shells:
14603target_os=$*
14604IFS=$ac_save_IFS
14605case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14606
14607
14608# The aliases save the names the user supplied, while $host etc.
14609# will get canonicalized.
14610test -n "$target_alias" &&
14611  test "$program_prefix$program_suffix$program_transform_name" = \
14612    NONENONEs,x,x, &&
14613  program_prefix=${target_alias}-
14614
14615  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14616  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14617  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14618  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14619  # to use the configure naming style.
14620
14621
14622
14623
14624
14625  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14626  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14627  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14628  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14629  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14630  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14631
14632
14633
14634  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14635
14636  case "$build_os" in
14637    *linux*)
14638      VAR_OS=linux
14639      VAR_OS_TYPE=unix
14640      ;;
14641    *solaris*)
14642      VAR_OS=solaris
14643      VAR_OS_TYPE=unix
14644      ;;
14645    *darwin*)
14646      VAR_OS=macosx
14647      VAR_OS_TYPE=unix
14648      ;;
14649    *bsd*)
14650      VAR_OS=bsd
14651      VAR_OS_TYPE=unix
14652      ;;
14653    *cygwin*)
14654      VAR_OS=windows
14655      VAR_OS_ENV=windows.cygwin
14656      ;;
14657    *mingw*)
14658      VAR_OS=windows
14659      VAR_OS_ENV=windows.msys
14660      ;;
14661    *aix*)
14662      VAR_OS=aix
14663      VAR_OS_TYPE=unix
14664      ;;
14665    *)
14666      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14667      ;;
14668  esac
14669
14670
14671  # First argument is the cpu name from the trip/quad
14672  case "$build_cpu" in
14673    x86_64)
14674      VAR_CPU=x86_64
14675      VAR_CPU_ARCH=x86
14676      VAR_CPU_BITS=64
14677      VAR_CPU_ENDIAN=little
14678      ;;
14679    i?86)
14680      VAR_CPU=x86
14681      VAR_CPU_ARCH=x86
14682      VAR_CPU_BITS=32
14683      VAR_CPU_ENDIAN=little
14684      ;;
14685    arm*)
14686      VAR_CPU=arm
14687      VAR_CPU_ARCH=arm
14688      VAR_CPU_BITS=32
14689      VAR_CPU_ENDIAN=little
14690      ;;
14691    aarch64)
14692      VAR_CPU=aarch64
14693      VAR_CPU_ARCH=aarch64
14694      VAR_CPU_BITS=64
14695      VAR_CPU_ENDIAN=little
14696      ;;
14697    powerpc)
14698      VAR_CPU=ppc
14699      VAR_CPU_ARCH=ppc
14700      VAR_CPU_BITS=32
14701      VAR_CPU_ENDIAN=big
14702      ;;
14703    powerpc64)
14704      VAR_CPU=ppc64
14705      VAR_CPU_ARCH=ppc
14706      VAR_CPU_BITS=64
14707      VAR_CPU_ENDIAN=big
14708      ;;
14709    powerpc64le)
14710      VAR_CPU=ppc64le
14711      VAR_CPU_ARCH=ppc
14712      VAR_CPU_BITS=64
14713      VAR_CPU_ENDIAN=little
14714      ;;
14715    s390)
14716      VAR_CPU=s390
14717      VAR_CPU_ARCH=s390
14718      VAR_CPU_BITS=32
14719      VAR_CPU_ENDIAN=big
14720      ;;
14721    s390x)
14722      VAR_CPU=s390x
14723      VAR_CPU_ARCH=s390
14724      VAR_CPU_BITS=64
14725      VAR_CPU_ENDIAN=big
14726      ;;
14727    sparc)
14728      VAR_CPU=sparc
14729      VAR_CPU_ARCH=sparc
14730      VAR_CPU_BITS=32
14731      VAR_CPU_ENDIAN=big
14732      ;;
14733    sparcv9|sparc64)
14734      VAR_CPU=sparcv9
14735      VAR_CPU_ARCH=sparc
14736      VAR_CPU_BITS=64
14737      VAR_CPU_ENDIAN=big
14738      ;;
14739    *)
14740      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14741      ;;
14742  esac
14743
14744  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14745  OPENJDK_BUILD_OS="$VAR_OS"
14746  if test "x$VAR_OS_TYPE" != x; then
14747    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14748  else
14749    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14750  fi
14751  if test "x$VAR_OS_ENV" != x; then
14752    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14753  else
14754    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14755  fi
14756  OPENJDK_BUILD_CPU="$VAR_CPU"
14757  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14758  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14759  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14760
14761
14762
14763
14764
14765
14766
14767
14768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14769$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14771$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14772
14773  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14774
14775  case "$host_os" in
14776    *linux*)
14777      VAR_OS=linux
14778      VAR_OS_TYPE=unix
14779      ;;
14780    *solaris*)
14781      VAR_OS=solaris
14782      VAR_OS_TYPE=unix
14783      ;;
14784    *darwin*)
14785      VAR_OS=macosx
14786      VAR_OS_TYPE=unix
14787      ;;
14788    *bsd*)
14789      VAR_OS=bsd
14790      VAR_OS_TYPE=unix
14791      ;;
14792    *cygwin*)
14793      VAR_OS=windows
14794      VAR_OS_ENV=windows.cygwin
14795      ;;
14796    *mingw*)
14797      VAR_OS=windows
14798      VAR_OS_ENV=windows.msys
14799      ;;
14800    *aix*)
14801      VAR_OS=aix
14802      VAR_OS_TYPE=unix
14803      ;;
14804    *)
14805      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14806      ;;
14807  esac
14808
14809
14810  # First argument is the cpu name from the trip/quad
14811  case "$host_cpu" in
14812    x86_64)
14813      VAR_CPU=x86_64
14814      VAR_CPU_ARCH=x86
14815      VAR_CPU_BITS=64
14816      VAR_CPU_ENDIAN=little
14817      ;;
14818    i?86)
14819      VAR_CPU=x86
14820      VAR_CPU_ARCH=x86
14821      VAR_CPU_BITS=32
14822      VAR_CPU_ENDIAN=little
14823      ;;
14824    arm*)
14825      VAR_CPU=arm
14826      VAR_CPU_ARCH=arm
14827      VAR_CPU_BITS=32
14828      VAR_CPU_ENDIAN=little
14829      ;;
14830    aarch64)
14831      VAR_CPU=aarch64
14832      VAR_CPU_ARCH=aarch64
14833      VAR_CPU_BITS=64
14834      VAR_CPU_ENDIAN=little
14835      ;;
14836    powerpc)
14837      VAR_CPU=ppc
14838      VAR_CPU_ARCH=ppc
14839      VAR_CPU_BITS=32
14840      VAR_CPU_ENDIAN=big
14841      ;;
14842    powerpc64)
14843      VAR_CPU=ppc64
14844      VAR_CPU_ARCH=ppc
14845      VAR_CPU_BITS=64
14846      VAR_CPU_ENDIAN=big
14847      ;;
14848    powerpc64le)
14849      VAR_CPU=ppc64le
14850      VAR_CPU_ARCH=ppc
14851      VAR_CPU_BITS=64
14852      VAR_CPU_ENDIAN=little
14853      ;;
14854    s390)
14855      VAR_CPU=s390
14856      VAR_CPU_ARCH=s390
14857      VAR_CPU_BITS=32
14858      VAR_CPU_ENDIAN=big
14859      ;;
14860    s390x)
14861      VAR_CPU=s390x
14862      VAR_CPU_ARCH=s390
14863      VAR_CPU_BITS=64
14864      VAR_CPU_ENDIAN=big
14865      ;;
14866    sparc)
14867      VAR_CPU=sparc
14868      VAR_CPU_ARCH=sparc
14869      VAR_CPU_BITS=32
14870      VAR_CPU_ENDIAN=big
14871      ;;
14872    sparcv9|sparc64)
14873      VAR_CPU=sparcv9
14874      VAR_CPU_ARCH=sparc
14875      VAR_CPU_BITS=64
14876      VAR_CPU_ENDIAN=big
14877      ;;
14878    *)
14879      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14880      ;;
14881  esac
14882
14883  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14884  OPENJDK_TARGET_OS="$VAR_OS"
14885  if test "x$VAR_OS_TYPE" != x; then
14886    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14887  else
14888    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14889  fi
14890  if test "x$VAR_OS_ENV" != x; then
14891    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14892  else
14893    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14894  fi
14895  OPENJDK_TARGET_CPU="$VAR_CPU"
14896  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14897  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14898  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14899
14900
14901
14902
14903
14904
14905
14906
14907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14908$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14910$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14911
14912
14913
14914# Check whether --with-target-bits was given.
14915if test "${with_target_bits+set}" = set; then :
14916  withval=$with_target_bits;
14917fi
14918
14919
14920  # We have three types of compiles:
14921  # native  == normal compilation, target system == build system
14922  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14923  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14924  #
14925  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14926    # We're doing a proper cross-compilation
14927    COMPILE_TYPE="cross"
14928  else
14929    COMPILE_TYPE="native"
14930  fi
14931
14932  if test "x$with_target_bits" != x; then
14933    if test "x$COMPILE_TYPE" = "xcross"; then
14934      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14935    fi
14936
14937    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14938      # A reduced build is requested
14939      COMPILE_TYPE="reduced"
14940      OPENJDK_TARGET_CPU_BITS=32
14941      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14942        OPENJDK_TARGET_CPU=x86
14943      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14944        OPENJDK_TARGET_CPU=sparc
14945      else
14946        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14947      fi
14948    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14949      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
14950    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14951      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14952$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14953    else
14954      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14955    fi
14956  fi
14957
14958
14959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14960$as_echo_n "checking compilation type... " >&6; }
14961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14962$as_echo "$COMPILE_TYPE" >&6; }
14963
14964
14965  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14966    REQUIRED_OS_NAME=SunOS
14967    REQUIRED_OS_VERSION=5.10
14968  fi
14969  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14970    REQUIRED_OS_NAME=Linux
14971    REQUIRED_OS_VERSION=2.6
14972  fi
14973  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14974    REQUIRED_OS_NAME=Windows
14975    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14976      REQUIRED_OS_VERSION=5.2
14977    else
14978      REQUIRED_OS_VERSION=5.1
14979    fi
14980  fi
14981  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14982    REQUIRED_OS_NAME=Darwin
14983    REQUIRED_OS_VERSION=11.2
14984  fi
14985
14986
14987
14988
14989
14990  # Also store the legacy naming of the cpu.
14991  # Ie i586 and amd64 instead of x86 and x86_64
14992  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14993  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14994    OPENJDK_TARGET_CPU_LEGACY="i586"
14995  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14996    # On all platforms except MacOSX replace x86_64 with amd64.
14997    OPENJDK_TARGET_CPU_LEGACY="amd64"
14998  fi
14999
15000
15001  # And the second legacy naming of the cpu.
15002  # Ie i386 and amd64 instead of x86 and x86_64.
15003  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15004  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15005    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15006  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15007    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15008  fi
15009
15010
15011  # This is the name of the cpu (but using i386 and amd64 instead of
15012  # x86 and x86_64, respectively), preceeded by a /, to be used when
15013  # locating libraries. On macosx, it's empty, though.
15014  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15015  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15016    OPENJDK_TARGET_CPU_LIBDIR=""
15017  fi
15018
15019
15020  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15021  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15022  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15023  OPENJDK_TARGET_CPU_ISADIR=""
15024  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15025    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15026      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15027    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15028      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15029    fi
15030  fi
15031
15032
15033  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15034  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15035  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15036    # On linux only, we replace x86 with i386.
15037    OPENJDK_TARGET_CPU_OSARCH="i386"
15038  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15039    # On all platforms except macosx, we replace x86_64 with amd64.
15040    OPENJDK_TARGET_CPU_OSARCH="amd64"
15041  fi
15042
15043
15044  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15045  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15046    OPENJDK_TARGET_CPU_JLI="i386"
15047  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15048    # On all platforms except macosx, we replace x86_64 with amd64.
15049    OPENJDK_TARGET_CPU_JLI="amd64"
15050  fi
15051  # Now setup the -D flags for building libjli.
15052  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15053  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15054    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15055      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15056    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15057      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15058    fi
15059  fi
15060
15061
15062  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15063      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15064  else
15065      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15066  fi
15067
15068
15069  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15070    A_LP64="LP64:="
15071    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15072    # unpack200.exe
15073    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15074      ADD_LP64="-D_LP64=1"
15075    fi
15076  fi
15077  LP64=$A_LP64
15078
15079
15080  if test "x$COMPILE_TYPE" = "xcross"; then
15081    # FIXME: ... or should this include reduced builds..?
15082    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15083  else
15084    DEFINE_CROSS_COMPILE_ARCH=""
15085  fi
15086
15087
15088  # ZERO_ARCHDEF is used to enable architecture-specific code
15089  case "${OPENJDK_TARGET_CPU}" in
15090    ppc)     ZERO_ARCHDEF=PPC32 ;;
15091    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15092    s390*)   ZERO_ARCHDEF=S390  ;;
15093    sparc*)  ZERO_ARCHDEF=SPARC ;;
15094    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15095    x86)     ZERO_ARCHDEF=IA32  ;;
15096    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15097  esac
15098
15099
15100
15101
15102# Continue setting up basic stuff. Most remaining code require fundamental tools.
15103
15104  # Save the current directory this script was started from
15105  CURDIR="$PWD"
15106
15107  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15108  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15109  # was not available at that time.
15110  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15111  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15112    ORIGINAL_PATH="$REWRITTEN_PATH"
15113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15114$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15115  fi
15116
15117  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15118    PATH_SEP=";"
15119
15120  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15121  if test $SRC_ROOT_LENGTH -gt 100; then
15122    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15123  fi
15124
15125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15127$as_echo_n "checking cygwin release... " >&6; }
15128    CYGWIN_VERSION=`$UNAME -r`
15129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15130$as_echo "$CYGWIN_VERSION" >&6; }
15131    WINDOWS_ENV_VENDOR='cygwin'
15132    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15133
15134    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15135    if test "x$CYGWIN_VERSION_OLD" != x; then
15136      { $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
15137$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;}
15138      as_fn_error $? "Cannot continue" "$LINENO" 5
15139    fi
15140    if test "x$CYGPATH" = x; then
15141      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15142    fi
15143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15144$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15145    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15146    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15147    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15148    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15150$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15151    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15152    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15153    if test "x$test_cygdrive_prefix" = x; then
15154      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15155    fi
15156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15158$as_echo_n "checking msys release... " >&6; }
15159    MSYS_VERSION=`$UNAME -r`
15160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15161$as_echo "$MSYS_VERSION" >&6; }
15162
15163    WINDOWS_ENV_VENDOR='msys'
15164    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15165
15166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15167$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15168    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15169    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15170
15171  windows_path="$MSYS_ROOT_PATH"
15172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15173    unix_path=`$CYGPATH -u "$windows_path"`
15174    MSYS_ROOT_PATH="$unix_path"
15175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15177    MSYS_ROOT_PATH="$unix_path"
15178  fi
15179
15180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15181$as_echo "$MSYS_ROOT_PATH" >&6; }
15182    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15183  else
15184    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15185  fi
15186
15187  # Test if windows or unix (cygwin/msys) find is first in path.
15188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15189$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15190  FIND_BINARY_OUTPUT=`find --version 2>&1`
15191  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15192    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15193$as_echo "unix style" >&6; }
15194  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15196$as_echo "Windows" >&6; }
15197    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15198$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15199    { $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
15200$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15201    as_fn_error $? "Cannot continue" "$LINENO" 5
15202  else
15203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15204$as_echo "unknown" >&6; }
15205    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15206$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15207  fi
15208
15209  else
15210    PATH_SEP=":"
15211  fi
15212
15213
15214  # We get the top-level directory from the supporting wrappers.
15215  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15216$as_echo_n "checking for top-level directory... " >&6; }
15217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15218$as_echo "$TOPDIR" >&6; }
15219
15220
15221  # Save the original version of TOPDIR for string comparisons
15222  ORIGINAL_TOPDIR="$TOPDIR"
15223
15224
15225  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15226
15227  # Only process if variable expands to non-empty
15228
15229  if test "x$CURDIR" != x; then
15230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15231
15232  # Input might be given as Windows format, start by converting to
15233  # unix format.
15234  path="$CURDIR"
15235  new_path=`$CYGPATH -u "$path"`
15236
15237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15240  # "foo.exe" is OK but "foo" is an error.
15241  #
15242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15243  # It is also a way to make sure we got the proper file name for the real test later on.
15244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15245  if test "x$test_shortpath" = x; then
15246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15247$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15248    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15249  fi
15250
15251  # Call helper function which possibly converts this using DOS-style short mode.
15252  # If so, the updated path is stored in $new_path.
15253
15254  input_path="$new_path"
15255  # Check if we need to convert this using DOS-style short mode. If the path
15256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15257  # take no chances and rewrite it.
15258  # Note: m4 eats our [], so we need to use [ and ] instead.
15259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15260  if test "x$has_forbidden_chars" != x; then
15261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15265      # Going to short mode and back again did indeed matter. Since short mode is
15266      # case insensitive, let's make it lowercase to improve readability.
15267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15268      # Now convert it back to Unix-style (cygpath)
15269      input_path=`$CYGPATH -u "$shortmode_path"`
15270      new_path="$input_path"
15271    fi
15272  fi
15273
15274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15275  if test "x$test_cygdrive_prefix" = x; then
15276    # As a simple fix, exclude /usr/bin since it's not a real path.
15277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15279      # a path prefixed by /cygdrive for fixpath to work.
15280      new_path="$CYGWIN_ROOT_PATH$input_path"
15281    fi
15282  fi
15283
15284
15285  if test "x$path" != "x$new_path"; then
15286    CURDIR="$new_path"
15287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15288$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15289  fi
15290
15291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15292
15293  path="$CURDIR"
15294  has_colon=`$ECHO $path | $GREP ^.:`
15295  new_path="$path"
15296  if test "x$has_colon" = x; then
15297    # Not in mixed or Windows style, start by that.
15298    new_path=`cmd //c echo $path`
15299  fi
15300
15301
15302  input_path="$new_path"
15303  # Check if we need to convert this using DOS-style short mode. If the path
15304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15305  # take no chances and rewrite it.
15306  # Note: m4 eats our [], so we need to use [ and ] instead.
15307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15308  if test "x$has_forbidden_chars" != x; then
15309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15311  fi
15312
15313
15314  windows_path="$new_path"
15315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15316    unix_path=`$CYGPATH -u "$windows_path"`
15317    new_path="$unix_path"
15318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15320    new_path="$unix_path"
15321  fi
15322
15323  if test "x$path" != "x$new_path"; then
15324    CURDIR="$new_path"
15325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15326$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15327  fi
15328
15329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15331
15332    else
15333      # We're on a unix platform. Hooray! :)
15334      path="$CURDIR"
15335      has_space=`$ECHO "$path" | $GREP " "`
15336      if test "x$has_space" != x; then
15337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15338$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15340      fi
15341
15342      # Use eval to expand a potential ~
15343      eval path="$path"
15344      if test ! -f "$path" && test ! -d "$path"; then
15345        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15346      fi
15347
15348      if test -d "$path"; then
15349        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15350      else
15351        dir="`$DIRNAME "$path"`"
15352        base="`$BASENAME "$path"`"
15353        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15354      fi
15355    fi
15356  fi
15357
15358
15359  # Only process if variable expands to non-empty
15360
15361  if test "x$TOPDIR" != x; then
15362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15363
15364  # Input might be given as Windows format, start by converting to
15365  # unix format.
15366  path="$TOPDIR"
15367  new_path=`$CYGPATH -u "$path"`
15368
15369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15372  # "foo.exe" is OK but "foo" is an error.
15373  #
15374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15375  # It is also a way to make sure we got the proper file name for the real test later on.
15376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15377  if test "x$test_shortpath" = x; then
15378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15379$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15380    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15381  fi
15382
15383  # Call helper function which possibly converts this using DOS-style short mode.
15384  # If so, the updated path is stored in $new_path.
15385
15386  input_path="$new_path"
15387  # Check if we need to convert this using DOS-style short mode. If the path
15388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15389  # take no chances and rewrite it.
15390  # Note: m4 eats our [], so we need to use [ and ] instead.
15391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15392  if test "x$has_forbidden_chars" != x; then
15393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15397      # Going to short mode and back again did indeed matter. Since short mode is
15398      # case insensitive, let's make it lowercase to improve readability.
15399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15400      # Now convert it back to Unix-style (cygpath)
15401      input_path=`$CYGPATH -u "$shortmode_path"`
15402      new_path="$input_path"
15403    fi
15404  fi
15405
15406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15407  if test "x$test_cygdrive_prefix" = x; then
15408    # As a simple fix, exclude /usr/bin since it's not a real path.
15409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15411      # a path prefixed by /cygdrive for fixpath to work.
15412      new_path="$CYGWIN_ROOT_PATH$input_path"
15413    fi
15414  fi
15415
15416
15417  if test "x$path" != "x$new_path"; then
15418    TOPDIR="$new_path"
15419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15420$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15421  fi
15422
15423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15424
15425  path="$TOPDIR"
15426  has_colon=`$ECHO $path | $GREP ^.:`
15427  new_path="$path"
15428  if test "x$has_colon" = x; then
15429    # Not in mixed or Windows style, start by that.
15430    new_path=`cmd //c echo $path`
15431  fi
15432
15433
15434  input_path="$new_path"
15435  # Check if we need to convert this using DOS-style short mode. If the path
15436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15437  # take no chances and rewrite it.
15438  # Note: m4 eats our [], so we need to use [ and ] instead.
15439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15440  if test "x$has_forbidden_chars" != x; then
15441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15443  fi
15444
15445
15446  windows_path="$new_path"
15447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15448    unix_path=`$CYGPATH -u "$windows_path"`
15449    new_path="$unix_path"
15450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15452    new_path="$unix_path"
15453  fi
15454
15455  if test "x$path" != "x$new_path"; then
15456    TOPDIR="$new_path"
15457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15458$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15459  fi
15460
15461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15463
15464    else
15465      # We're on a unix platform. Hooray! :)
15466      path="$TOPDIR"
15467      has_space=`$ECHO "$path" | $GREP " "`
15468      if test "x$has_space" != x; then
15469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15470$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15472      fi
15473
15474      # Use eval to expand a potential ~
15475      eval path="$path"
15476      if test ! -f "$path" && test ! -d "$path"; then
15477        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15478      fi
15479
15480      if test -d "$path"; then
15481        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15482      else
15483        dir="`$DIRNAME "$path"`"
15484        base="`$BASENAME "$path"`"
15485        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15486      fi
15487    fi
15488  fi
15489
15490  # SRC_ROOT is a traditional alias for TOPDIR.
15491  SRC_ROOT=$TOPDIR
15492
15493  # Calculate a canonical version of TOPDIR for string comparisons
15494  CANONICAL_TOPDIR=$TOPDIR
15495
15496  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15497    # Follow a chain of symbolic links. Use readlink
15498    # where it exists, else fall back to horribly
15499    # complicated shell code.
15500    if test "x$READLINK_TESTED" != yes; then
15501      # On MacOSX there is a readlink tool with a different
15502      # purpose than the GNU readlink tool. Check the found readlink.
15503      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15504      if test "x$ISGNU" = x; then
15505        # A readlink that we do not know how to use.
15506        # Are there other non-GNU readlinks out there?
15507        READLINK_TESTED=yes
15508        READLINK=
15509      fi
15510    fi
15511
15512    if test "x$READLINK" != x; then
15513      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15514    else
15515      # Save the current directory for restoring afterwards
15516      STARTDIR=$PWD
15517      COUNTER=0
15518      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15519      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15520      cd $sym_link_dir
15521      # Use -P flag to resolve symlinks in directories.
15522      cd `$THEPWDCMD -P`
15523      sym_link_dir=`$THEPWDCMD -P`
15524      # Resolve file symlinks
15525      while test $COUNTER -lt 20; do
15526        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15527        if test "x$ISLINK" == x; then
15528          # This is not a symbolic link! We are done!
15529          break
15530        fi
15531        # Again resolve directory symlinks since the target of the just found
15532        # link could be in a different directory
15533        cd `$DIRNAME $ISLINK`
15534        sym_link_dir=`$THEPWDCMD -P`
15535        sym_link_file=`$BASENAME $ISLINK`
15536        let COUNTER=COUNTER+1
15537      done
15538      cd $STARTDIR
15539      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15540    fi
15541  fi
15542
15543
15544
15545  # Locate the directory of this script.
15546  AUTOCONF_DIR=$TOPDIR/common/autoconf
15547
15548
15549# Check if it's a pure open build or if custom sources are to be used.
15550
15551  # Check whether --enable-openjdk-only was given.
15552if test "${enable_openjdk_only+set}" = set; then :
15553  enableval=$enable_openjdk_only;
15554else
15555  enable_openjdk_only="no"
15556fi
15557
15558
15559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15560$as_echo_n "checking for presence of closed sources... " >&6; }
15561  if test -d "$SRC_ROOT/jdk/src/closed"; then
15562    CLOSED_SOURCE_PRESENT=yes
15563  else
15564    CLOSED_SOURCE_PRESENT=no
15565  fi
15566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15567$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15568
15569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15570$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15571  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15573$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15574
15575  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15576    OPENJDK=true
15577    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15578      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15579$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15580    fi
15581  else
15582    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15583      OPENJDK=true
15584    else
15585      OPENJDK=false
15586    fi
15587  fi
15588
15589  if test "x$OPENJDK" = "xtrue"; then
15590    SET_OPENJDK="OPENJDK=true"
15591  fi
15592
15593
15594
15595  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15596  # the IncludeCustomExtension macro.
15597
15598
15599# Check whether --with-custom-make-dir was given.
15600if test "${with_custom_make_dir+set}" = set; then :
15601  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
15602$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15603fi
15604
15605
15606
15607
15608# These are needed to be able to create a configuration name (and thus the output directory)
15609
15610  ###############################################################################
15611  #
15612  # Check which variant of the JDK that we want to build.
15613  # Currently we have:
15614  #    normal:   standard edition
15615  # but the custom make system may add other variants
15616  #
15617  # Effectively the JDK variant gives a name to a specific set of
15618  # modules to compile into the JDK. In the future, these modules
15619  # might even be Jigsaw modules.
15620  #
15621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15622$as_echo_n "checking which variant of the JDK to build... " >&6; }
15623
15624# Check whether --with-jdk-variant was given.
15625if test "${with_jdk_variant+set}" = set; then :
15626  withval=$with_jdk_variant;
15627fi
15628
15629
15630  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15631    JDK_VARIANT="normal"
15632  else
15633    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15634  fi
15635
15636
15637
15638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15639$as_echo "$JDK_VARIANT" >&6; }
15640
15641
15642###############################################################################
15643#
15644# Check which interpreter of the JVM we want to build.
15645# Currently we have:
15646#    template: Template interpreter (the default)
15647#    cpp     : C++ interpreter
15648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15649$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15650
15651# Check whether --with-jvm-interpreter was given.
15652if test "${with_jvm_interpreter+set}" = set; then :
15653  withval=$with_jvm_interpreter;
15654fi
15655
15656
15657if test "x$with_jvm_interpreter" = x; then
15658     with_jvm_interpreter="template"
15659fi
15660
15661JVM_INTERPRETER="$with_jvm_interpreter"
15662
15663if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15664   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15665fi
15666
15667
15668
15669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15670$as_echo "$with_jvm_interpreter" >&6; }
15671
15672
15673
15674  ###############################################################################
15675  #
15676  # Check which variants of the JVM that we want to build.
15677  # Currently we have:
15678  #    server: normal interpreter and a tiered C1/C2 compiler
15679  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15680  #    minimal1: reduced form of client with optional VM services and features stripped out
15681  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15682  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15683  #    zero: no machine code interpreter, no compiler
15684  #    zeroshark: zero interpreter and shark/llvm compiler backend
15685#    core: interpreter only, no compiler (only works on some platforms)
15686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15687$as_echo_n "checking which variants of the JVM to build... " >&6; }
15688
15689# Check whether --with-jvm-variants was given.
15690if test "${with_jvm_variants+set}" = set; then :
15691  withval=$with_jvm_variants;
15692fi
15693
15694
15695  if test "x$with_jvm_variants" = x; then
15696    with_jvm_variants="server"
15697  fi
15698
15699  JVM_VARIANTS=",$with_jvm_variants,"
15700  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,//'`
15701
15702  if test "x$TEST_VARIANTS" != "x,"; then
15703     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15704  fi
15705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15706$as_echo "$with_jvm_variants" >&6; }
15707
15708  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15709  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15710  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15711  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15712  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15713  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15714  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15715
15716  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15717    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15718      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15719    fi
15720  fi
15721  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15722    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15723      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15724    fi
15725  fi
15726  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15727    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15728      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15729    fi
15730  fi
15731
15732  # Replace the commas with AND for use in the build directory name.
15733  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15734  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/'`
15735  if test "x$COUNT_VARIANTS" != "x,1"; then
15736    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15737  else
15738    BUILDING_MULTIPLE_JVM_VARIANTS=no
15739  fi
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750  INCLUDE_SA=true
15751  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15752    INCLUDE_SA=false
15753  fi
15754  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15755    INCLUDE_SA=false
15756  fi
15757  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15758    INCLUDE_SA=false
15759  fi
15760  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15761    INCLUDE_SA=false
15762  fi
15763
15764
15765  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15766    MACOSX_UNIVERSAL="true"
15767  fi
15768
15769
15770
15771
15772  ###############################################################################
15773  #
15774  # Set the debug level
15775  #    release: no debug information, all optimizations, no asserts.
15776  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15777  #    fastdebug: debug information (-g), all optimizations, all asserts
15778  #    slowdebug: debug information (-g), no optimizations, all asserts
15779  #
15780  DEBUG_LEVEL="release"
15781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15782$as_echo_n "checking which debug level to use... " >&6; }
15783  # Check whether --enable-debug was given.
15784if test "${enable_debug+set}" = set; then :
15785  enableval=$enable_debug;
15786        ENABLE_DEBUG="${enableval}"
15787        DEBUG_LEVEL="fastdebug"
15788
15789else
15790  ENABLE_DEBUG="no"
15791fi
15792
15793
15794
15795# Check whether --with-debug-level was given.
15796if test "${with_debug_level+set}" = set; then :
15797  withval=$with_debug_level;
15798        DEBUG_LEVEL="${withval}"
15799        if test "x$ENABLE_DEBUG" = xyes; then
15800          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15801        fi
15802
15803fi
15804
15805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15806$as_echo "$DEBUG_LEVEL" >&6; }
15807
15808  if test "x$DEBUG_LEVEL" != xrelease && \
15809      test "x$DEBUG_LEVEL" != xoptimized && \
15810      test "x$DEBUG_LEVEL" != xfastdebug && \
15811      test "x$DEBUG_LEVEL" != xslowdebug; then
15812    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15813  fi
15814
15815
15816  ###############################################################################
15817  #
15818  # Setup legacy vars/targets and new vars to deal with different debug levels.
15819  #
15820
15821  case $DEBUG_LEVEL in
15822    release )
15823      VARIANT="OPT"
15824      FASTDEBUG="false"
15825      DEBUG_CLASSFILES="false"
15826      BUILD_VARIANT_RELEASE=""
15827      HOTSPOT_DEBUG_LEVEL="product"
15828      HOTSPOT_EXPORT="product"
15829      ;;
15830    fastdebug )
15831      VARIANT="DBG"
15832      FASTDEBUG="true"
15833      DEBUG_CLASSFILES="true"
15834      BUILD_VARIANT_RELEASE="-fastdebug"
15835      HOTSPOT_DEBUG_LEVEL="fastdebug"
15836      HOTSPOT_EXPORT="fastdebug"
15837      ;;
15838    slowdebug )
15839      VARIANT="DBG"
15840      FASTDEBUG="false"
15841      DEBUG_CLASSFILES="true"
15842      BUILD_VARIANT_RELEASE="-debug"
15843      HOTSPOT_DEBUG_LEVEL="debug"
15844      HOTSPOT_EXPORT="debug"
15845      ;;
15846    optimized )
15847      VARIANT="OPT"
15848      FASTDEBUG="false"
15849      DEBUG_CLASSFILES="false"
15850      BUILD_VARIANT_RELEASE="-optimized"
15851      HOTSPOT_DEBUG_LEVEL="optimized"
15852      HOTSPOT_EXPORT="optimized"
15853      ;;
15854  esac
15855
15856  # The debug level 'optimized' is a little special because it is currently only
15857  # applicable to the HotSpot build where it means to build a completely
15858  # optimized version of the VM without any debugging code (like for the
15859  # 'release' debug level which is called 'product' in the HotSpot build) but
15860  # with the exception that it can contain additional code which is otherwise
15861  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15862  # test new and/or experimental features which are not intended for customer
15863  # shipment. Because these new features need to be tested and benchmarked in
15864  # real world scenarios, we want to build the containing JDK at the 'release'
15865  # debug level.
15866  if test "x$DEBUG_LEVEL" = xoptimized; then
15867    DEBUG_LEVEL="release"
15868  fi
15869
15870  #####
15871  # Generate the legacy makefile targets for hotspot.
15872  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15873  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15874  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15875  # But until then ...
15876  HOTSPOT_TARGET=""
15877
15878  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15879    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15880  fi
15881
15882  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15883    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15884  fi
15885
15886  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15887    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15888  fi
15889
15890  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15891    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15892  fi
15893
15894  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15895    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15896  fi
15897
15898  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15899    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15900  fi
15901
15902  if test "x$JVM_VARIANT_CORE" = xtrue; then
15903    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15904  fi
15905
15906  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15907
15908  # On Macosx universal binaries are produced, but they only contain
15909  # 64 bit intel. This invalidates control of which jvms are built
15910  # from configure, but only server is valid anyway. Fix this
15911  # when hotspot makefiles are rewritten.
15912  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15913    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15914  fi
15915
15916  #####
15917
15918
15919
15920
15921
15922
15923
15924
15925# With basic setup done, call the custom early hook.
15926
15927
15928# Check if we have devkits, extra paths or sysroot set.
15929
15930
15931# Check whether --with-devkit was given.
15932if test "${with_devkit+set}" = set; then :
15933  withval=$with_devkit;
15934
15935  # Only process if variable expands to non-empty
15936
15937  if test "x$with_devkit" != x; then
15938    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15939
15940  # Input might be given as Windows format, start by converting to
15941  # unix format.
15942  path="$with_devkit"
15943  new_path=`$CYGPATH -u "$path"`
15944
15945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15948  # "foo.exe" is OK but "foo" is an error.
15949  #
15950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15951  # It is also a way to make sure we got the proper file name for the real test later on.
15952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15953  if test "x$test_shortpath" = x; then
15954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15955$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15956    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15957  fi
15958
15959  # Call helper function which possibly converts this using DOS-style short mode.
15960  # If so, the updated path is stored in $new_path.
15961
15962  input_path="$new_path"
15963  # Check if we need to convert this using DOS-style short mode. If the path
15964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15965  # take no chances and rewrite it.
15966  # Note: m4 eats our [], so we need to use [ and ] instead.
15967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15968  if test "x$has_forbidden_chars" != x; then
15969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15973      # Going to short mode and back again did indeed matter. Since short mode is
15974      # case insensitive, let's make it lowercase to improve readability.
15975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15976      # Now convert it back to Unix-style (cygpath)
15977      input_path=`$CYGPATH -u "$shortmode_path"`
15978      new_path="$input_path"
15979    fi
15980  fi
15981
15982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15983  if test "x$test_cygdrive_prefix" = x; then
15984    # As a simple fix, exclude /usr/bin since it's not a real path.
15985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15987      # a path prefixed by /cygdrive for fixpath to work.
15988      new_path="$CYGWIN_ROOT_PATH$input_path"
15989    fi
15990  fi
15991
15992
15993  if test "x$path" != "x$new_path"; then
15994    with_devkit="$new_path"
15995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15996$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15997  fi
15998
15999    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16000
16001  path="$with_devkit"
16002  has_colon=`$ECHO $path | $GREP ^.:`
16003  new_path="$path"
16004  if test "x$has_colon" = x; then
16005    # Not in mixed or Windows style, start by that.
16006    new_path=`cmd //c echo $path`
16007  fi
16008
16009
16010  input_path="$new_path"
16011  # Check if we need to convert this using DOS-style short mode. If the path
16012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16013  # take no chances and rewrite it.
16014  # Note: m4 eats our [], so we need to use [ and ] instead.
16015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16016  if test "x$has_forbidden_chars" != x; then
16017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16019  fi
16020
16021
16022  windows_path="$new_path"
16023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16024    unix_path=`$CYGPATH -u "$windows_path"`
16025    new_path="$unix_path"
16026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16028    new_path="$unix_path"
16029  fi
16030
16031  if test "x$path" != "x$new_path"; then
16032    with_devkit="$new_path"
16033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16034$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16035  fi
16036
16037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16039
16040    else
16041      # We're on a unix platform. Hooray! :)
16042      path="$with_devkit"
16043      has_space=`$ECHO "$path" | $GREP " "`
16044      if test "x$has_space" != x; then
16045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16046$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16047        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16048      fi
16049
16050      # Use eval to expand a potential ~
16051      eval path="$path"
16052      if test ! -f "$path" && test ! -d "$path"; then
16053        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16054      fi
16055
16056      if test -d "$path"; then
16057        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16058      else
16059        dir="`$DIRNAME "$path"`"
16060        base="`$BASENAME "$path"`"
16061        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16062      fi
16063    fi
16064  fi
16065
16066        DEVKIT_ROOT="$with_devkit"
16067        # Check for a meta data info file in the root of the devkit
16068        if test -f "$DEVKIT_ROOT/devkit.info"; then
16069          . $DEVKIT_ROOT/devkit.info
16070          # This potentially sets the following:
16071          # A descriptive name of the devkit
16072
16073  if test "x$DEVKIT_NAME" = x; then
16074    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16075  fi
16076
16077          # Corresponds to --with-extra-path
16078
16079  if test "x$DEVKIT_EXTRA_PATH" = x; then
16080    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16081  fi
16082
16083          # Corresponds to --with-toolchain-path
16084
16085  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16086    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16087  fi
16088
16089          # Corresponds to --with-sysroot
16090
16091  if test "x$DEVKIT_SYSROOT" = x; then
16092    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16093  fi
16094
16095
16096          # Identifies the Visual Studio version in the devkit
16097
16098  if test "x$DEVKIT_VS_VERSION" = x; then
16099    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16100  fi
16101
16102          # The Visual Studio include environment variable
16103
16104  if test "x$DEVKIT_VS_INCLUDE" = x; then
16105    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16106  fi
16107
16108          # The Visual Studio lib environment variable
16109
16110  if test "x$DEVKIT_VS_LIB" = x; then
16111    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16112  fi
16113
16114          # Corresponds to --with-msvcr-dll
16115
16116  if test "x$DEVKIT_MSVCR_DLL" = x; then
16117    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16118  fi
16119
16120          # Corresponds to --with-msvcp-dll
16121
16122  if test "x$DEVKIT_MSVCP_DLL" = x; then
16123    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16124  fi
16125
16126        fi
16127
16128        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16129$as_echo_n "checking for devkit... " >&6; }
16130        if test "x$DEVKIT_NAME" != x; then
16131          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16132$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16133        else
16134          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16135$as_echo "$DEVKIT_ROOT" >&6; }
16136        fi
16137
16138
16139  if test "x$DEVKIT_EXTRA_PATH" != x; then
16140    if test "x$EXTRA_PATH" = x; then
16141      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16142    else
16143      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16144    fi
16145  fi
16146
16147
16148        # Fallback default of just /bin if DEVKIT_PATH is not defined
16149        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16150          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16151        fi
16152
16153  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16154    if test "x$TOOLCHAIN_PATH" = x; then
16155      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16156    else
16157      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16158    fi
16159  fi
16160
16161
16162        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16163        # places for backwards compatiblity.
16164        if test "x$DEVKIT_SYSROOT" != x; then
16165          SYSROOT="$DEVKIT_SYSROOT"
16166        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16167          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16168        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16169          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16170        fi
16171
16172
16173fi
16174
16175
16176  # You can force the sysroot if the sysroot encoded into the compiler tools
16177  # is not correct.
16178
16179# Check whether --with-sys-root was given.
16180if test "${with_sys_root+set}" = set; then :
16181  withval=$with_sys_root; SYSROOT=$with_sys_root
16182
16183fi
16184
16185
16186
16187# Check whether --with-sysroot was given.
16188if test "${with_sysroot+set}" = set; then :
16189  withval=$with_sysroot; SYSROOT=$with_sysroot
16190
16191fi
16192
16193
16194
16195# Check whether --with-tools-dir was given.
16196if test "${with_tools_dir+set}" = set; then :
16197  withval=$with_tools_dir;
16198  if test "x$with_tools_dir" != x; then
16199    if test "x$TOOLCHAIN_PATH" = x; then
16200      TOOLCHAIN_PATH="$with_tools_dir"
16201    else
16202      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16203    fi
16204  fi
16205
16206
16207fi
16208
16209
16210
16211# Check whether --with-toolchain-path was given.
16212if test "${with_toolchain_path+set}" = set; then :
16213  withval=$with_toolchain_path;
16214  if test "x$with_toolchain_path" != x; then
16215    if test "x$TOOLCHAIN_PATH" = x; then
16216      TOOLCHAIN_PATH="$with_toolchain_path"
16217    else
16218      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16219    fi
16220  fi
16221
16222
16223fi
16224
16225
16226
16227# Check whether --with-extra-path was given.
16228if test "${with_extra_path+set}" = set; then :
16229  withval=$with_extra_path;
16230  if test "x$with_extra_path" != x; then
16231    if test "x$EXTRA_PATH" = x; then
16232      EXTRA_PATH="$with_extra_path"
16233    else
16234      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16235    fi
16236  fi
16237
16238
16239fi
16240
16241
16242  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16243    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16244    # If not, detect if Xcode is installed by running xcodebuild -version
16245    # if no Xcode installed, xcodebuild exits with 1
16246    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16247    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16248      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16249      # fall back on the stub binary in /usr/bin/xcodebuild
16250      # Extract the first word of "xcodebuild", so it can be a program name with args.
16251set dummy xcodebuild; ac_word=$2
16252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16253$as_echo_n "checking for $ac_word... " >&6; }
16254if ${ac_cv_path_XCODEBUILD+:} false; then :
16255  $as_echo_n "(cached) " >&6
16256else
16257  case $XCODEBUILD in
16258  [\\/]* | ?:[\\/]*)
16259  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16260  ;;
16261  *)
16262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16263for as_dir in $TOOLCHAIN_PATH
16264do
16265  IFS=$as_save_IFS
16266  test -z "$as_dir" && as_dir=.
16267    for ac_exec_ext in '' $ac_executable_extensions; do
16268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16269    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16271    break 2
16272  fi
16273done
16274  done
16275IFS=$as_save_IFS
16276
16277  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16278  ;;
16279esac
16280fi
16281XCODEBUILD=$ac_cv_path_XCODEBUILD
16282if test -n "$XCODEBUILD"; then
16283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16284$as_echo "$XCODEBUILD" >&6; }
16285else
16286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16287$as_echo "no" >&6; }
16288fi
16289
16290
16291    else
16292      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16293      # when only the command line tools are installed there are no SDKs, so headers
16294      # are copied into the system frameworks
16295      XCODEBUILD=
16296
16297    fi
16298
16299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16300$as_echo_n "checking for sdk name... " >&6; }
16301
16302# Check whether --with-sdk-name was given.
16303if test "${with_sdk_name+set}" = set; then :
16304  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16305
16306fi
16307
16308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16309$as_echo "$SDKNAME" >&6; }
16310
16311    # if toolchain path is specified then don't rely on system headers, they may not compile
16312    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16313    test -z "$TOOLCHAIN_PATH" && \
16314      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16315
16316    if test -z "$SYSROOT"; then
16317      if test -n "$XCODEBUILD"; then
16318        # if we don't have system headers, use default SDK name (last resort)
16319        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16320          SDKNAME=${SDKNAME:-macosx}
16321        fi
16322
16323        if test -n "$SDKNAME"; then
16324          # Call xcodebuild to determine SYSROOT
16325          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16326        fi
16327      else
16328        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16329          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
16330        fi
16331      fi
16332    else
16333      # warn user if --with-sdk-name was also set
16334      if test -n "$with_sdk_name"; then
16335        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16336$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16337      fi
16338    fi
16339
16340    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16341      # If no system framework headers, then SYSROOT must be set, or we won't build
16342      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
16343    fi
16344
16345    # Perform a basic sanity test
16346    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16347      if test -z "$SYSROOT"; then
16348        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
16349      else
16350        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16351      fi
16352    fi
16353
16354    # set SDKROOT too, Xcode tools will pick it up
16355    SDKROOT=$SYSROOT
16356
16357  fi
16358
16359  # Prepend the extra path to the global path
16360
16361  if test "x$EXTRA_PATH" != x; then
16362    if test "x$PATH" = x; then
16363      PATH="$EXTRA_PATH"
16364    else
16365      PATH="$EXTRA_PATH:$PATH"
16366    fi
16367  fi
16368
16369
16370  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16371    # Add extra search paths on solaris for utilities like ar and as etc...
16372    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16373  fi
16374
16375  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16376$as_echo_n "checking for sysroot... " >&6; }
16377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16378$as_echo "$SYSROOT" >&6; }
16379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16380$as_echo_n "checking for toolchain path... " >&6; }
16381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16382$as_echo "$TOOLCHAIN_PATH" >&6; }
16383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16384$as_echo_n "checking for extra path... " >&6; }
16385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16386$as_echo "$EXTRA_PATH" >&6; }
16387
16388
16389# To properly create a configuration name, we need to have the OpenJDK target
16390# and options (variants and debug level) parsed.
16391
16392
16393
16394# Check whether --with-conf-name was given.
16395if test "${with_conf_name+set}" = set; then :
16396  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16397fi
16398
16399
16400  # Test from where we are running configure, in or outside of src root.
16401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16402$as_echo_n "checking where to store configuration... " >&6; }
16403  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16404      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16405      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16406    # We are running configure from the src root.
16407    # Create a default ./build/target-variant-debuglevel output root.
16408    if test "x${CONF_NAME}" = x; then
16409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16410$as_echo "in default location" >&6; }
16411      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16412    else
16413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16414$as_echo "in build directory with custom name" >&6; }
16415    fi
16416    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16417    $MKDIR -p "$OUTPUT_ROOT"
16418    if test ! -d "$OUTPUT_ROOT"; then
16419      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16420    fi
16421  else
16422    # We are running configure from outside of the src dir.
16423    # Then use the current directory as output dir!
16424    # If configuration is situated in normal build directory, just use the build
16425    # directory name as configuration name, otherwise use the complete path.
16426    if test "x${CONF_NAME}" = x; then
16427      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16428    fi
16429    OUTPUT_ROOT="$CURDIR"
16430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16431$as_echo "in current directory" >&6; }
16432
16433    # WARNING: This might be a bad thing to do. You need to be sure you want to
16434    # have a configuration in this directory. Do some sanity checks!
16435
16436    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16437      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16438      # other files
16439      files_present=`$LS $OUTPUT_ROOT`
16440      # Configure has already touched config.log and confdefs.h in the current dir when this check
16441      # is performed.
16442      filtered_files=`$ECHO "$files_present" \
16443          | $SED -e 's/config.log//g' \
16444              -e 's/configure.log//g' \
16445              -e 's/confdefs.h//g' \
16446              -e 's/ //g' \
16447          | $TR -d '\n'`
16448      if test "x$filtered_files" != x; then
16449        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16450$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16451        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16452$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16453        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16454$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16455        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16456$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16457        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16458$as_echo "$as_me: seriously mess up just about everything." >&6;}
16459        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16460$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16461        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16462$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16463        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16464      fi
16465    fi
16466  fi
16467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16468$as_echo_n "checking what configuration name to use... " >&6; }
16469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16470$as_echo "$CONF_NAME" >&6; }
16471
16472
16473  # Only process if variable expands to non-empty
16474
16475  if test "x$OUTPUT_ROOT" != x; then
16476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16477
16478  # Input might be given as Windows format, start by converting to
16479  # unix format.
16480  path="$OUTPUT_ROOT"
16481  new_path=`$CYGPATH -u "$path"`
16482
16483  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16484  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16485  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16486  # "foo.exe" is OK but "foo" is an error.
16487  #
16488  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16489  # It is also a way to make sure we got the proper file name for the real test later on.
16490  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16491  if test "x$test_shortpath" = x; then
16492    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16493$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16494    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16495  fi
16496
16497  # Call helper function which possibly converts this using DOS-style short mode.
16498  # If so, the updated path is stored in $new_path.
16499
16500  input_path="$new_path"
16501  # Check if we need to convert this using DOS-style short mode. If the path
16502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16503  # take no chances and rewrite it.
16504  # Note: m4 eats our [], so we need to use [ and ] instead.
16505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16506  if test "x$has_forbidden_chars" != x; then
16507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16511      # Going to short mode and back again did indeed matter. Since short mode is
16512      # case insensitive, let's make it lowercase to improve readability.
16513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16514      # Now convert it back to Unix-style (cygpath)
16515      input_path=`$CYGPATH -u "$shortmode_path"`
16516      new_path="$input_path"
16517    fi
16518  fi
16519
16520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16521  if test "x$test_cygdrive_prefix" = x; then
16522    # As a simple fix, exclude /usr/bin since it's not a real path.
16523    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16525      # a path prefixed by /cygdrive for fixpath to work.
16526      new_path="$CYGWIN_ROOT_PATH$input_path"
16527    fi
16528  fi
16529
16530
16531  if test "x$path" != "x$new_path"; then
16532    OUTPUT_ROOT="$new_path"
16533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16534$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16535  fi
16536
16537    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16538
16539  path="$OUTPUT_ROOT"
16540  has_colon=`$ECHO $path | $GREP ^.:`
16541  new_path="$path"
16542  if test "x$has_colon" = x; then
16543    # Not in mixed or Windows style, start by that.
16544    new_path=`cmd //c echo $path`
16545  fi
16546
16547
16548  input_path="$new_path"
16549  # Check if we need to convert this using DOS-style short mode. If the path
16550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16551  # take no chances and rewrite it.
16552  # Note: m4 eats our [], so we need to use [ and ] instead.
16553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16554  if test "x$has_forbidden_chars" != x; then
16555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16557  fi
16558
16559
16560  windows_path="$new_path"
16561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16562    unix_path=`$CYGPATH -u "$windows_path"`
16563    new_path="$unix_path"
16564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16566    new_path="$unix_path"
16567  fi
16568
16569  if test "x$path" != "x$new_path"; then
16570    OUTPUT_ROOT="$new_path"
16571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16572$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16573  fi
16574
16575  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16576  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16577
16578    else
16579      # We're on a unix platform. Hooray! :)
16580      path="$OUTPUT_ROOT"
16581      has_space=`$ECHO "$path" | $GREP " "`
16582      if test "x$has_space" != x; then
16583        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16584$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16585        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16586      fi
16587
16588      # Use eval to expand a potential ~
16589      eval path="$path"
16590      if test ! -f "$path" && test ! -d "$path"; then
16591        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16592      fi
16593
16594      if test -d "$path"; then
16595        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16596      else
16597        dir="`$DIRNAME "$path"`"
16598        base="`$BASENAME "$path"`"
16599        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16600      fi
16601    fi
16602  fi
16603
16604
16605  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16606  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16607
16608  SPEC=$OUTPUT_ROOT/spec.gmk
16609
16610  CONF_NAME=$CONF_NAME
16611
16612  OUTPUT_ROOT=$OUTPUT_ROOT
16613
16614
16615
16616  # The spec.gmk file contains all variables for the make system.
16617  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16618
16619  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16620  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16621
16622  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16623  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16624
16625  # The compare.sh is used to compare the build output to other builds.
16626  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16627
16628  # The generated Makefile knows where the spec.gmk is and where the source is.
16629  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16630  # which will look for generated configurations
16631  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16632
16633
16634
16635# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16636
16637  for ac_prog in apt-get yum port pkgutil pkgadd
16638do
16639  # Extract the first word of "$ac_prog", so it can be a program name with args.
16640set dummy $ac_prog; ac_word=$2
16641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16642$as_echo_n "checking for $ac_word... " >&6; }
16643if ${ac_cv_prog_PKGHANDLER+:} false; then :
16644  $as_echo_n "(cached) " >&6
16645else
16646  if test -n "$PKGHANDLER"; then
16647  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16648else
16649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16650for as_dir in $PATH
16651do
16652  IFS=$as_save_IFS
16653  test -z "$as_dir" && as_dir=.
16654    for ac_exec_ext in '' $ac_executable_extensions; do
16655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16656    ac_cv_prog_PKGHANDLER="$ac_prog"
16657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16658    break 2
16659  fi
16660done
16661  done
16662IFS=$as_save_IFS
16663
16664fi
16665fi
16666PKGHANDLER=$ac_cv_prog_PKGHANDLER
16667if test -n "$PKGHANDLER"; then
16668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16669$as_echo "$PKGHANDLER" >&6; }
16670else
16671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16672$as_echo "no" >&6; }
16673fi
16674
16675
16676  test -n "$PKGHANDLER" && break
16677done
16678
16679
16680
16681# Setup tools that requires more complex handling, or that is not needed by the configure script.
16682
16683
16684
16685  # Publish this variable in the help.
16686
16687
16688  if [ -z "${MAKE+x}" ]; then
16689    # The variable is not set by user, try to locate tool using the code snippet
16690
16691    # Try our hardest to locate a correct version of GNU make
16692    for ac_prog in gmake
16693do
16694  # Extract the first word of "$ac_prog", so it can be a program name with args.
16695set dummy $ac_prog; ac_word=$2
16696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16697$as_echo_n "checking for $ac_word... " >&6; }
16698if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16699  $as_echo_n "(cached) " >&6
16700else
16701  case $CHECK_GMAKE in
16702  [\\/]* | ?:[\\/]*)
16703  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16704  ;;
16705  *)
16706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16707for as_dir in $PATH
16708do
16709  IFS=$as_save_IFS
16710  test -z "$as_dir" && as_dir=.
16711    for ac_exec_ext in '' $ac_executable_extensions; do
16712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16713    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16715    break 2
16716  fi
16717done
16718  done
16719IFS=$as_save_IFS
16720
16721  ;;
16722esac
16723fi
16724CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16725if test -n "$CHECK_GMAKE"; then
16726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16727$as_echo "$CHECK_GMAKE" >&6; }
16728else
16729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16730$as_echo "no" >&6; }
16731fi
16732
16733
16734  test -n "$CHECK_GMAKE" && break
16735done
16736
16737
16738  MAKE_CANDIDATE=""$CHECK_GMAKE""
16739  DESCRIPTION="gmake in PATH"
16740
16741  # On Cygwin, we require a newer version of make than on other platforms
16742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16743    MAKE_VERSION_EXPR="-e 4\."
16744    MAKE_REQUIRED_VERSION="4.0"
16745   else
16746    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16747    MAKE_REQUIRED_VERSION="3.81"
16748  fi
16749
16750  if test "x$MAKE_CANDIDATE" != x; then
16751    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16752$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16753    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16754    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16755    if test "x$IS_GNU_MAKE" = x; then
16756      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16757$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16758    else
16759      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16760      if test "x$IS_MODERN_MAKE" = x; then
16761        { $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
16762$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;}
16763      else
16764        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16765          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16766            MAKE_EXPECTED_ENV='cygwin'
16767          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16768            MAKE_EXPECTED_ENV='msys'
16769          else
16770            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16771          fi
16772          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16773          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16774        else
16775          # Not relevant for non-Windows
16776          IS_MAKE_CORRECT_ENV=true
16777        fi
16778        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16779          { $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
16780$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;}
16781        else
16782          FOUND_MAKE=$MAKE_CANDIDATE
16783
16784  # Only process if variable expands to non-empty
16785
16786  if test "x$FOUND_MAKE" != x; then
16787    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16788
16789  # First separate the path from the arguments. This will split at the first
16790  # space.
16791  complete="$FOUND_MAKE"
16792  path="${complete%% *}"
16793  tmp="$complete EOL"
16794  arguments="${tmp#* }"
16795
16796  # Input might be given as Windows format, start by converting to
16797  # unix format.
16798  new_path=`$CYGPATH -u "$path"`
16799
16800  # Now try to locate executable using which
16801  new_path=`$WHICH "$new_path" 2> /dev/null`
16802  # bat and cmd files are not always considered executable in cygwin causing which
16803  # to not find them
16804  if test "x$new_path" = x \
16805      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16806      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16807    new_path=`$CYGPATH -u "$path"`
16808  fi
16809  if test "x$new_path" = x; then
16810    # Oops. Which didn't find the executable.
16811    # The splitting of arguments from the executable at a space might have been incorrect,
16812    # since paths with space are more likely in Windows. Give it another try with the whole
16813    # argument.
16814    path="$complete"
16815    arguments="EOL"
16816    new_path=`$CYGPATH -u "$path"`
16817    new_path=`$WHICH "$new_path" 2> /dev/null`
16818    # bat and cmd files are not always considered executable in cygwin causing which
16819    # to not find them
16820    if test "x$new_path" = x \
16821        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16822        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16823      new_path=`$CYGPATH -u "$path"`
16824    fi
16825    if test "x$new_path" = x; then
16826      # It's still not found. Now this is an unrecoverable error.
16827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16828$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16829      has_space=`$ECHO "$complete" | $GREP " "`
16830      if test "x$has_space" != x; then
16831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16833      fi
16834      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16835    fi
16836  fi
16837
16838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16841  # "foo.exe" is OK but "foo" is an error.
16842  #
16843  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16844  # It is also a way to make sure we got the proper file name for the real test later on.
16845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16846  if test "x$test_shortpath" = x; then
16847    # Short path failed, file does not exist as specified.
16848    # Try adding .exe or .cmd
16849    if test -f "${new_path}.exe"; then
16850      input_to_shortpath="${new_path}.exe"
16851    elif test -f "${new_path}.cmd"; then
16852      input_to_shortpath="${new_path}.cmd"
16853    else
16854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16855$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16856      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16857$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16858      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16859    fi
16860  else
16861    input_to_shortpath="$new_path"
16862  fi
16863
16864  # Call helper function which possibly converts this using DOS-style short mode.
16865  # If so, the updated path is stored in $new_path.
16866  new_path="$input_to_shortpath"
16867
16868  input_path="$input_to_shortpath"
16869  # Check if we need to convert this using DOS-style short mode. If the path
16870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16871  # take no chances and rewrite it.
16872  # Note: m4 eats our [], so we need to use [ and ] instead.
16873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16874  if test "x$has_forbidden_chars" != x; then
16875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16879      # Going to short mode and back again did indeed matter. Since short mode is
16880      # case insensitive, let's make it lowercase to improve readability.
16881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16882      # Now convert it back to Unix-style (cygpath)
16883      input_path=`$CYGPATH -u "$shortmode_path"`
16884      new_path="$input_path"
16885    fi
16886  fi
16887
16888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16889  if test "x$test_cygdrive_prefix" = x; then
16890    # As a simple fix, exclude /usr/bin since it's not a real path.
16891    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16893      # a path prefixed by /cygdrive for fixpath to work.
16894      new_path="$CYGWIN_ROOT_PATH$input_path"
16895    fi
16896  fi
16897
16898  # remove trailing .exe if any
16899  new_path="${new_path/%.exe/}"
16900
16901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16902
16903  # First separate the path from the arguments. This will split at the first
16904  # space.
16905  complete="$FOUND_MAKE"
16906  path="${complete%% *}"
16907  tmp="$complete EOL"
16908  arguments="${tmp#* }"
16909
16910  # Input might be given as Windows format, start by converting to
16911  # unix format.
16912  new_path="$path"
16913
16914  windows_path="$new_path"
16915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16916    unix_path=`$CYGPATH -u "$windows_path"`
16917    new_path="$unix_path"
16918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16920    new_path="$unix_path"
16921  fi
16922
16923
16924  # Now try to locate executable using which
16925  new_path=`$WHICH "$new_path" 2> /dev/null`
16926
16927  if test "x$new_path" = x; then
16928    # Oops. Which didn't find the executable.
16929    # The splitting of arguments from the executable at a space might have been incorrect,
16930    # since paths with space are more likely in Windows. Give it another try with the whole
16931    # argument.
16932    path="$complete"
16933    arguments="EOL"
16934    new_path="$path"
16935
16936  windows_path="$new_path"
16937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16938    unix_path=`$CYGPATH -u "$windows_path"`
16939    new_path="$unix_path"
16940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16942    new_path="$unix_path"
16943  fi
16944
16945
16946    new_path=`$WHICH "$new_path" 2> /dev/null`
16947    # bat and cmd files are not always considered executable in MSYS causing which
16948    # to not find them
16949    if test "x$new_path" = x \
16950        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16951        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16952      new_path="$path"
16953
16954  windows_path="$new_path"
16955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16956    unix_path=`$CYGPATH -u "$windows_path"`
16957    new_path="$unix_path"
16958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16960    new_path="$unix_path"
16961  fi
16962
16963    fi
16964
16965    if test "x$new_path" = x; then
16966      # It's still not found. Now this is an unrecoverable error.
16967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16968$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16969      has_space=`$ECHO "$complete" | $GREP " "`
16970      if test "x$has_space" != x; then
16971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16973      fi
16974      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16975    fi
16976  fi
16977
16978  # Now new_path has a complete unix path to the binary
16979  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16980    # Keep paths in /bin as-is, but remove trailing .exe if any
16981    new_path="${new_path/%.exe/}"
16982    # Do not save /bin paths to all_fixpath_prefixes!
16983  else
16984    # Not in mixed or Windows style, start by that.
16985    new_path=`cmd //c echo $new_path`
16986
16987  input_path="$new_path"
16988  # Check if we need to convert this using DOS-style short mode. If the path
16989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16990  # take no chances and rewrite it.
16991  # Note: m4 eats our [], so we need to use [ and ] instead.
16992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16993  if test "x$has_forbidden_chars" != x; then
16994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16996  fi
16997
16998    # Output is in $new_path
16999
17000  windows_path="$new_path"
17001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17002    unix_path=`$CYGPATH -u "$windows_path"`
17003    new_path="$unix_path"
17004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17006    new_path="$unix_path"
17007  fi
17008
17009    # remove trailing .exe if any
17010    new_path="${new_path/%.exe/}"
17011
17012    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17013    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17014  fi
17015
17016    else
17017      # We're on a unix platform. Hooray! :)
17018      # First separate the path from the arguments. This will split at the first
17019      # space.
17020      complete="$FOUND_MAKE"
17021      path="${complete%% *}"
17022      tmp="$complete EOL"
17023      arguments="${tmp#* }"
17024
17025      # Cannot rely on the command "which" here since it doesn't always work.
17026      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17027      if test -z "$is_absolute_path"; then
17028        # Path to executable is not absolute. Find it.
17029        IFS_save="$IFS"
17030        IFS=:
17031        for p in $PATH; do
17032          if test -f "$p/$path" && test -x "$p/$path"; then
17033            new_path="$p/$path"
17034            break
17035          fi
17036        done
17037        IFS="$IFS_save"
17038      else
17039        # This is an absolute path, we can use it without further modifications.
17040        new_path="$path"
17041      fi
17042
17043      if test "x$new_path" = x; then
17044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17045$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17046        has_space=`$ECHO "$complete" | $GREP " "`
17047        if test "x$has_space" != x; then
17048          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17049$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17050        fi
17051        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17052      fi
17053    fi
17054
17055    # Now join together the path and the arguments once again
17056    if test "x$arguments" != xEOL; then
17057      new_complete="$new_path ${arguments% *}"
17058    else
17059      new_complete="$new_path"
17060    fi
17061
17062    if test "x$complete" != "x$new_complete"; then
17063      FOUND_MAKE="$new_complete"
17064      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17065$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17066    fi
17067  fi
17068
17069        fi
17070      fi
17071    fi
17072  fi
17073
17074
17075    if test "x$FOUND_MAKE" = x; then
17076      for ac_prog in make
17077do
17078  # Extract the first word of "$ac_prog", so it can be a program name with args.
17079set dummy $ac_prog; ac_word=$2
17080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17081$as_echo_n "checking for $ac_word... " >&6; }
17082if ${ac_cv_path_CHECK_MAKE+:} false; then :
17083  $as_echo_n "(cached) " >&6
17084else
17085  case $CHECK_MAKE in
17086  [\\/]* | ?:[\\/]*)
17087  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17088  ;;
17089  *)
17090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17091for as_dir in $PATH
17092do
17093  IFS=$as_save_IFS
17094  test -z "$as_dir" && as_dir=.
17095    for ac_exec_ext in '' $ac_executable_extensions; do
17096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17097    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17099    break 2
17100  fi
17101done
17102  done
17103IFS=$as_save_IFS
17104
17105  ;;
17106esac
17107fi
17108CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17109if test -n "$CHECK_MAKE"; then
17110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17111$as_echo "$CHECK_MAKE" >&6; }
17112else
17113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17114$as_echo "no" >&6; }
17115fi
17116
17117
17118  test -n "$CHECK_MAKE" && break
17119done
17120
17121
17122  MAKE_CANDIDATE=""$CHECK_MAKE""
17123  DESCRIPTION="make in PATH"
17124
17125  # On Cygwin, we require a newer version of make than on other platforms
17126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17127    MAKE_VERSION_EXPR="-e 4\."
17128    MAKE_REQUIRED_VERSION="4.0"
17129   else
17130    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17131    MAKE_REQUIRED_VERSION="3.81"
17132  fi
17133
17134  if test "x$MAKE_CANDIDATE" != x; then
17135    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17136$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17137    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17138    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17139    if test "x$IS_GNU_MAKE" = x; then
17140      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17141$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17142    else
17143      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17144      if test "x$IS_MODERN_MAKE" = x; then
17145        { $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
17146$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;}
17147      else
17148        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17149          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17150            MAKE_EXPECTED_ENV='cygwin'
17151          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17152            MAKE_EXPECTED_ENV='msys'
17153          else
17154            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17155          fi
17156          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17157          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17158        else
17159          # Not relevant for non-Windows
17160          IS_MAKE_CORRECT_ENV=true
17161        fi
17162        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17163          { $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
17164$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;}
17165        else
17166          FOUND_MAKE=$MAKE_CANDIDATE
17167
17168  # Only process if variable expands to non-empty
17169
17170  if test "x$FOUND_MAKE" != x; then
17171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17172
17173  # First separate the path from the arguments. This will split at the first
17174  # space.
17175  complete="$FOUND_MAKE"
17176  path="${complete%% *}"
17177  tmp="$complete EOL"
17178  arguments="${tmp#* }"
17179
17180  # Input might be given as Windows format, start by converting to
17181  # unix format.
17182  new_path=`$CYGPATH -u "$path"`
17183
17184  # Now try to locate executable using which
17185  new_path=`$WHICH "$new_path" 2> /dev/null`
17186  # bat and cmd files are not always considered executable in cygwin causing which
17187  # to not find them
17188  if test "x$new_path" = x \
17189      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17190      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17191    new_path=`$CYGPATH -u "$path"`
17192  fi
17193  if test "x$new_path" = x; then
17194    # Oops. Which didn't find the executable.
17195    # The splitting of arguments from the executable at a space might have been incorrect,
17196    # since paths with space are more likely in Windows. Give it another try with the whole
17197    # argument.
17198    path="$complete"
17199    arguments="EOL"
17200    new_path=`$CYGPATH -u "$path"`
17201    new_path=`$WHICH "$new_path" 2> /dev/null`
17202    # bat and cmd files are not always considered executable in cygwin causing which
17203    # to not find them
17204    if test "x$new_path" = x \
17205        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17206        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17207      new_path=`$CYGPATH -u "$path"`
17208    fi
17209    if test "x$new_path" = x; then
17210      # It's still not found. Now this is an unrecoverable error.
17211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17213      has_space=`$ECHO "$complete" | $GREP " "`
17214      if test "x$has_space" != x; then
17215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17217      fi
17218      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17219    fi
17220  fi
17221
17222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17225  # "foo.exe" is OK but "foo" is an error.
17226  #
17227  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17228  # It is also a way to make sure we got the proper file name for the real test later on.
17229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17230  if test "x$test_shortpath" = x; then
17231    # Short path failed, file does not exist as specified.
17232    # Try adding .exe or .cmd
17233    if test -f "${new_path}.exe"; then
17234      input_to_shortpath="${new_path}.exe"
17235    elif test -f "${new_path}.cmd"; then
17236      input_to_shortpath="${new_path}.cmd"
17237    else
17238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17239$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17240      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17241$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17242      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17243    fi
17244  else
17245    input_to_shortpath="$new_path"
17246  fi
17247
17248  # Call helper function which possibly converts this using DOS-style short mode.
17249  # If so, the updated path is stored in $new_path.
17250  new_path="$input_to_shortpath"
17251
17252  input_path="$input_to_shortpath"
17253  # Check if we need to convert this using DOS-style short mode. If the path
17254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17255  # take no chances and rewrite it.
17256  # Note: m4 eats our [], so we need to use [ and ] instead.
17257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17258  if test "x$has_forbidden_chars" != x; then
17259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17263      # Going to short mode and back again did indeed matter. Since short mode is
17264      # case insensitive, let's make it lowercase to improve readability.
17265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17266      # Now convert it back to Unix-style (cygpath)
17267      input_path=`$CYGPATH -u "$shortmode_path"`
17268      new_path="$input_path"
17269    fi
17270  fi
17271
17272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17273  if test "x$test_cygdrive_prefix" = x; then
17274    # As a simple fix, exclude /usr/bin since it's not a real path.
17275    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17277      # a path prefixed by /cygdrive for fixpath to work.
17278      new_path="$CYGWIN_ROOT_PATH$input_path"
17279    fi
17280  fi
17281
17282  # remove trailing .exe if any
17283  new_path="${new_path/%.exe/}"
17284
17285    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17286
17287  # First separate the path from the arguments. This will split at the first
17288  # space.
17289  complete="$FOUND_MAKE"
17290  path="${complete%% *}"
17291  tmp="$complete EOL"
17292  arguments="${tmp#* }"
17293
17294  # Input might be given as Windows format, start by converting to
17295  # unix format.
17296  new_path="$path"
17297
17298  windows_path="$new_path"
17299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17300    unix_path=`$CYGPATH -u "$windows_path"`
17301    new_path="$unix_path"
17302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17304    new_path="$unix_path"
17305  fi
17306
17307
17308  # Now try to locate executable using which
17309  new_path=`$WHICH "$new_path" 2> /dev/null`
17310
17311  if test "x$new_path" = x; then
17312    # Oops. Which didn't find the executable.
17313    # The splitting of arguments from the executable at a space might have been incorrect,
17314    # since paths with space are more likely in Windows. Give it another try with the whole
17315    # argument.
17316    path="$complete"
17317    arguments="EOL"
17318    new_path="$path"
17319
17320  windows_path="$new_path"
17321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17322    unix_path=`$CYGPATH -u "$windows_path"`
17323    new_path="$unix_path"
17324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17326    new_path="$unix_path"
17327  fi
17328
17329
17330    new_path=`$WHICH "$new_path" 2> /dev/null`
17331    # bat and cmd files are not always considered executable in MSYS causing which
17332    # to not find them
17333    if test "x$new_path" = x \
17334        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17335        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17336      new_path="$path"
17337
17338  windows_path="$new_path"
17339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17340    unix_path=`$CYGPATH -u "$windows_path"`
17341    new_path="$unix_path"
17342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17344    new_path="$unix_path"
17345  fi
17346
17347    fi
17348
17349    if test "x$new_path" = x; then
17350      # It's still not found. Now this is an unrecoverable error.
17351      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17352$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17353      has_space=`$ECHO "$complete" | $GREP " "`
17354      if test "x$has_space" != x; then
17355        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17356$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17357      fi
17358      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17359    fi
17360  fi
17361
17362  # Now new_path has a complete unix path to the binary
17363  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17364    # Keep paths in /bin as-is, but remove trailing .exe if any
17365    new_path="${new_path/%.exe/}"
17366    # Do not save /bin paths to all_fixpath_prefixes!
17367  else
17368    # Not in mixed or Windows style, start by that.
17369    new_path=`cmd //c echo $new_path`
17370
17371  input_path="$new_path"
17372  # Check if we need to convert this using DOS-style short mode. If the path
17373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17374  # take no chances and rewrite it.
17375  # Note: m4 eats our [], so we need to use [ and ] instead.
17376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17377  if test "x$has_forbidden_chars" != x; then
17378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17380  fi
17381
17382    # Output is in $new_path
17383
17384  windows_path="$new_path"
17385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17386    unix_path=`$CYGPATH -u "$windows_path"`
17387    new_path="$unix_path"
17388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17390    new_path="$unix_path"
17391  fi
17392
17393    # remove trailing .exe if any
17394    new_path="${new_path/%.exe/}"
17395
17396    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17397    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17398  fi
17399
17400    else
17401      # We're on a unix platform. Hooray! :)
17402      # First separate the path from the arguments. This will split at the first
17403      # space.
17404      complete="$FOUND_MAKE"
17405      path="${complete%% *}"
17406      tmp="$complete EOL"
17407      arguments="${tmp#* }"
17408
17409      # Cannot rely on the command "which" here since it doesn't always work.
17410      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17411      if test -z "$is_absolute_path"; then
17412        # Path to executable is not absolute. Find it.
17413        IFS_save="$IFS"
17414        IFS=:
17415        for p in $PATH; do
17416          if test -f "$p/$path" && test -x "$p/$path"; then
17417            new_path="$p/$path"
17418            break
17419          fi
17420        done
17421        IFS="$IFS_save"
17422      else
17423        # This is an absolute path, we can use it without further modifications.
17424        new_path="$path"
17425      fi
17426
17427      if test "x$new_path" = x; then
17428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17429$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17430        has_space=`$ECHO "$complete" | $GREP " "`
17431        if test "x$has_space" != x; then
17432          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17433$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17434        fi
17435        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17436      fi
17437    fi
17438
17439    # Now join together the path and the arguments once again
17440    if test "x$arguments" != xEOL; then
17441      new_complete="$new_path ${arguments% *}"
17442    else
17443      new_complete="$new_path"
17444    fi
17445
17446    if test "x$complete" != "x$new_complete"; then
17447      FOUND_MAKE="$new_complete"
17448      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17449$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17450    fi
17451  fi
17452
17453        fi
17454      fi
17455    fi
17456  fi
17457
17458    fi
17459
17460    if test "x$FOUND_MAKE" = x; then
17461      if test "x$TOOLCHAIN_PATH" != x; then
17462        # We have a toolchain path, check that as well before giving up.
17463        OLD_PATH=$PATH
17464        PATH=$TOOLCHAIN_PATH:$PATH
17465        for ac_prog in gmake
17466do
17467  # Extract the first word of "$ac_prog", so it can be a program name with args.
17468set dummy $ac_prog; ac_word=$2
17469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17470$as_echo_n "checking for $ac_word... " >&6; }
17471if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17472  $as_echo_n "(cached) " >&6
17473else
17474  case $CHECK_TOOLSDIR_GMAKE in
17475  [\\/]* | ?:[\\/]*)
17476  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17477  ;;
17478  *)
17479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17480for as_dir in $PATH
17481do
17482  IFS=$as_save_IFS
17483  test -z "$as_dir" && as_dir=.
17484    for ac_exec_ext in '' $ac_executable_extensions; do
17485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17486    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17488    break 2
17489  fi
17490done
17491  done
17492IFS=$as_save_IFS
17493
17494  ;;
17495esac
17496fi
17497CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17498if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17500$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17501else
17502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17503$as_echo "no" >&6; }
17504fi
17505
17506
17507  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17508done
17509
17510
17511  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17512  DESCRIPTION="gmake in tools-dir"
17513
17514  # On Cygwin, we require a newer version of make than on other platforms
17515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17516    MAKE_VERSION_EXPR="-e 4\."
17517    MAKE_REQUIRED_VERSION="4.0"
17518   else
17519    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17520    MAKE_REQUIRED_VERSION="3.81"
17521  fi
17522
17523  if test "x$MAKE_CANDIDATE" != x; then
17524    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17525$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17526    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17527    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17528    if test "x$IS_GNU_MAKE" = x; then
17529      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17530$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17531    else
17532      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17533      if test "x$IS_MODERN_MAKE" = x; then
17534        { $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
17535$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;}
17536      else
17537        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17538          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17539            MAKE_EXPECTED_ENV='cygwin'
17540          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17541            MAKE_EXPECTED_ENV='msys'
17542          else
17543            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17544          fi
17545          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17546          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17547        else
17548          # Not relevant for non-Windows
17549          IS_MAKE_CORRECT_ENV=true
17550        fi
17551        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17552          { $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
17553$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;}
17554        else
17555          FOUND_MAKE=$MAKE_CANDIDATE
17556
17557  # Only process if variable expands to non-empty
17558
17559  if test "x$FOUND_MAKE" != x; then
17560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17561
17562  # First separate the path from the arguments. This will split at the first
17563  # space.
17564  complete="$FOUND_MAKE"
17565  path="${complete%% *}"
17566  tmp="$complete EOL"
17567  arguments="${tmp#* }"
17568
17569  # Input might be given as Windows format, start by converting to
17570  # unix format.
17571  new_path=`$CYGPATH -u "$path"`
17572
17573  # Now try to locate executable using which
17574  new_path=`$WHICH "$new_path" 2> /dev/null`
17575  # bat and cmd files are not always considered executable in cygwin causing which
17576  # to not find them
17577  if test "x$new_path" = x \
17578      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17579      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17580    new_path=`$CYGPATH -u "$path"`
17581  fi
17582  if test "x$new_path" = x; then
17583    # Oops. Which didn't find the executable.
17584    # The splitting of arguments from the executable at a space might have been incorrect,
17585    # since paths with space are more likely in Windows. Give it another try with the whole
17586    # argument.
17587    path="$complete"
17588    arguments="EOL"
17589    new_path=`$CYGPATH -u "$path"`
17590    new_path=`$WHICH "$new_path" 2> /dev/null`
17591    # bat and cmd files are not always considered executable in cygwin causing which
17592    # to not find them
17593    if test "x$new_path" = x \
17594        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17595        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17596      new_path=`$CYGPATH -u "$path"`
17597    fi
17598    if test "x$new_path" = x; then
17599      # It's still not found. Now this is an unrecoverable error.
17600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17601$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17602      has_space=`$ECHO "$complete" | $GREP " "`
17603      if test "x$has_space" != x; then
17604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17606      fi
17607      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17608    fi
17609  fi
17610
17611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17614  # "foo.exe" is OK but "foo" is an error.
17615  #
17616  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17617  # It is also a way to make sure we got the proper file name for the real test later on.
17618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17619  if test "x$test_shortpath" = x; then
17620    # Short path failed, file does not exist as specified.
17621    # Try adding .exe or .cmd
17622    if test -f "${new_path}.exe"; then
17623      input_to_shortpath="${new_path}.exe"
17624    elif test -f "${new_path}.cmd"; then
17625      input_to_shortpath="${new_path}.cmd"
17626    else
17627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17628$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17629      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17630$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17631      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17632    fi
17633  else
17634    input_to_shortpath="$new_path"
17635  fi
17636
17637  # Call helper function which possibly converts this using DOS-style short mode.
17638  # If so, the updated path is stored in $new_path.
17639  new_path="$input_to_shortpath"
17640
17641  input_path="$input_to_shortpath"
17642  # Check if we need to convert this using DOS-style short mode. If the path
17643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17644  # take no chances and rewrite it.
17645  # Note: m4 eats our [], so we need to use [ and ] instead.
17646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17647  if test "x$has_forbidden_chars" != x; then
17648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17652      # Going to short mode and back again did indeed matter. Since short mode is
17653      # case insensitive, let's make it lowercase to improve readability.
17654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17655      # Now convert it back to Unix-style (cygpath)
17656      input_path=`$CYGPATH -u "$shortmode_path"`
17657      new_path="$input_path"
17658    fi
17659  fi
17660
17661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17662  if test "x$test_cygdrive_prefix" = x; then
17663    # As a simple fix, exclude /usr/bin since it's not a real path.
17664    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17666      # a path prefixed by /cygdrive for fixpath to work.
17667      new_path="$CYGWIN_ROOT_PATH$input_path"
17668    fi
17669  fi
17670
17671  # remove trailing .exe if any
17672  new_path="${new_path/%.exe/}"
17673
17674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17675
17676  # First separate the path from the arguments. This will split at the first
17677  # space.
17678  complete="$FOUND_MAKE"
17679  path="${complete%% *}"
17680  tmp="$complete EOL"
17681  arguments="${tmp#* }"
17682
17683  # Input might be given as Windows format, start by converting to
17684  # unix format.
17685  new_path="$path"
17686
17687  windows_path="$new_path"
17688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17689    unix_path=`$CYGPATH -u "$windows_path"`
17690    new_path="$unix_path"
17691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17693    new_path="$unix_path"
17694  fi
17695
17696
17697  # Now try to locate executable using which
17698  new_path=`$WHICH "$new_path" 2> /dev/null`
17699
17700  if test "x$new_path" = x; then
17701    # Oops. Which didn't find the executable.
17702    # The splitting of arguments from the executable at a space might have been incorrect,
17703    # since paths with space are more likely in Windows. Give it another try with the whole
17704    # argument.
17705    path="$complete"
17706    arguments="EOL"
17707    new_path="$path"
17708
17709  windows_path="$new_path"
17710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17711    unix_path=`$CYGPATH -u "$windows_path"`
17712    new_path="$unix_path"
17713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17715    new_path="$unix_path"
17716  fi
17717
17718
17719    new_path=`$WHICH "$new_path" 2> /dev/null`
17720    # bat and cmd files are not always considered executable in MSYS causing which
17721    # to not find them
17722    if test "x$new_path" = x \
17723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17725      new_path="$path"
17726
17727  windows_path="$new_path"
17728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17729    unix_path=`$CYGPATH -u "$windows_path"`
17730    new_path="$unix_path"
17731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17733    new_path="$unix_path"
17734  fi
17735
17736    fi
17737
17738    if test "x$new_path" = x; then
17739      # It's still not found. Now this is an unrecoverable error.
17740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17741$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17742      has_space=`$ECHO "$complete" | $GREP " "`
17743      if test "x$has_space" != x; then
17744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17746      fi
17747      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17748    fi
17749  fi
17750
17751  # Now new_path has a complete unix path to the binary
17752  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17753    # Keep paths in /bin as-is, but remove trailing .exe if any
17754    new_path="${new_path/%.exe/}"
17755    # Do not save /bin paths to all_fixpath_prefixes!
17756  else
17757    # Not in mixed or Windows style, start by that.
17758    new_path=`cmd //c echo $new_path`
17759
17760  input_path="$new_path"
17761  # Check if we need to convert this using DOS-style short mode. If the path
17762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17763  # take no chances and rewrite it.
17764  # Note: m4 eats our [], so we need to use [ and ] instead.
17765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17766  if test "x$has_forbidden_chars" != x; then
17767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17769  fi
17770
17771    # Output is in $new_path
17772
17773  windows_path="$new_path"
17774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17775    unix_path=`$CYGPATH -u "$windows_path"`
17776    new_path="$unix_path"
17777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17779    new_path="$unix_path"
17780  fi
17781
17782    # remove trailing .exe if any
17783    new_path="${new_path/%.exe/}"
17784
17785    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17786    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17787  fi
17788
17789    else
17790      # We're on a unix platform. Hooray! :)
17791      # First separate the path from the arguments. This will split at the first
17792      # space.
17793      complete="$FOUND_MAKE"
17794      path="${complete%% *}"
17795      tmp="$complete EOL"
17796      arguments="${tmp#* }"
17797
17798      # Cannot rely on the command "which" here since it doesn't always work.
17799      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17800      if test -z "$is_absolute_path"; then
17801        # Path to executable is not absolute. Find it.
17802        IFS_save="$IFS"
17803        IFS=:
17804        for p in $PATH; do
17805          if test -f "$p/$path" && test -x "$p/$path"; then
17806            new_path="$p/$path"
17807            break
17808          fi
17809        done
17810        IFS="$IFS_save"
17811      else
17812        # This is an absolute path, we can use it without further modifications.
17813        new_path="$path"
17814      fi
17815
17816      if test "x$new_path" = x; then
17817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17818$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17819        has_space=`$ECHO "$complete" | $GREP " "`
17820        if test "x$has_space" != x; then
17821          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17822$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17823        fi
17824        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17825      fi
17826    fi
17827
17828    # Now join together the path and the arguments once again
17829    if test "x$arguments" != xEOL; then
17830      new_complete="$new_path ${arguments% *}"
17831    else
17832      new_complete="$new_path"
17833    fi
17834
17835    if test "x$complete" != "x$new_complete"; then
17836      FOUND_MAKE="$new_complete"
17837      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17838$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17839    fi
17840  fi
17841
17842        fi
17843      fi
17844    fi
17845  fi
17846
17847        if test "x$FOUND_MAKE" = x; then
17848          for ac_prog in make
17849do
17850  # Extract the first word of "$ac_prog", so it can be a program name with args.
17851set dummy $ac_prog; ac_word=$2
17852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17853$as_echo_n "checking for $ac_word... " >&6; }
17854if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17855  $as_echo_n "(cached) " >&6
17856else
17857  case $CHECK_TOOLSDIR_MAKE in
17858  [\\/]* | ?:[\\/]*)
17859  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17860  ;;
17861  *)
17862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17863for as_dir in $PATH
17864do
17865  IFS=$as_save_IFS
17866  test -z "$as_dir" && as_dir=.
17867    for ac_exec_ext in '' $ac_executable_extensions; do
17868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17869    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17871    break 2
17872  fi
17873done
17874  done
17875IFS=$as_save_IFS
17876
17877  ;;
17878esac
17879fi
17880CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17881if test -n "$CHECK_TOOLSDIR_MAKE"; then
17882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17883$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17884else
17885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17886$as_echo "no" >&6; }
17887fi
17888
17889
17890  test -n "$CHECK_TOOLSDIR_MAKE" && break
17891done
17892
17893
17894  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17895  DESCRIPTION="make in tools-dir"
17896
17897  # On Cygwin, we require a newer version of make than on other platforms
17898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17899    MAKE_VERSION_EXPR="-e 4\."
17900    MAKE_REQUIRED_VERSION="4.0"
17901   else
17902    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17903    MAKE_REQUIRED_VERSION="3.81"
17904  fi
17905
17906  if test "x$MAKE_CANDIDATE" != x; then
17907    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17908$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17909    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17910    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17911    if test "x$IS_GNU_MAKE" = x; then
17912      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17913$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17914    else
17915      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17916      if test "x$IS_MODERN_MAKE" = x; then
17917        { $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
17918$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;}
17919      else
17920        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17921          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17922            MAKE_EXPECTED_ENV='cygwin'
17923          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17924            MAKE_EXPECTED_ENV='msys'
17925          else
17926            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17927          fi
17928          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17929          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17930        else
17931          # Not relevant for non-Windows
17932          IS_MAKE_CORRECT_ENV=true
17933        fi
17934        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17935          { $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
17936$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;}
17937        else
17938          FOUND_MAKE=$MAKE_CANDIDATE
17939
17940  # Only process if variable expands to non-empty
17941
17942  if test "x$FOUND_MAKE" != x; then
17943    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17944
17945  # First separate the path from the arguments. This will split at the first
17946  # space.
17947  complete="$FOUND_MAKE"
17948  path="${complete%% *}"
17949  tmp="$complete EOL"
17950  arguments="${tmp#* }"
17951
17952  # Input might be given as Windows format, start by converting to
17953  # unix format.
17954  new_path=`$CYGPATH -u "$path"`
17955
17956  # Now try to locate executable using which
17957  new_path=`$WHICH "$new_path" 2> /dev/null`
17958  # bat and cmd files are not always considered executable in cygwin causing which
17959  # to not find them
17960  if test "x$new_path" = x \
17961      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17962      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17963    new_path=`$CYGPATH -u "$path"`
17964  fi
17965  if test "x$new_path" = x; then
17966    # Oops. Which didn't find the executable.
17967    # The splitting of arguments from the executable at a space might have been incorrect,
17968    # since paths with space are more likely in Windows. Give it another try with the whole
17969    # argument.
17970    path="$complete"
17971    arguments="EOL"
17972    new_path=`$CYGPATH -u "$path"`
17973    new_path=`$WHICH "$new_path" 2> /dev/null`
17974    # bat and cmd files are not always considered executable in cygwin causing which
17975    # to not find them
17976    if test "x$new_path" = x \
17977        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17978        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17979      new_path=`$CYGPATH -u "$path"`
17980    fi
17981    if test "x$new_path" = x; then
17982      # It's still not found. Now this is an unrecoverable error.
17983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17984$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17985      has_space=`$ECHO "$complete" | $GREP " "`
17986      if test "x$has_space" != x; then
17987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17989      fi
17990      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17991    fi
17992  fi
17993
17994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17997  # "foo.exe" is OK but "foo" is an error.
17998  #
17999  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18000  # It is also a way to make sure we got the proper file name for the real test later on.
18001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18002  if test "x$test_shortpath" = x; then
18003    # Short path failed, file does not exist as specified.
18004    # Try adding .exe or .cmd
18005    if test -f "${new_path}.exe"; then
18006      input_to_shortpath="${new_path}.exe"
18007    elif test -f "${new_path}.cmd"; then
18008      input_to_shortpath="${new_path}.cmd"
18009    else
18010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18011$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18012      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18013$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18014      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18015    fi
18016  else
18017    input_to_shortpath="$new_path"
18018  fi
18019
18020  # Call helper function which possibly converts this using DOS-style short mode.
18021  # If so, the updated path is stored in $new_path.
18022  new_path="$input_to_shortpath"
18023
18024  input_path="$input_to_shortpath"
18025  # Check if we need to convert this using DOS-style short mode. If the path
18026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18027  # take no chances and rewrite it.
18028  # Note: m4 eats our [], so we need to use [ and ] instead.
18029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18030  if test "x$has_forbidden_chars" != x; then
18031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18035      # Going to short mode and back again did indeed matter. Since short mode is
18036      # case insensitive, let's make it lowercase to improve readability.
18037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18038      # Now convert it back to Unix-style (cygpath)
18039      input_path=`$CYGPATH -u "$shortmode_path"`
18040      new_path="$input_path"
18041    fi
18042  fi
18043
18044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18045  if test "x$test_cygdrive_prefix" = x; then
18046    # As a simple fix, exclude /usr/bin since it's not a real path.
18047    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18049      # a path prefixed by /cygdrive for fixpath to work.
18050      new_path="$CYGWIN_ROOT_PATH$input_path"
18051    fi
18052  fi
18053
18054  # remove trailing .exe if any
18055  new_path="${new_path/%.exe/}"
18056
18057    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18058
18059  # First separate the path from the arguments. This will split at the first
18060  # space.
18061  complete="$FOUND_MAKE"
18062  path="${complete%% *}"
18063  tmp="$complete EOL"
18064  arguments="${tmp#* }"
18065
18066  # Input might be given as Windows format, start by converting to
18067  # unix format.
18068  new_path="$path"
18069
18070  windows_path="$new_path"
18071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18072    unix_path=`$CYGPATH -u "$windows_path"`
18073    new_path="$unix_path"
18074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18076    new_path="$unix_path"
18077  fi
18078
18079
18080  # Now try to locate executable using which
18081  new_path=`$WHICH "$new_path" 2> /dev/null`
18082
18083  if test "x$new_path" = x; then
18084    # Oops. Which didn't find the executable.
18085    # The splitting of arguments from the executable at a space might have been incorrect,
18086    # since paths with space are more likely in Windows. Give it another try with the whole
18087    # argument.
18088    path="$complete"
18089    arguments="EOL"
18090    new_path="$path"
18091
18092  windows_path="$new_path"
18093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18094    unix_path=`$CYGPATH -u "$windows_path"`
18095    new_path="$unix_path"
18096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18098    new_path="$unix_path"
18099  fi
18100
18101
18102    new_path=`$WHICH "$new_path" 2> /dev/null`
18103    # bat and cmd files are not always considered executable in MSYS causing which
18104    # to not find them
18105    if test "x$new_path" = x \
18106        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18107        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18108      new_path="$path"
18109
18110  windows_path="$new_path"
18111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18112    unix_path=`$CYGPATH -u "$windows_path"`
18113    new_path="$unix_path"
18114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18116    new_path="$unix_path"
18117  fi
18118
18119    fi
18120
18121    if test "x$new_path" = x; then
18122      # It's still not found. Now this is an unrecoverable error.
18123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18124$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18125      has_space=`$ECHO "$complete" | $GREP " "`
18126      if test "x$has_space" != x; then
18127        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18128$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18129      fi
18130      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18131    fi
18132  fi
18133
18134  # Now new_path has a complete unix path to the binary
18135  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18136    # Keep paths in /bin as-is, but remove trailing .exe if any
18137    new_path="${new_path/%.exe/}"
18138    # Do not save /bin paths to all_fixpath_prefixes!
18139  else
18140    # Not in mixed or Windows style, start by that.
18141    new_path=`cmd //c echo $new_path`
18142
18143  input_path="$new_path"
18144  # Check if we need to convert this using DOS-style short mode. If the path
18145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18146  # take no chances and rewrite it.
18147  # Note: m4 eats our [], so we need to use [ and ] instead.
18148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18149  if test "x$has_forbidden_chars" != x; then
18150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18152  fi
18153
18154    # Output is in $new_path
18155
18156  windows_path="$new_path"
18157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18158    unix_path=`$CYGPATH -u "$windows_path"`
18159    new_path="$unix_path"
18160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18162    new_path="$unix_path"
18163  fi
18164
18165    # remove trailing .exe if any
18166    new_path="${new_path/%.exe/}"
18167
18168    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18169    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18170  fi
18171
18172    else
18173      # We're on a unix platform. Hooray! :)
18174      # First separate the path from the arguments. This will split at the first
18175      # space.
18176      complete="$FOUND_MAKE"
18177      path="${complete%% *}"
18178      tmp="$complete EOL"
18179      arguments="${tmp#* }"
18180
18181      # Cannot rely on the command "which" here since it doesn't always work.
18182      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18183      if test -z "$is_absolute_path"; then
18184        # Path to executable is not absolute. Find it.
18185        IFS_save="$IFS"
18186        IFS=:
18187        for p in $PATH; do
18188          if test -f "$p/$path" && test -x "$p/$path"; then
18189            new_path="$p/$path"
18190            break
18191          fi
18192        done
18193        IFS="$IFS_save"
18194      else
18195        # This is an absolute path, we can use it without further modifications.
18196        new_path="$path"
18197      fi
18198
18199      if test "x$new_path" = x; then
18200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18201$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18202        has_space=`$ECHO "$complete" | $GREP " "`
18203        if test "x$has_space" != x; then
18204          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18205$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18206        fi
18207        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18208      fi
18209    fi
18210
18211    # Now join together the path and the arguments once again
18212    if test "x$arguments" != xEOL; then
18213      new_complete="$new_path ${arguments% *}"
18214    else
18215      new_complete="$new_path"
18216    fi
18217
18218    if test "x$complete" != "x$new_complete"; then
18219      FOUND_MAKE="$new_complete"
18220      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18221$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18222    fi
18223  fi
18224
18225        fi
18226      fi
18227    fi
18228  fi
18229
18230        fi
18231        PATH=$OLD_PATH
18232      fi
18233    fi
18234
18235    if test "x$FOUND_MAKE" = x; then
18236      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
18237    fi
18238
18239  else
18240    # The variable is set, but is it from the command line or the environment?
18241
18242    # Try to remove the string !MAKE! from our list.
18243    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18244    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18245      # If it failed, the variable was not from the command line. Ignore it,
18246      # but warn the user (except for BASH, which is always set by the calling BASH).
18247      if test "xMAKE" != xBASH; then
18248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18249$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18250      fi
18251      # Try to locate tool using the code snippet
18252
18253    # Try our hardest to locate a correct version of GNU make
18254    for ac_prog in gmake
18255do
18256  # Extract the first word of "$ac_prog", so it can be a program name with args.
18257set dummy $ac_prog; ac_word=$2
18258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18259$as_echo_n "checking for $ac_word... " >&6; }
18260if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18261  $as_echo_n "(cached) " >&6
18262else
18263  case $CHECK_GMAKE in
18264  [\\/]* | ?:[\\/]*)
18265  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18266  ;;
18267  *)
18268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18269for as_dir in $PATH
18270do
18271  IFS=$as_save_IFS
18272  test -z "$as_dir" && as_dir=.
18273    for ac_exec_ext in '' $ac_executable_extensions; do
18274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18275    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18277    break 2
18278  fi
18279done
18280  done
18281IFS=$as_save_IFS
18282
18283  ;;
18284esac
18285fi
18286CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18287if test -n "$CHECK_GMAKE"; then
18288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18289$as_echo "$CHECK_GMAKE" >&6; }
18290else
18291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18292$as_echo "no" >&6; }
18293fi
18294
18295
18296  test -n "$CHECK_GMAKE" && break
18297done
18298
18299
18300  MAKE_CANDIDATE=""$CHECK_GMAKE""
18301  DESCRIPTION="gmake in PATH"
18302
18303  # On Cygwin, we require a newer version of make than on other platforms
18304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18305    MAKE_VERSION_EXPR="-e 4\."
18306    MAKE_REQUIRED_VERSION="4.0"
18307   else
18308    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18309    MAKE_REQUIRED_VERSION="3.81"
18310  fi
18311
18312  if test "x$MAKE_CANDIDATE" != x; then
18313    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18314$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18315    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18316    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18317    if test "x$IS_GNU_MAKE" = x; then
18318      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18319$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18320    else
18321      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18322      if test "x$IS_MODERN_MAKE" = x; then
18323        { $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
18324$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;}
18325      else
18326        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18327          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18328            MAKE_EXPECTED_ENV='cygwin'
18329          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18330            MAKE_EXPECTED_ENV='msys'
18331          else
18332            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18333          fi
18334          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18335          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18336        else
18337          # Not relevant for non-Windows
18338          IS_MAKE_CORRECT_ENV=true
18339        fi
18340        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18341          { $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
18342$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;}
18343        else
18344          FOUND_MAKE=$MAKE_CANDIDATE
18345
18346  # Only process if variable expands to non-empty
18347
18348  if test "x$FOUND_MAKE" != x; then
18349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18350
18351  # First separate the path from the arguments. This will split at the first
18352  # space.
18353  complete="$FOUND_MAKE"
18354  path="${complete%% *}"
18355  tmp="$complete EOL"
18356  arguments="${tmp#* }"
18357
18358  # Input might be given as Windows format, start by converting to
18359  # unix format.
18360  new_path=`$CYGPATH -u "$path"`
18361
18362  # Now try to locate executable using which
18363  new_path=`$WHICH "$new_path" 2> /dev/null`
18364  # bat and cmd files are not always considered executable in cygwin causing which
18365  # to not find them
18366  if test "x$new_path" = x \
18367      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18368      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18369    new_path=`$CYGPATH -u "$path"`
18370  fi
18371  if test "x$new_path" = x; then
18372    # Oops. Which didn't find the executable.
18373    # The splitting of arguments from the executable at a space might have been incorrect,
18374    # since paths with space are more likely in Windows. Give it another try with the whole
18375    # argument.
18376    path="$complete"
18377    arguments="EOL"
18378    new_path=`$CYGPATH -u "$path"`
18379    new_path=`$WHICH "$new_path" 2> /dev/null`
18380    # bat and cmd files are not always considered executable in cygwin causing which
18381    # to not find them
18382    if test "x$new_path" = x \
18383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18385      new_path=`$CYGPATH -u "$path"`
18386    fi
18387    if test "x$new_path" = x; then
18388      # It's still not found. Now this is an unrecoverable error.
18389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18390$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18391      has_space=`$ECHO "$complete" | $GREP " "`
18392      if test "x$has_space" != x; then
18393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18395      fi
18396      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18397    fi
18398  fi
18399
18400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18403  # "foo.exe" is OK but "foo" is an error.
18404  #
18405  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18406  # It is also a way to make sure we got the proper file name for the real test later on.
18407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18408  if test "x$test_shortpath" = x; then
18409    # Short path failed, file does not exist as specified.
18410    # Try adding .exe or .cmd
18411    if test -f "${new_path}.exe"; then
18412      input_to_shortpath="${new_path}.exe"
18413    elif test -f "${new_path}.cmd"; then
18414      input_to_shortpath="${new_path}.cmd"
18415    else
18416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18417$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18418      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18419$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18420      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18421    fi
18422  else
18423    input_to_shortpath="$new_path"
18424  fi
18425
18426  # Call helper function which possibly converts this using DOS-style short mode.
18427  # If so, the updated path is stored in $new_path.
18428  new_path="$input_to_shortpath"
18429
18430  input_path="$input_to_shortpath"
18431  # Check if we need to convert this using DOS-style short mode. If the path
18432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18433  # take no chances and rewrite it.
18434  # Note: m4 eats our [], so we need to use [ and ] instead.
18435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18436  if test "x$has_forbidden_chars" != x; then
18437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18441      # Going to short mode and back again did indeed matter. Since short mode is
18442      # case insensitive, let's make it lowercase to improve readability.
18443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18444      # Now convert it back to Unix-style (cygpath)
18445      input_path=`$CYGPATH -u "$shortmode_path"`
18446      new_path="$input_path"
18447    fi
18448  fi
18449
18450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18451  if test "x$test_cygdrive_prefix" = x; then
18452    # As a simple fix, exclude /usr/bin since it's not a real path.
18453    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18455      # a path prefixed by /cygdrive for fixpath to work.
18456      new_path="$CYGWIN_ROOT_PATH$input_path"
18457    fi
18458  fi
18459
18460  # remove trailing .exe if any
18461  new_path="${new_path/%.exe/}"
18462
18463    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18464
18465  # First separate the path from the arguments. This will split at the first
18466  # space.
18467  complete="$FOUND_MAKE"
18468  path="${complete%% *}"
18469  tmp="$complete EOL"
18470  arguments="${tmp#* }"
18471
18472  # Input might be given as Windows format, start by converting to
18473  # unix format.
18474  new_path="$path"
18475
18476  windows_path="$new_path"
18477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18478    unix_path=`$CYGPATH -u "$windows_path"`
18479    new_path="$unix_path"
18480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18482    new_path="$unix_path"
18483  fi
18484
18485
18486  # Now try to locate executable using which
18487  new_path=`$WHICH "$new_path" 2> /dev/null`
18488
18489  if test "x$new_path" = x; then
18490    # Oops. Which didn't find the executable.
18491    # The splitting of arguments from the executable at a space might have been incorrect,
18492    # since paths with space are more likely in Windows. Give it another try with the whole
18493    # argument.
18494    path="$complete"
18495    arguments="EOL"
18496    new_path="$path"
18497
18498  windows_path="$new_path"
18499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18500    unix_path=`$CYGPATH -u "$windows_path"`
18501    new_path="$unix_path"
18502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18504    new_path="$unix_path"
18505  fi
18506
18507
18508    new_path=`$WHICH "$new_path" 2> /dev/null`
18509    # bat and cmd files are not always considered executable in MSYS causing which
18510    # to not find them
18511    if test "x$new_path" = x \
18512        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18513        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18514      new_path="$path"
18515
18516  windows_path="$new_path"
18517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18518    unix_path=`$CYGPATH -u "$windows_path"`
18519    new_path="$unix_path"
18520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18522    new_path="$unix_path"
18523  fi
18524
18525    fi
18526
18527    if test "x$new_path" = x; then
18528      # It's still not found. Now this is an unrecoverable error.
18529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18530$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18531      has_space=`$ECHO "$complete" | $GREP " "`
18532      if test "x$has_space" != x; then
18533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18535      fi
18536      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18537    fi
18538  fi
18539
18540  # Now new_path has a complete unix path to the binary
18541  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18542    # Keep paths in /bin as-is, but remove trailing .exe if any
18543    new_path="${new_path/%.exe/}"
18544    # Do not save /bin paths to all_fixpath_prefixes!
18545  else
18546    # Not in mixed or Windows style, start by that.
18547    new_path=`cmd //c echo $new_path`
18548
18549  input_path="$new_path"
18550  # Check if we need to convert this using DOS-style short mode. If the path
18551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18552  # take no chances and rewrite it.
18553  # Note: m4 eats our [], so we need to use [ and ] instead.
18554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18555  if test "x$has_forbidden_chars" != x; then
18556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18558  fi
18559
18560    # Output is in $new_path
18561
18562  windows_path="$new_path"
18563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18564    unix_path=`$CYGPATH -u "$windows_path"`
18565    new_path="$unix_path"
18566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18568    new_path="$unix_path"
18569  fi
18570
18571    # remove trailing .exe if any
18572    new_path="${new_path/%.exe/}"
18573
18574    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18575    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18576  fi
18577
18578    else
18579      # We're on a unix platform. Hooray! :)
18580      # First separate the path from the arguments. This will split at the first
18581      # space.
18582      complete="$FOUND_MAKE"
18583      path="${complete%% *}"
18584      tmp="$complete EOL"
18585      arguments="${tmp#* }"
18586
18587      # Cannot rely on the command "which" here since it doesn't always work.
18588      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18589      if test -z "$is_absolute_path"; then
18590        # Path to executable is not absolute. Find it.
18591        IFS_save="$IFS"
18592        IFS=:
18593        for p in $PATH; do
18594          if test -f "$p/$path" && test -x "$p/$path"; then
18595            new_path="$p/$path"
18596            break
18597          fi
18598        done
18599        IFS="$IFS_save"
18600      else
18601        # This is an absolute path, we can use it without further modifications.
18602        new_path="$path"
18603      fi
18604
18605      if test "x$new_path" = x; then
18606        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18607$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18608        has_space=`$ECHO "$complete" | $GREP " "`
18609        if test "x$has_space" != x; then
18610          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18611$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18612        fi
18613        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18614      fi
18615    fi
18616
18617    # Now join together the path and the arguments once again
18618    if test "x$arguments" != xEOL; then
18619      new_complete="$new_path ${arguments% *}"
18620    else
18621      new_complete="$new_path"
18622    fi
18623
18624    if test "x$complete" != "x$new_complete"; then
18625      FOUND_MAKE="$new_complete"
18626      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18627$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18628    fi
18629  fi
18630
18631        fi
18632      fi
18633    fi
18634  fi
18635
18636
18637    if test "x$FOUND_MAKE" = x; then
18638      for ac_prog in make
18639do
18640  # Extract the first word of "$ac_prog", so it can be a program name with args.
18641set dummy $ac_prog; ac_word=$2
18642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18643$as_echo_n "checking for $ac_word... " >&6; }
18644if ${ac_cv_path_CHECK_MAKE+:} false; then :
18645  $as_echo_n "(cached) " >&6
18646else
18647  case $CHECK_MAKE in
18648  [\\/]* | ?:[\\/]*)
18649  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18650  ;;
18651  *)
18652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18653for as_dir in $PATH
18654do
18655  IFS=$as_save_IFS
18656  test -z "$as_dir" && as_dir=.
18657    for ac_exec_ext in '' $ac_executable_extensions; do
18658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18659    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18661    break 2
18662  fi
18663done
18664  done
18665IFS=$as_save_IFS
18666
18667  ;;
18668esac
18669fi
18670CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18671if test -n "$CHECK_MAKE"; then
18672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18673$as_echo "$CHECK_MAKE" >&6; }
18674else
18675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18676$as_echo "no" >&6; }
18677fi
18678
18679
18680  test -n "$CHECK_MAKE" && break
18681done
18682
18683
18684  MAKE_CANDIDATE=""$CHECK_MAKE""
18685  DESCRIPTION="make in PATH"
18686
18687  # On Cygwin, we require a newer version of make than on other platforms
18688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18689    MAKE_VERSION_EXPR="-e 4\."
18690    MAKE_REQUIRED_VERSION="4.0"
18691   else
18692    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18693    MAKE_REQUIRED_VERSION="3.81"
18694  fi
18695
18696  if test "x$MAKE_CANDIDATE" != x; then
18697    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18698$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18699    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18700    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18701    if test "x$IS_GNU_MAKE" = x; then
18702      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18703$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18704    else
18705      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18706      if test "x$IS_MODERN_MAKE" = x; then
18707        { $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
18708$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;}
18709      else
18710        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18711          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18712            MAKE_EXPECTED_ENV='cygwin'
18713          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18714            MAKE_EXPECTED_ENV='msys'
18715          else
18716            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18717          fi
18718          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18719          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18720        else
18721          # Not relevant for non-Windows
18722          IS_MAKE_CORRECT_ENV=true
18723        fi
18724        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18725          { $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
18726$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;}
18727        else
18728          FOUND_MAKE=$MAKE_CANDIDATE
18729
18730  # Only process if variable expands to non-empty
18731
18732  if test "x$FOUND_MAKE" != x; then
18733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18734
18735  # First separate the path from the arguments. This will split at the first
18736  # space.
18737  complete="$FOUND_MAKE"
18738  path="${complete%% *}"
18739  tmp="$complete EOL"
18740  arguments="${tmp#* }"
18741
18742  # Input might be given as Windows format, start by converting to
18743  # unix format.
18744  new_path=`$CYGPATH -u "$path"`
18745
18746  # Now try to locate executable using which
18747  new_path=`$WHICH "$new_path" 2> /dev/null`
18748  # bat and cmd files are not always considered executable in cygwin causing which
18749  # to not find them
18750  if test "x$new_path" = x \
18751      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18752      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18753    new_path=`$CYGPATH -u "$path"`
18754  fi
18755  if test "x$new_path" = x; then
18756    # Oops. Which didn't find the executable.
18757    # The splitting of arguments from the executable at a space might have been incorrect,
18758    # since paths with space are more likely in Windows. Give it another try with the whole
18759    # argument.
18760    path="$complete"
18761    arguments="EOL"
18762    new_path=`$CYGPATH -u "$path"`
18763    new_path=`$WHICH "$new_path" 2> /dev/null`
18764    # bat and cmd files are not always considered executable in cygwin causing which
18765    # to not find them
18766    if test "x$new_path" = x \
18767        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18768        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18769      new_path=`$CYGPATH -u "$path"`
18770    fi
18771    if test "x$new_path" = x; then
18772      # It's still not found. Now this is an unrecoverable error.
18773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18774$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18775      has_space=`$ECHO "$complete" | $GREP " "`
18776      if test "x$has_space" != x; then
18777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18779      fi
18780      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18781    fi
18782  fi
18783
18784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18787  # "foo.exe" is OK but "foo" is an error.
18788  #
18789  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18790  # It is also a way to make sure we got the proper file name for the real test later on.
18791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18792  if test "x$test_shortpath" = x; then
18793    # Short path failed, file does not exist as specified.
18794    # Try adding .exe or .cmd
18795    if test -f "${new_path}.exe"; then
18796      input_to_shortpath="${new_path}.exe"
18797    elif test -f "${new_path}.cmd"; then
18798      input_to_shortpath="${new_path}.cmd"
18799    else
18800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18801$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18802      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18803$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18804      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18805    fi
18806  else
18807    input_to_shortpath="$new_path"
18808  fi
18809
18810  # Call helper function which possibly converts this using DOS-style short mode.
18811  # If so, the updated path is stored in $new_path.
18812  new_path="$input_to_shortpath"
18813
18814  input_path="$input_to_shortpath"
18815  # Check if we need to convert this using DOS-style short mode. If the path
18816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18817  # take no chances and rewrite it.
18818  # Note: m4 eats our [], so we need to use [ and ] instead.
18819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18820  if test "x$has_forbidden_chars" != x; then
18821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18825      # Going to short mode and back again did indeed matter. Since short mode is
18826      # case insensitive, let's make it lowercase to improve readability.
18827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18828      # Now convert it back to Unix-style (cygpath)
18829      input_path=`$CYGPATH -u "$shortmode_path"`
18830      new_path="$input_path"
18831    fi
18832  fi
18833
18834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18835  if test "x$test_cygdrive_prefix" = x; then
18836    # As a simple fix, exclude /usr/bin since it's not a real path.
18837    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18839      # a path prefixed by /cygdrive for fixpath to work.
18840      new_path="$CYGWIN_ROOT_PATH$input_path"
18841    fi
18842  fi
18843
18844  # remove trailing .exe if any
18845  new_path="${new_path/%.exe/}"
18846
18847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18848
18849  # First separate the path from the arguments. This will split at the first
18850  # space.
18851  complete="$FOUND_MAKE"
18852  path="${complete%% *}"
18853  tmp="$complete EOL"
18854  arguments="${tmp#* }"
18855
18856  # Input might be given as Windows format, start by converting to
18857  # unix format.
18858  new_path="$path"
18859
18860  windows_path="$new_path"
18861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18862    unix_path=`$CYGPATH -u "$windows_path"`
18863    new_path="$unix_path"
18864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18866    new_path="$unix_path"
18867  fi
18868
18869
18870  # Now try to locate executable using which
18871  new_path=`$WHICH "$new_path" 2> /dev/null`
18872
18873  if test "x$new_path" = x; then
18874    # Oops. Which didn't find the executable.
18875    # The splitting of arguments from the executable at a space might have been incorrect,
18876    # since paths with space are more likely in Windows. Give it another try with the whole
18877    # argument.
18878    path="$complete"
18879    arguments="EOL"
18880    new_path="$path"
18881
18882  windows_path="$new_path"
18883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18884    unix_path=`$CYGPATH -u "$windows_path"`
18885    new_path="$unix_path"
18886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18888    new_path="$unix_path"
18889  fi
18890
18891
18892    new_path=`$WHICH "$new_path" 2> /dev/null`
18893    # bat and cmd files are not always considered executable in MSYS causing which
18894    # to not find them
18895    if test "x$new_path" = x \
18896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18898      new_path="$path"
18899
18900  windows_path="$new_path"
18901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18902    unix_path=`$CYGPATH -u "$windows_path"`
18903    new_path="$unix_path"
18904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18906    new_path="$unix_path"
18907  fi
18908
18909    fi
18910
18911    if test "x$new_path" = x; then
18912      # It's still not found. Now this is an unrecoverable error.
18913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18914$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18915      has_space=`$ECHO "$complete" | $GREP " "`
18916      if test "x$has_space" != x; then
18917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18919      fi
18920      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18921    fi
18922  fi
18923
18924  # Now new_path has a complete unix path to the binary
18925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18926    # Keep paths in /bin as-is, but remove trailing .exe if any
18927    new_path="${new_path/%.exe/}"
18928    # Do not save /bin paths to all_fixpath_prefixes!
18929  else
18930    # Not in mixed or Windows style, start by that.
18931    new_path=`cmd //c echo $new_path`
18932
18933  input_path="$new_path"
18934  # Check if we need to convert this using DOS-style short mode. If the path
18935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18936  # take no chances and rewrite it.
18937  # Note: m4 eats our [], so we need to use [ and ] instead.
18938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18939  if test "x$has_forbidden_chars" != x; then
18940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18942  fi
18943
18944    # Output is in $new_path
18945
18946  windows_path="$new_path"
18947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18948    unix_path=`$CYGPATH -u "$windows_path"`
18949    new_path="$unix_path"
18950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18952    new_path="$unix_path"
18953  fi
18954
18955    # remove trailing .exe if any
18956    new_path="${new_path/%.exe/}"
18957
18958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18960  fi
18961
18962    else
18963      # We're on a unix platform. Hooray! :)
18964      # First separate the path from the arguments. This will split at the first
18965      # space.
18966      complete="$FOUND_MAKE"
18967      path="${complete%% *}"
18968      tmp="$complete EOL"
18969      arguments="${tmp#* }"
18970
18971      # Cannot rely on the command "which" here since it doesn't always work.
18972      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18973      if test -z "$is_absolute_path"; then
18974        # Path to executable is not absolute. Find it.
18975        IFS_save="$IFS"
18976        IFS=:
18977        for p in $PATH; do
18978          if test -f "$p/$path" && test -x "$p/$path"; then
18979            new_path="$p/$path"
18980            break
18981          fi
18982        done
18983        IFS="$IFS_save"
18984      else
18985        # This is an absolute path, we can use it without further modifications.
18986        new_path="$path"
18987      fi
18988
18989      if test "x$new_path" = x; then
18990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18991$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18992        has_space=`$ECHO "$complete" | $GREP " "`
18993        if test "x$has_space" != x; then
18994          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18996        fi
18997        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18998      fi
18999    fi
19000
19001    # Now join together the path and the arguments once again
19002    if test "x$arguments" != xEOL; then
19003      new_complete="$new_path ${arguments% *}"
19004    else
19005      new_complete="$new_path"
19006    fi
19007
19008    if test "x$complete" != "x$new_complete"; then
19009      FOUND_MAKE="$new_complete"
19010      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19011$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19012    fi
19013  fi
19014
19015        fi
19016      fi
19017    fi
19018  fi
19019
19020    fi
19021
19022    if test "x$FOUND_MAKE" = x; then
19023      if test "x$TOOLCHAIN_PATH" != x; then
19024        # We have a toolchain path, check that as well before giving up.
19025        OLD_PATH=$PATH
19026        PATH=$TOOLCHAIN_PATH:$PATH
19027        for ac_prog in gmake
19028do
19029  # Extract the first word of "$ac_prog", so it can be a program name with args.
19030set dummy $ac_prog; ac_word=$2
19031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19032$as_echo_n "checking for $ac_word... " >&6; }
19033if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19034  $as_echo_n "(cached) " >&6
19035else
19036  case $CHECK_TOOLSDIR_GMAKE in
19037  [\\/]* | ?:[\\/]*)
19038  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19039  ;;
19040  *)
19041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19042for as_dir in $PATH
19043do
19044  IFS=$as_save_IFS
19045  test -z "$as_dir" && as_dir=.
19046    for ac_exec_ext in '' $ac_executable_extensions; do
19047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19048    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19050    break 2
19051  fi
19052done
19053  done
19054IFS=$as_save_IFS
19055
19056  ;;
19057esac
19058fi
19059CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19060if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19062$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19063else
19064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19065$as_echo "no" >&6; }
19066fi
19067
19068
19069  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19070done
19071
19072
19073  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19074  DESCRIPTION="gmake in tools-dir"
19075
19076  # On Cygwin, we require a newer version of make than on other platforms
19077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19078    MAKE_VERSION_EXPR="-e 4\."
19079    MAKE_REQUIRED_VERSION="4.0"
19080   else
19081    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19082    MAKE_REQUIRED_VERSION="3.81"
19083  fi
19084
19085  if test "x$MAKE_CANDIDATE" != x; then
19086    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19087$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19088    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19089    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19090    if test "x$IS_GNU_MAKE" = x; then
19091      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19092$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19093    else
19094      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19095      if test "x$IS_MODERN_MAKE" = x; then
19096        { $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
19097$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;}
19098      else
19099        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19100          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19101            MAKE_EXPECTED_ENV='cygwin'
19102          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19103            MAKE_EXPECTED_ENV='msys'
19104          else
19105            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19106          fi
19107          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19108          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19109        else
19110          # Not relevant for non-Windows
19111          IS_MAKE_CORRECT_ENV=true
19112        fi
19113        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19114          { $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
19115$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;}
19116        else
19117          FOUND_MAKE=$MAKE_CANDIDATE
19118
19119  # Only process if variable expands to non-empty
19120
19121  if test "x$FOUND_MAKE" != x; then
19122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19123
19124  # First separate the path from the arguments. This will split at the first
19125  # space.
19126  complete="$FOUND_MAKE"
19127  path="${complete%% *}"
19128  tmp="$complete EOL"
19129  arguments="${tmp#* }"
19130
19131  # Input might be given as Windows format, start by converting to
19132  # unix format.
19133  new_path=`$CYGPATH -u "$path"`
19134
19135  # Now try to locate executable using which
19136  new_path=`$WHICH "$new_path" 2> /dev/null`
19137  # bat and cmd files are not always considered executable in cygwin causing which
19138  # to not find them
19139  if test "x$new_path" = x \
19140      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19141      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19142    new_path=`$CYGPATH -u "$path"`
19143  fi
19144  if test "x$new_path" = x; then
19145    # Oops. Which didn't find the executable.
19146    # The splitting of arguments from the executable at a space might have been incorrect,
19147    # since paths with space are more likely in Windows. Give it another try with the whole
19148    # argument.
19149    path="$complete"
19150    arguments="EOL"
19151    new_path=`$CYGPATH -u "$path"`
19152    new_path=`$WHICH "$new_path" 2> /dev/null`
19153    # bat and cmd files are not always considered executable in cygwin causing which
19154    # to not find them
19155    if test "x$new_path" = x \
19156        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19157        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19158      new_path=`$CYGPATH -u "$path"`
19159    fi
19160    if test "x$new_path" = x; then
19161      # It's still not found. Now this is an unrecoverable error.
19162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19163$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19164      has_space=`$ECHO "$complete" | $GREP " "`
19165      if test "x$has_space" != x; then
19166        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19167$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19168      fi
19169      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19170    fi
19171  fi
19172
19173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19176  # "foo.exe" is OK but "foo" is an error.
19177  #
19178  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19179  # It is also a way to make sure we got the proper file name for the real test later on.
19180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19181  if test "x$test_shortpath" = x; then
19182    # Short path failed, file does not exist as specified.
19183    # Try adding .exe or .cmd
19184    if test -f "${new_path}.exe"; then
19185      input_to_shortpath="${new_path}.exe"
19186    elif test -f "${new_path}.cmd"; then
19187      input_to_shortpath="${new_path}.cmd"
19188    else
19189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19190$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19191      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19192$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19193      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19194    fi
19195  else
19196    input_to_shortpath="$new_path"
19197  fi
19198
19199  # Call helper function which possibly converts this using DOS-style short mode.
19200  # If so, the updated path is stored in $new_path.
19201  new_path="$input_to_shortpath"
19202
19203  input_path="$input_to_shortpath"
19204  # Check if we need to convert this using DOS-style short mode. If the path
19205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19206  # take no chances and rewrite it.
19207  # Note: m4 eats our [], so we need to use [ and ] instead.
19208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19209  if test "x$has_forbidden_chars" != x; then
19210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19214      # Going to short mode and back again did indeed matter. Since short mode is
19215      # case insensitive, let's make it lowercase to improve readability.
19216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19217      # Now convert it back to Unix-style (cygpath)
19218      input_path=`$CYGPATH -u "$shortmode_path"`
19219      new_path="$input_path"
19220    fi
19221  fi
19222
19223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19224  if test "x$test_cygdrive_prefix" = x; then
19225    # As a simple fix, exclude /usr/bin since it's not a real path.
19226    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19228      # a path prefixed by /cygdrive for fixpath to work.
19229      new_path="$CYGWIN_ROOT_PATH$input_path"
19230    fi
19231  fi
19232
19233  # remove trailing .exe if any
19234  new_path="${new_path/%.exe/}"
19235
19236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19237
19238  # First separate the path from the arguments. This will split at the first
19239  # space.
19240  complete="$FOUND_MAKE"
19241  path="${complete%% *}"
19242  tmp="$complete EOL"
19243  arguments="${tmp#* }"
19244
19245  # Input might be given as Windows format, start by converting to
19246  # unix format.
19247  new_path="$path"
19248
19249  windows_path="$new_path"
19250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19251    unix_path=`$CYGPATH -u "$windows_path"`
19252    new_path="$unix_path"
19253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19255    new_path="$unix_path"
19256  fi
19257
19258
19259  # Now try to locate executable using which
19260  new_path=`$WHICH "$new_path" 2> /dev/null`
19261
19262  if test "x$new_path" = x; then
19263    # Oops. Which didn't find the executable.
19264    # The splitting of arguments from the executable at a space might have been incorrect,
19265    # since paths with space are more likely in Windows. Give it another try with the whole
19266    # argument.
19267    path="$complete"
19268    arguments="EOL"
19269    new_path="$path"
19270
19271  windows_path="$new_path"
19272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19273    unix_path=`$CYGPATH -u "$windows_path"`
19274    new_path="$unix_path"
19275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19277    new_path="$unix_path"
19278  fi
19279
19280
19281    new_path=`$WHICH "$new_path" 2> /dev/null`
19282    # bat and cmd files are not always considered executable in MSYS causing which
19283    # to not find them
19284    if test "x$new_path" = x \
19285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19287      new_path="$path"
19288
19289  windows_path="$new_path"
19290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19291    unix_path=`$CYGPATH -u "$windows_path"`
19292    new_path="$unix_path"
19293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19295    new_path="$unix_path"
19296  fi
19297
19298    fi
19299
19300    if test "x$new_path" = x; then
19301      # It's still not found. Now this is an unrecoverable error.
19302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19303$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19304      has_space=`$ECHO "$complete" | $GREP " "`
19305      if test "x$has_space" != x; then
19306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19308      fi
19309      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19310    fi
19311  fi
19312
19313  # Now new_path has a complete unix path to the binary
19314  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19315    # Keep paths in /bin as-is, but remove trailing .exe if any
19316    new_path="${new_path/%.exe/}"
19317    # Do not save /bin paths to all_fixpath_prefixes!
19318  else
19319    # Not in mixed or Windows style, start by that.
19320    new_path=`cmd //c echo $new_path`
19321
19322  input_path="$new_path"
19323  # Check if we need to convert this using DOS-style short mode. If the path
19324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19325  # take no chances and rewrite it.
19326  # Note: m4 eats our [], so we need to use [ and ] instead.
19327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19328  if test "x$has_forbidden_chars" != x; then
19329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19331  fi
19332
19333    # Output is in $new_path
19334
19335  windows_path="$new_path"
19336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19337    unix_path=`$CYGPATH -u "$windows_path"`
19338    new_path="$unix_path"
19339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19341    new_path="$unix_path"
19342  fi
19343
19344    # remove trailing .exe if any
19345    new_path="${new_path/%.exe/}"
19346
19347    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19348    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19349  fi
19350
19351    else
19352      # We're on a unix platform. Hooray! :)
19353      # First separate the path from the arguments. This will split at the first
19354      # space.
19355      complete="$FOUND_MAKE"
19356      path="${complete%% *}"
19357      tmp="$complete EOL"
19358      arguments="${tmp#* }"
19359
19360      # Cannot rely on the command "which" here since it doesn't always work.
19361      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19362      if test -z "$is_absolute_path"; then
19363        # Path to executable is not absolute. Find it.
19364        IFS_save="$IFS"
19365        IFS=:
19366        for p in $PATH; do
19367          if test -f "$p/$path" && test -x "$p/$path"; then
19368            new_path="$p/$path"
19369            break
19370          fi
19371        done
19372        IFS="$IFS_save"
19373      else
19374        # This is an absolute path, we can use it without further modifications.
19375        new_path="$path"
19376      fi
19377
19378      if test "x$new_path" = x; then
19379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19380$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19381        has_space=`$ECHO "$complete" | $GREP " "`
19382        if test "x$has_space" != x; then
19383          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19384$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19385        fi
19386        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19387      fi
19388    fi
19389
19390    # Now join together the path and the arguments once again
19391    if test "x$arguments" != xEOL; then
19392      new_complete="$new_path ${arguments% *}"
19393    else
19394      new_complete="$new_path"
19395    fi
19396
19397    if test "x$complete" != "x$new_complete"; then
19398      FOUND_MAKE="$new_complete"
19399      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19400$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19401    fi
19402  fi
19403
19404        fi
19405      fi
19406    fi
19407  fi
19408
19409        if test "x$FOUND_MAKE" = x; then
19410          for ac_prog in make
19411do
19412  # Extract the first word of "$ac_prog", so it can be a program name with args.
19413set dummy $ac_prog; ac_word=$2
19414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19415$as_echo_n "checking for $ac_word... " >&6; }
19416if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19417  $as_echo_n "(cached) " >&6
19418else
19419  case $CHECK_TOOLSDIR_MAKE in
19420  [\\/]* | ?:[\\/]*)
19421  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19422  ;;
19423  *)
19424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19425for as_dir in $PATH
19426do
19427  IFS=$as_save_IFS
19428  test -z "$as_dir" && as_dir=.
19429    for ac_exec_ext in '' $ac_executable_extensions; do
19430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19431    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19433    break 2
19434  fi
19435done
19436  done
19437IFS=$as_save_IFS
19438
19439  ;;
19440esac
19441fi
19442CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19443if test -n "$CHECK_TOOLSDIR_MAKE"; then
19444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19445$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19446else
19447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19448$as_echo "no" >&6; }
19449fi
19450
19451
19452  test -n "$CHECK_TOOLSDIR_MAKE" && break
19453done
19454
19455
19456  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19457  DESCRIPTION="make in tools-dir"
19458
19459  # On Cygwin, we require a newer version of make than on other platforms
19460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19461    MAKE_VERSION_EXPR="-e 4\."
19462    MAKE_REQUIRED_VERSION="4.0"
19463   else
19464    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19465    MAKE_REQUIRED_VERSION="3.81"
19466  fi
19467
19468  if test "x$MAKE_CANDIDATE" != x; then
19469    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19470$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19471    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19472    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19473    if test "x$IS_GNU_MAKE" = x; then
19474      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19475$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19476    else
19477      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19478      if test "x$IS_MODERN_MAKE" = x; then
19479        { $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
19480$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;}
19481      else
19482        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19483          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19484            MAKE_EXPECTED_ENV='cygwin'
19485          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19486            MAKE_EXPECTED_ENV='msys'
19487          else
19488            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19489          fi
19490          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19491          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19492        else
19493          # Not relevant for non-Windows
19494          IS_MAKE_CORRECT_ENV=true
19495        fi
19496        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19497          { $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
19498$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;}
19499        else
19500          FOUND_MAKE=$MAKE_CANDIDATE
19501
19502  # Only process if variable expands to non-empty
19503
19504  if test "x$FOUND_MAKE" != x; then
19505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19506
19507  # First separate the path from the arguments. This will split at the first
19508  # space.
19509  complete="$FOUND_MAKE"
19510  path="${complete%% *}"
19511  tmp="$complete EOL"
19512  arguments="${tmp#* }"
19513
19514  # Input might be given as Windows format, start by converting to
19515  # unix format.
19516  new_path=`$CYGPATH -u "$path"`
19517
19518  # Now try to locate executable using which
19519  new_path=`$WHICH "$new_path" 2> /dev/null`
19520  # bat and cmd files are not always considered executable in cygwin causing which
19521  # to not find them
19522  if test "x$new_path" = x \
19523      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19524      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19525    new_path=`$CYGPATH -u "$path"`
19526  fi
19527  if test "x$new_path" = x; then
19528    # Oops. Which didn't find the executable.
19529    # The splitting of arguments from the executable at a space might have been incorrect,
19530    # since paths with space are more likely in Windows. Give it another try with the whole
19531    # argument.
19532    path="$complete"
19533    arguments="EOL"
19534    new_path=`$CYGPATH -u "$path"`
19535    new_path=`$WHICH "$new_path" 2> /dev/null`
19536    # bat and cmd files are not always considered executable in cygwin causing which
19537    # to not find them
19538    if test "x$new_path" = x \
19539        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19540        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19541      new_path=`$CYGPATH -u "$path"`
19542    fi
19543    if test "x$new_path" = x; then
19544      # It's still not found. Now this is an unrecoverable error.
19545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19546$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19547      has_space=`$ECHO "$complete" | $GREP " "`
19548      if test "x$has_space" != x; then
19549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19551      fi
19552      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19553    fi
19554  fi
19555
19556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19559  # "foo.exe" is OK but "foo" is an error.
19560  #
19561  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19562  # It is also a way to make sure we got the proper file name for the real test later on.
19563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19564  if test "x$test_shortpath" = x; then
19565    # Short path failed, file does not exist as specified.
19566    # Try adding .exe or .cmd
19567    if test -f "${new_path}.exe"; then
19568      input_to_shortpath="${new_path}.exe"
19569    elif test -f "${new_path}.cmd"; then
19570      input_to_shortpath="${new_path}.cmd"
19571    else
19572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19573$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19574      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19575$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19576      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19577    fi
19578  else
19579    input_to_shortpath="$new_path"
19580  fi
19581
19582  # Call helper function which possibly converts this using DOS-style short mode.
19583  # If so, the updated path is stored in $new_path.
19584  new_path="$input_to_shortpath"
19585
19586  input_path="$input_to_shortpath"
19587  # Check if we need to convert this using DOS-style short mode. If the path
19588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19589  # take no chances and rewrite it.
19590  # Note: m4 eats our [], so we need to use [ and ] instead.
19591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19592  if test "x$has_forbidden_chars" != x; then
19593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19597      # Going to short mode and back again did indeed matter. Since short mode is
19598      # case insensitive, let's make it lowercase to improve readability.
19599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19600      # Now convert it back to Unix-style (cygpath)
19601      input_path=`$CYGPATH -u "$shortmode_path"`
19602      new_path="$input_path"
19603    fi
19604  fi
19605
19606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19607  if test "x$test_cygdrive_prefix" = x; then
19608    # As a simple fix, exclude /usr/bin since it's not a real path.
19609    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19611      # a path prefixed by /cygdrive for fixpath to work.
19612      new_path="$CYGWIN_ROOT_PATH$input_path"
19613    fi
19614  fi
19615
19616  # remove trailing .exe if any
19617  new_path="${new_path/%.exe/}"
19618
19619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19620
19621  # First separate the path from the arguments. This will split at the first
19622  # space.
19623  complete="$FOUND_MAKE"
19624  path="${complete%% *}"
19625  tmp="$complete EOL"
19626  arguments="${tmp#* }"
19627
19628  # Input might be given as Windows format, start by converting to
19629  # unix format.
19630  new_path="$path"
19631
19632  windows_path="$new_path"
19633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19634    unix_path=`$CYGPATH -u "$windows_path"`
19635    new_path="$unix_path"
19636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19638    new_path="$unix_path"
19639  fi
19640
19641
19642  # Now try to locate executable using which
19643  new_path=`$WHICH "$new_path" 2> /dev/null`
19644
19645  if test "x$new_path" = x; then
19646    # Oops. Which didn't find the executable.
19647    # The splitting of arguments from the executable at a space might have been incorrect,
19648    # since paths with space are more likely in Windows. Give it another try with the whole
19649    # argument.
19650    path="$complete"
19651    arguments="EOL"
19652    new_path="$path"
19653
19654  windows_path="$new_path"
19655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19656    unix_path=`$CYGPATH -u "$windows_path"`
19657    new_path="$unix_path"
19658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19660    new_path="$unix_path"
19661  fi
19662
19663
19664    new_path=`$WHICH "$new_path" 2> /dev/null`
19665    # bat and cmd files are not always considered executable in MSYS causing which
19666    # to not find them
19667    if test "x$new_path" = x \
19668        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19669        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19670      new_path="$path"
19671
19672  windows_path="$new_path"
19673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19674    unix_path=`$CYGPATH -u "$windows_path"`
19675    new_path="$unix_path"
19676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19678    new_path="$unix_path"
19679  fi
19680
19681    fi
19682
19683    if test "x$new_path" = x; then
19684      # It's still not found. Now this is an unrecoverable error.
19685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19686$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19687      has_space=`$ECHO "$complete" | $GREP " "`
19688      if test "x$has_space" != x; then
19689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19691      fi
19692      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19693    fi
19694  fi
19695
19696  # Now new_path has a complete unix path to the binary
19697  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19698    # Keep paths in /bin as-is, but remove trailing .exe if any
19699    new_path="${new_path/%.exe/}"
19700    # Do not save /bin paths to all_fixpath_prefixes!
19701  else
19702    # Not in mixed or Windows style, start by that.
19703    new_path=`cmd //c echo $new_path`
19704
19705  input_path="$new_path"
19706  # Check if we need to convert this using DOS-style short mode. If the path
19707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19708  # take no chances and rewrite it.
19709  # Note: m4 eats our [], so we need to use [ and ] instead.
19710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19711  if test "x$has_forbidden_chars" != x; then
19712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19714  fi
19715
19716    # Output is in $new_path
19717
19718  windows_path="$new_path"
19719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19720    unix_path=`$CYGPATH -u "$windows_path"`
19721    new_path="$unix_path"
19722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19724    new_path="$unix_path"
19725  fi
19726
19727    # remove trailing .exe if any
19728    new_path="${new_path/%.exe/}"
19729
19730    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19731    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19732  fi
19733
19734    else
19735      # We're on a unix platform. Hooray! :)
19736      # First separate the path from the arguments. This will split at the first
19737      # space.
19738      complete="$FOUND_MAKE"
19739      path="${complete%% *}"
19740      tmp="$complete EOL"
19741      arguments="${tmp#* }"
19742
19743      # Cannot rely on the command "which" here since it doesn't always work.
19744      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19745      if test -z "$is_absolute_path"; then
19746        # Path to executable is not absolute. Find it.
19747        IFS_save="$IFS"
19748        IFS=:
19749        for p in $PATH; do
19750          if test -f "$p/$path" && test -x "$p/$path"; then
19751            new_path="$p/$path"
19752            break
19753          fi
19754        done
19755        IFS="$IFS_save"
19756      else
19757        # This is an absolute path, we can use it without further modifications.
19758        new_path="$path"
19759      fi
19760
19761      if test "x$new_path" = x; then
19762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19764        has_space=`$ECHO "$complete" | $GREP " "`
19765        if test "x$has_space" != x; then
19766          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19767$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19768        fi
19769        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19770      fi
19771    fi
19772
19773    # Now join together the path and the arguments once again
19774    if test "x$arguments" != xEOL; then
19775      new_complete="$new_path ${arguments% *}"
19776    else
19777      new_complete="$new_path"
19778    fi
19779
19780    if test "x$complete" != "x$new_complete"; then
19781      FOUND_MAKE="$new_complete"
19782      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19783$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19784    fi
19785  fi
19786
19787        fi
19788      fi
19789    fi
19790  fi
19791
19792        fi
19793        PATH=$OLD_PATH
19794      fi
19795    fi
19796
19797    if test "x$FOUND_MAKE" = x; then
19798      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
19799    fi
19800
19801    else
19802      # If it succeeded, then it was overridden by the user. We will use it
19803      # for the tool.
19804
19805      # First remove it from the list of overridden variables, so we can test
19806      # for unknown variables in the end.
19807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19808
19809      # Check if we try to supply an empty value
19810      if test "x$MAKE" = x; then
19811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19812$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19814$as_echo_n "checking for MAKE... " >&6; }
19815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19816$as_echo "disabled" >&6; }
19817      else
19818        # Check if the provided tool contains a complete path.
19819        tool_specified="$MAKE"
19820        tool_basename="${tool_specified##*/}"
19821        if test "x$tool_basename" = "x$tool_specified"; then
19822          # A command without a complete path is provided, search $PATH.
19823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19824$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19825          # Extract the first word of "$tool_basename", so it can be a program name with args.
19826set dummy $tool_basename; ac_word=$2
19827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19828$as_echo_n "checking for $ac_word... " >&6; }
19829if ${ac_cv_path_MAKE+:} false; then :
19830  $as_echo_n "(cached) " >&6
19831else
19832  case $MAKE in
19833  [\\/]* | ?:[\\/]*)
19834  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19835  ;;
19836  *)
19837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19838for as_dir in $PATH
19839do
19840  IFS=$as_save_IFS
19841  test -z "$as_dir" && as_dir=.
19842    for ac_exec_ext in '' $ac_executable_extensions; do
19843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19844    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19846    break 2
19847  fi
19848done
19849  done
19850IFS=$as_save_IFS
19851
19852  ;;
19853esac
19854fi
19855MAKE=$ac_cv_path_MAKE
19856if test -n "$MAKE"; then
19857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19858$as_echo "$MAKE" >&6; }
19859else
19860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19861$as_echo "no" >&6; }
19862fi
19863
19864
19865          if test "x$MAKE" = x; then
19866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19867          fi
19868        else
19869          # Otherwise we believe it is a complete path. Use it as it is.
19870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19871$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19873$as_echo_n "checking for MAKE... " >&6; }
19874          if test ! -x "$tool_specified"; then
19875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19876$as_echo "not found" >&6; }
19877            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19878          fi
19879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19880$as_echo "$tool_specified" >&6; }
19881        fi
19882      fi
19883    fi
19884
19885    # If MAKE was set by user, verify the version
19886
19887  MAKE_CANDIDATE=""$MAKE""
19888  DESCRIPTION="user supplied MAKE=$MAKE"
19889
19890  # On Cygwin, we require a newer version of make than on other platforms
19891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19892    MAKE_VERSION_EXPR="-e 4\."
19893    MAKE_REQUIRED_VERSION="4.0"
19894   else
19895    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19896    MAKE_REQUIRED_VERSION="3.81"
19897  fi
19898
19899  if test "x$MAKE_CANDIDATE" != x; then
19900    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19901$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19902    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19903    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19904    if test "x$IS_GNU_MAKE" = x; then
19905      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19906$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19907    else
19908      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19909      if test "x$IS_MODERN_MAKE" = x; then
19910        { $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
19911$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;}
19912      else
19913        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19914          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19915            MAKE_EXPECTED_ENV='cygwin'
19916          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19917            MAKE_EXPECTED_ENV='msys'
19918          else
19919            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19920          fi
19921          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19922          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19923        else
19924          # Not relevant for non-Windows
19925          IS_MAKE_CORRECT_ENV=true
19926        fi
19927        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19928          { $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
19929$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;}
19930        else
19931          FOUND_MAKE=$MAKE_CANDIDATE
19932
19933  # Only process if variable expands to non-empty
19934
19935  if test "x$FOUND_MAKE" != x; then
19936    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19937
19938  # First separate the path from the arguments. This will split at the first
19939  # space.
19940  complete="$FOUND_MAKE"
19941  path="${complete%% *}"
19942  tmp="$complete EOL"
19943  arguments="${tmp#* }"
19944
19945  # Input might be given as Windows format, start by converting to
19946  # unix format.
19947  new_path=`$CYGPATH -u "$path"`
19948
19949  # Now try to locate executable using which
19950  new_path=`$WHICH "$new_path" 2> /dev/null`
19951  # bat and cmd files are not always considered executable in cygwin causing which
19952  # to not find them
19953  if test "x$new_path" = x \
19954      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19955      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19956    new_path=`$CYGPATH -u "$path"`
19957  fi
19958  if test "x$new_path" = x; then
19959    # Oops. Which didn't find the executable.
19960    # The splitting of arguments from the executable at a space might have been incorrect,
19961    # since paths with space are more likely in Windows. Give it another try with the whole
19962    # argument.
19963    path="$complete"
19964    arguments="EOL"
19965    new_path=`$CYGPATH -u "$path"`
19966    new_path=`$WHICH "$new_path" 2> /dev/null`
19967    # bat and cmd files are not always considered executable in cygwin causing which
19968    # to not find them
19969    if test "x$new_path" = x \
19970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19972      new_path=`$CYGPATH -u "$path"`
19973    fi
19974    if test "x$new_path" = x; then
19975      # It's still not found. Now this is an unrecoverable error.
19976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19977$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19978      has_space=`$ECHO "$complete" | $GREP " "`
19979      if test "x$has_space" != x; then
19980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19982      fi
19983      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19984    fi
19985  fi
19986
19987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19990  # "foo.exe" is OK but "foo" is an error.
19991  #
19992  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19993  # It is also a way to make sure we got the proper file name for the real test later on.
19994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19995  if test "x$test_shortpath" = x; then
19996    # Short path failed, file does not exist as specified.
19997    # Try adding .exe or .cmd
19998    if test -f "${new_path}.exe"; then
19999      input_to_shortpath="${new_path}.exe"
20000    elif test -f "${new_path}.cmd"; then
20001      input_to_shortpath="${new_path}.cmd"
20002    else
20003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20005      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20006$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20007      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20008    fi
20009  else
20010    input_to_shortpath="$new_path"
20011  fi
20012
20013  # Call helper function which possibly converts this using DOS-style short mode.
20014  # If so, the updated path is stored in $new_path.
20015  new_path="$input_to_shortpath"
20016
20017  input_path="$input_to_shortpath"
20018  # Check if we need to convert this using DOS-style short mode. If the path
20019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20020  # take no chances and rewrite it.
20021  # Note: m4 eats our [], so we need to use [ and ] instead.
20022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20023  if test "x$has_forbidden_chars" != x; then
20024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20028      # Going to short mode and back again did indeed matter. Since short mode is
20029      # case insensitive, let's make it lowercase to improve readability.
20030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20031      # Now convert it back to Unix-style (cygpath)
20032      input_path=`$CYGPATH -u "$shortmode_path"`
20033      new_path="$input_path"
20034    fi
20035  fi
20036
20037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20038  if test "x$test_cygdrive_prefix" = x; then
20039    # As a simple fix, exclude /usr/bin since it's not a real path.
20040    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20042      # a path prefixed by /cygdrive for fixpath to work.
20043      new_path="$CYGWIN_ROOT_PATH$input_path"
20044    fi
20045  fi
20046
20047  # remove trailing .exe if any
20048  new_path="${new_path/%.exe/}"
20049
20050    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20051
20052  # First separate the path from the arguments. This will split at the first
20053  # space.
20054  complete="$FOUND_MAKE"
20055  path="${complete%% *}"
20056  tmp="$complete EOL"
20057  arguments="${tmp#* }"
20058
20059  # Input might be given as Windows format, start by converting to
20060  # unix format.
20061  new_path="$path"
20062
20063  windows_path="$new_path"
20064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20065    unix_path=`$CYGPATH -u "$windows_path"`
20066    new_path="$unix_path"
20067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20069    new_path="$unix_path"
20070  fi
20071
20072
20073  # Now try to locate executable using which
20074  new_path=`$WHICH "$new_path" 2> /dev/null`
20075
20076  if test "x$new_path" = x; then
20077    # Oops. Which didn't find the executable.
20078    # The splitting of arguments from the executable at a space might have been incorrect,
20079    # since paths with space are more likely in Windows. Give it another try with the whole
20080    # argument.
20081    path="$complete"
20082    arguments="EOL"
20083    new_path="$path"
20084
20085  windows_path="$new_path"
20086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20087    unix_path=`$CYGPATH -u "$windows_path"`
20088    new_path="$unix_path"
20089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20091    new_path="$unix_path"
20092  fi
20093
20094
20095    new_path=`$WHICH "$new_path" 2> /dev/null`
20096    # bat and cmd files are not always considered executable in MSYS causing which
20097    # to not find them
20098    if test "x$new_path" = x \
20099        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20100        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20101      new_path="$path"
20102
20103  windows_path="$new_path"
20104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20105    unix_path=`$CYGPATH -u "$windows_path"`
20106    new_path="$unix_path"
20107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20109    new_path="$unix_path"
20110  fi
20111
20112    fi
20113
20114    if test "x$new_path" = x; then
20115      # It's still not found. Now this is an unrecoverable error.
20116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20117$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20118      has_space=`$ECHO "$complete" | $GREP " "`
20119      if test "x$has_space" != x; then
20120        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20121$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20122      fi
20123      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20124    fi
20125  fi
20126
20127  # Now new_path has a complete unix path to the binary
20128  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20129    # Keep paths in /bin as-is, but remove trailing .exe if any
20130    new_path="${new_path/%.exe/}"
20131    # Do not save /bin paths to all_fixpath_prefixes!
20132  else
20133    # Not in mixed or Windows style, start by that.
20134    new_path=`cmd //c echo $new_path`
20135
20136  input_path="$new_path"
20137  # Check if we need to convert this using DOS-style short mode. If the path
20138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20139  # take no chances and rewrite it.
20140  # Note: m4 eats our [], so we need to use [ and ] instead.
20141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20142  if test "x$has_forbidden_chars" != x; then
20143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20145  fi
20146
20147    # Output is in $new_path
20148
20149  windows_path="$new_path"
20150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20151    unix_path=`$CYGPATH -u "$windows_path"`
20152    new_path="$unix_path"
20153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20155    new_path="$unix_path"
20156  fi
20157
20158    # remove trailing .exe if any
20159    new_path="${new_path/%.exe/}"
20160
20161    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20162    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20163  fi
20164
20165    else
20166      # We're on a unix platform. Hooray! :)
20167      # First separate the path from the arguments. This will split at the first
20168      # space.
20169      complete="$FOUND_MAKE"
20170      path="${complete%% *}"
20171      tmp="$complete EOL"
20172      arguments="${tmp#* }"
20173
20174      # Cannot rely on the command "which" here since it doesn't always work.
20175      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20176      if test -z "$is_absolute_path"; then
20177        # Path to executable is not absolute. Find it.
20178        IFS_save="$IFS"
20179        IFS=:
20180        for p in $PATH; do
20181          if test -f "$p/$path" && test -x "$p/$path"; then
20182            new_path="$p/$path"
20183            break
20184          fi
20185        done
20186        IFS="$IFS_save"
20187      else
20188        # This is an absolute path, we can use it without further modifications.
20189        new_path="$path"
20190      fi
20191
20192      if test "x$new_path" = x; then
20193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20194$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20195        has_space=`$ECHO "$complete" | $GREP " "`
20196        if test "x$has_space" != x; then
20197          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20198$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20199        fi
20200        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20201      fi
20202    fi
20203
20204    # Now join together the path and the arguments once again
20205    if test "x$arguments" != xEOL; then
20206      new_complete="$new_path ${arguments% *}"
20207    else
20208      new_complete="$new_path"
20209    fi
20210
20211    if test "x$complete" != "x$new_complete"; then
20212      FOUND_MAKE="$new_complete"
20213      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20214$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20215    fi
20216  fi
20217
20218        fi
20219      fi
20220    fi
20221  fi
20222
20223    if test "x$FOUND_MAKE" = x; then
20224      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20225    fi
20226
20227  fi
20228
20229
20230  MAKE=$FOUND_MAKE
20231
20232  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20233$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20234
20235
20236  # Check if make supports the output sync option and if so, setup using it.
20237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20238$as_echo_n "checking if make --output-sync is supported... " >&6; }
20239  if $MAKE --version -O > /dev/null 2>&1; then
20240    OUTPUT_SYNC_SUPPORTED=true
20241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20242$as_echo "yes" >&6; }
20243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20244$as_echo_n "checking for output-sync value... " >&6; }
20245
20246# Check whether --with-output-sync was given.
20247if test "${with_output_sync+set}" = set; then :
20248  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20249fi
20250
20251    if test "x$OUTPUT_SYNC" = "x"; then
20252      OUTPUT_SYNC=none
20253    fi
20254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20255$as_echo "$OUTPUT_SYNC" >&6; }
20256    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20257      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20258    fi
20259  else
20260    OUTPUT_SYNC_SUPPORTED=false
20261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20262$as_echo "no" >&6; }
20263  fi
20264
20265
20266
20267
20268
20269
20270  # Test if find supports -delete
20271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20272$as_echo_n "checking if find supports -delete... " >&6; }
20273  FIND_DELETE="-delete"
20274
20275  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20276
20277  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20278
20279  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20280  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20281    # No, it does not.
20282    rm $DELETEDIR/TestIfFindSupportsDelete
20283    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20284      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20285      FIND_DELETE="-print | xargs rm"
20286    else
20287      FIND_DELETE="-exec rm \{\} \+"
20288    fi
20289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20290$as_echo "no" >&6; }
20291  else
20292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20293$as_echo "yes" >&6; }
20294  fi
20295  rmdir $DELETEDIR
20296
20297
20298
20299  # These tools might not be installed by default,
20300  # need hint on how to install them.
20301
20302
20303
20304  # Publish this variable in the help.
20305
20306
20307  if [ -z "${UNZIP+x}" ]; then
20308    # The variable is not set by user, try to locate tool using the code snippet
20309    for ac_prog in unzip
20310do
20311  # Extract the first word of "$ac_prog", so it can be a program name with args.
20312set dummy $ac_prog; ac_word=$2
20313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20314$as_echo_n "checking for $ac_word... " >&6; }
20315if ${ac_cv_path_UNZIP+:} false; then :
20316  $as_echo_n "(cached) " >&6
20317else
20318  case $UNZIP in
20319  [\\/]* | ?:[\\/]*)
20320  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20321  ;;
20322  *)
20323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20324for as_dir in $PATH
20325do
20326  IFS=$as_save_IFS
20327  test -z "$as_dir" && as_dir=.
20328    for ac_exec_ext in '' $ac_executable_extensions; do
20329  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20330    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20331    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20332    break 2
20333  fi
20334done
20335  done
20336IFS=$as_save_IFS
20337
20338  ;;
20339esac
20340fi
20341UNZIP=$ac_cv_path_UNZIP
20342if test -n "$UNZIP"; then
20343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20344$as_echo "$UNZIP" >&6; }
20345else
20346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20347$as_echo "no" >&6; }
20348fi
20349
20350
20351  test -n "$UNZIP" && break
20352done
20353
20354  else
20355    # The variable is set, but is it from the command line or the environment?
20356
20357    # Try to remove the string !UNZIP! from our list.
20358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20360      # If it failed, the variable was not from the command line. Ignore it,
20361      # but warn the user (except for BASH, which is always set by the calling BASH).
20362      if test "xUNZIP" != xBASH; then
20363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20364$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20365      fi
20366      # Try to locate tool using the code snippet
20367      for ac_prog in unzip
20368do
20369  # Extract the first word of "$ac_prog", so it can be a program name with args.
20370set dummy $ac_prog; ac_word=$2
20371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20372$as_echo_n "checking for $ac_word... " >&6; }
20373if ${ac_cv_path_UNZIP+:} false; then :
20374  $as_echo_n "(cached) " >&6
20375else
20376  case $UNZIP in
20377  [\\/]* | ?:[\\/]*)
20378  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20379  ;;
20380  *)
20381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20382for as_dir in $PATH
20383do
20384  IFS=$as_save_IFS
20385  test -z "$as_dir" && as_dir=.
20386    for ac_exec_ext in '' $ac_executable_extensions; do
20387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20388    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20390    break 2
20391  fi
20392done
20393  done
20394IFS=$as_save_IFS
20395
20396  ;;
20397esac
20398fi
20399UNZIP=$ac_cv_path_UNZIP
20400if test -n "$UNZIP"; then
20401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20402$as_echo "$UNZIP" >&6; }
20403else
20404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20405$as_echo "no" >&6; }
20406fi
20407
20408
20409  test -n "$UNZIP" && break
20410done
20411
20412    else
20413      # If it succeeded, then it was overridden by the user. We will use it
20414      # for the tool.
20415
20416      # First remove it from the list of overridden variables, so we can test
20417      # for unknown variables in the end.
20418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20419
20420      # Check if we try to supply an empty value
20421      if test "x$UNZIP" = x; then
20422        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20423$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20425$as_echo_n "checking for UNZIP... " >&6; }
20426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20427$as_echo "disabled" >&6; }
20428      else
20429        # Check if the provided tool contains a complete path.
20430        tool_specified="$UNZIP"
20431        tool_basename="${tool_specified##*/}"
20432        if test "x$tool_basename" = "x$tool_specified"; then
20433          # A command without a complete path is provided, search $PATH.
20434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20435$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20436          # Extract the first word of "$tool_basename", so it can be a program name with args.
20437set dummy $tool_basename; ac_word=$2
20438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20439$as_echo_n "checking for $ac_word... " >&6; }
20440if ${ac_cv_path_UNZIP+:} false; then :
20441  $as_echo_n "(cached) " >&6
20442else
20443  case $UNZIP in
20444  [\\/]* | ?:[\\/]*)
20445  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20446  ;;
20447  *)
20448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20449for as_dir in $PATH
20450do
20451  IFS=$as_save_IFS
20452  test -z "$as_dir" && as_dir=.
20453    for ac_exec_ext in '' $ac_executable_extensions; do
20454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20455    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20457    break 2
20458  fi
20459done
20460  done
20461IFS=$as_save_IFS
20462
20463  ;;
20464esac
20465fi
20466UNZIP=$ac_cv_path_UNZIP
20467if test -n "$UNZIP"; then
20468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20469$as_echo "$UNZIP" >&6; }
20470else
20471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20472$as_echo "no" >&6; }
20473fi
20474
20475
20476          if test "x$UNZIP" = x; then
20477            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20478          fi
20479        else
20480          # Otherwise we believe it is a complete path. Use it as it is.
20481          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20482$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20483          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20484$as_echo_n "checking for UNZIP... " >&6; }
20485          if test ! -x "$tool_specified"; then
20486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20487$as_echo "not found" >&6; }
20488            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20489          fi
20490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20491$as_echo "$tool_specified" >&6; }
20492        fi
20493      fi
20494    fi
20495
20496  fi
20497
20498
20499
20500  if test "x$UNZIP" = x; then
20501    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20502  fi
20503
20504
20505
20506
20507
20508  # Publish this variable in the help.
20509
20510
20511  if [ -z "${ZIP+x}" ]; then
20512    # The variable is not set by user, try to locate tool using the code snippet
20513    for ac_prog in zip
20514do
20515  # Extract the first word of "$ac_prog", so it can be a program name with args.
20516set dummy $ac_prog; ac_word=$2
20517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20518$as_echo_n "checking for $ac_word... " >&6; }
20519if ${ac_cv_path_ZIP+:} false; then :
20520  $as_echo_n "(cached) " >&6
20521else
20522  case $ZIP in
20523  [\\/]* | ?:[\\/]*)
20524  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20525  ;;
20526  *)
20527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20528for as_dir in $PATH
20529do
20530  IFS=$as_save_IFS
20531  test -z "$as_dir" && as_dir=.
20532    for ac_exec_ext in '' $ac_executable_extensions; do
20533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20534    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20536    break 2
20537  fi
20538done
20539  done
20540IFS=$as_save_IFS
20541
20542  ;;
20543esac
20544fi
20545ZIP=$ac_cv_path_ZIP
20546if test -n "$ZIP"; then
20547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20548$as_echo "$ZIP" >&6; }
20549else
20550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20551$as_echo "no" >&6; }
20552fi
20553
20554
20555  test -n "$ZIP" && break
20556done
20557
20558  else
20559    # The variable is set, but is it from the command line or the environment?
20560
20561    # Try to remove the string !ZIP! from our list.
20562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20564      # If it failed, the variable was not from the command line. Ignore it,
20565      # but warn the user (except for BASH, which is always set by the calling BASH).
20566      if test "xZIP" != xBASH; then
20567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20568$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20569      fi
20570      # Try to locate tool using the code snippet
20571      for ac_prog in zip
20572do
20573  # Extract the first word of "$ac_prog", so it can be a program name with args.
20574set dummy $ac_prog; ac_word=$2
20575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20576$as_echo_n "checking for $ac_word... " >&6; }
20577if ${ac_cv_path_ZIP+:} false; then :
20578  $as_echo_n "(cached) " >&6
20579else
20580  case $ZIP in
20581  [\\/]* | ?:[\\/]*)
20582  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20583  ;;
20584  *)
20585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20586for as_dir in $PATH
20587do
20588  IFS=$as_save_IFS
20589  test -z "$as_dir" && as_dir=.
20590    for ac_exec_ext in '' $ac_executable_extensions; do
20591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20592    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20594    break 2
20595  fi
20596done
20597  done
20598IFS=$as_save_IFS
20599
20600  ;;
20601esac
20602fi
20603ZIP=$ac_cv_path_ZIP
20604if test -n "$ZIP"; then
20605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20606$as_echo "$ZIP" >&6; }
20607else
20608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20609$as_echo "no" >&6; }
20610fi
20611
20612
20613  test -n "$ZIP" && break
20614done
20615
20616    else
20617      # If it succeeded, then it was overridden by the user. We will use it
20618      # for the tool.
20619
20620      # First remove it from the list of overridden variables, so we can test
20621      # for unknown variables in the end.
20622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20623
20624      # Check if we try to supply an empty value
20625      if test "x$ZIP" = x; then
20626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20627$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20629$as_echo_n "checking for ZIP... " >&6; }
20630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20631$as_echo "disabled" >&6; }
20632      else
20633        # Check if the provided tool contains a complete path.
20634        tool_specified="$ZIP"
20635        tool_basename="${tool_specified##*/}"
20636        if test "x$tool_basename" = "x$tool_specified"; then
20637          # A command without a complete path is provided, search $PATH.
20638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20639$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20640          # Extract the first word of "$tool_basename", so it can be a program name with args.
20641set dummy $tool_basename; ac_word=$2
20642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20643$as_echo_n "checking for $ac_word... " >&6; }
20644if ${ac_cv_path_ZIP+:} false; then :
20645  $as_echo_n "(cached) " >&6
20646else
20647  case $ZIP in
20648  [\\/]* | ?:[\\/]*)
20649  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20650  ;;
20651  *)
20652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20653for as_dir in $PATH
20654do
20655  IFS=$as_save_IFS
20656  test -z "$as_dir" && as_dir=.
20657    for ac_exec_ext in '' $ac_executable_extensions; do
20658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20659    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20661    break 2
20662  fi
20663done
20664  done
20665IFS=$as_save_IFS
20666
20667  ;;
20668esac
20669fi
20670ZIP=$ac_cv_path_ZIP
20671if test -n "$ZIP"; then
20672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20673$as_echo "$ZIP" >&6; }
20674else
20675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20676$as_echo "no" >&6; }
20677fi
20678
20679
20680          if test "x$ZIP" = x; then
20681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20682          fi
20683        else
20684          # Otherwise we believe it is a complete path. Use it as it is.
20685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20686$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20688$as_echo_n "checking for ZIP... " >&6; }
20689          if test ! -x "$tool_specified"; then
20690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20691$as_echo "not found" >&6; }
20692            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20693          fi
20694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20695$as_echo "$tool_specified" >&6; }
20696        fi
20697      fi
20698    fi
20699
20700  fi
20701
20702
20703
20704  if test "x$ZIP" = x; then
20705    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20706  fi
20707
20708
20709
20710  # Non-required basic tools
20711
20712
20713
20714  # Publish this variable in the help.
20715
20716
20717  if [ -z "${LDD+x}" ]; then
20718    # The variable is not set by user, try to locate tool using the code snippet
20719    for ac_prog in ldd
20720do
20721  # Extract the first word of "$ac_prog", so it can be a program name with args.
20722set dummy $ac_prog; ac_word=$2
20723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20724$as_echo_n "checking for $ac_word... " >&6; }
20725if ${ac_cv_path_LDD+:} false; then :
20726  $as_echo_n "(cached) " >&6
20727else
20728  case $LDD in
20729  [\\/]* | ?:[\\/]*)
20730  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20731  ;;
20732  *)
20733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20734for as_dir in $PATH
20735do
20736  IFS=$as_save_IFS
20737  test -z "$as_dir" && as_dir=.
20738    for ac_exec_ext in '' $ac_executable_extensions; do
20739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20740    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20742    break 2
20743  fi
20744done
20745  done
20746IFS=$as_save_IFS
20747
20748  ;;
20749esac
20750fi
20751LDD=$ac_cv_path_LDD
20752if test -n "$LDD"; then
20753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20754$as_echo "$LDD" >&6; }
20755else
20756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20757$as_echo "no" >&6; }
20758fi
20759
20760
20761  test -n "$LDD" && break
20762done
20763
20764  else
20765    # The variable is set, but is it from the command line or the environment?
20766
20767    # Try to remove the string !LDD! from our list.
20768    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20769    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20770      # If it failed, the variable was not from the command line. Ignore it,
20771      # but warn the user (except for BASH, which is always set by the calling BASH).
20772      if test "xLDD" != xBASH; then
20773        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20774$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20775      fi
20776      # Try to locate tool using the code snippet
20777      for ac_prog in ldd
20778do
20779  # Extract the first word of "$ac_prog", so it can be a program name with args.
20780set dummy $ac_prog; ac_word=$2
20781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20782$as_echo_n "checking for $ac_word... " >&6; }
20783if ${ac_cv_path_LDD+:} false; then :
20784  $as_echo_n "(cached) " >&6
20785else
20786  case $LDD in
20787  [\\/]* | ?:[\\/]*)
20788  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20789  ;;
20790  *)
20791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20792for as_dir in $PATH
20793do
20794  IFS=$as_save_IFS
20795  test -z "$as_dir" && as_dir=.
20796    for ac_exec_ext in '' $ac_executable_extensions; do
20797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20798    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20800    break 2
20801  fi
20802done
20803  done
20804IFS=$as_save_IFS
20805
20806  ;;
20807esac
20808fi
20809LDD=$ac_cv_path_LDD
20810if test -n "$LDD"; then
20811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20812$as_echo "$LDD" >&6; }
20813else
20814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20815$as_echo "no" >&6; }
20816fi
20817
20818
20819  test -n "$LDD" && break
20820done
20821
20822    else
20823      # If it succeeded, then it was overridden by the user. We will use it
20824      # for the tool.
20825
20826      # First remove it from the list of overridden variables, so we can test
20827      # for unknown variables in the end.
20828      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20829
20830      # Check if we try to supply an empty value
20831      if test "x$LDD" = x; then
20832        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20833$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20835$as_echo_n "checking for LDD... " >&6; }
20836        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20837$as_echo "disabled" >&6; }
20838      else
20839        # Check if the provided tool contains a complete path.
20840        tool_specified="$LDD"
20841        tool_basename="${tool_specified##*/}"
20842        if test "x$tool_basename" = "x$tool_specified"; then
20843          # A command without a complete path is provided, search $PATH.
20844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20845$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20846          # Extract the first word of "$tool_basename", so it can be a program name with args.
20847set dummy $tool_basename; ac_word=$2
20848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20849$as_echo_n "checking for $ac_word... " >&6; }
20850if ${ac_cv_path_LDD+:} false; then :
20851  $as_echo_n "(cached) " >&6
20852else
20853  case $LDD in
20854  [\\/]* | ?:[\\/]*)
20855  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20856  ;;
20857  *)
20858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20859for as_dir in $PATH
20860do
20861  IFS=$as_save_IFS
20862  test -z "$as_dir" && as_dir=.
20863    for ac_exec_ext in '' $ac_executable_extensions; do
20864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20865    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20867    break 2
20868  fi
20869done
20870  done
20871IFS=$as_save_IFS
20872
20873  ;;
20874esac
20875fi
20876LDD=$ac_cv_path_LDD
20877if test -n "$LDD"; then
20878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20879$as_echo "$LDD" >&6; }
20880else
20881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20882$as_echo "no" >&6; }
20883fi
20884
20885
20886          if test "x$LDD" = x; then
20887            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20888          fi
20889        else
20890          # Otherwise we believe it is a complete path. Use it as it is.
20891          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20892$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20893          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20894$as_echo_n "checking for LDD... " >&6; }
20895          if test ! -x "$tool_specified"; then
20896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20897$as_echo "not found" >&6; }
20898            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20899          fi
20900          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20901$as_echo "$tool_specified" >&6; }
20902        fi
20903      fi
20904    fi
20905
20906  fi
20907
20908
20909  if test "x$LDD" = "x"; then
20910    # List shared lib dependencies is used for
20911    # debug output and checking for forbidden dependencies.
20912    # We can build without it.
20913    LDD="true"
20914  fi
20915
20916
20917  # Publish this variable in the help.
20918
20919
20920  if [ -z "${OTOOL+x}" ]; then
20921    # The variable is not set by user, try to locate tool using the code snippet
20922    for ac_prog in otool
20923do
20924  # Extract the first word of "$ac_prog", so it can be a program name with args.
20925set dummy $ac_prog; ac_word=$2
20926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20927$as_echo_n "checking for $ac_word... " >&6; }
20928if ${ac_cv_path_OTOOL+:} false; then :
20929  $as_echo_n "(cached) " >&6
20930else
20931  case $OTOOL in
20932  [\\/]* | ?:[\\/]*)
20933  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20934  ;;
20935  *)
20936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20937for as_dir in $PATH
20938do
20939  IFS=$as_save_IFS
20940  test -z "$as_dir" && as_dir=.
20941    for ac_exec_ext in '' $ac_executable_extensions; do
20942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20943    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20945    break 2
20946  fi
20947done
20948  done
20949IFS=$as_save_IFS
20950
20951  ;;
20952esac
20953fi
20954OTOOL=$ac_cv_path_OTOOL
20955if test -n "$OTOOL"; then
20956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20957$as_echo "$OTOOL" >&6; }
20958else
20959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20960$as_echo "no" >&6; }
20961fi
20962
20963
20964  test -n "$OTOOL" && break
20965done
20966
20967  else
20968    # The variable is set, but is it from the command line or the environment?
20969
20970    # Try to remove the string !OTOOL! from our list.
20971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20973      # If it failed, the variable was not from the command line. Ignore it,
20974      # but warn the user (except for BASH, which is always set by the calling BASH).
20975      if test "xOTOOL" != xBASH; then
20976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20977$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20978      fi
20979      # Try to locate tool using the code snippet
20980      for ac_prog in otool
20981do
20982  # Extract the first word of "$ac_prog", so it can be a program name with args.
20983set dummy $ac_prog; ac_word=$2
20984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20985$as_echo_n "checking for $ac_word... " >&6; }
20986if ${ac_cv_path_OTOOL+:} false; then :
20987  $as_echo_n "(cached) " >&6
20988else
20989  case $OTOOL in
20990  [\\/]* | ?:[\\/]*)
20991  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20992  ;;
20993  *)
20994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20995for as_dir in $PATH
20996do
20997  IFS=$as_save_IFS
20998  test -z "$as_dir" && as_dir=.
20999    for ac_exec_ext in '' $ac_executable_extensions; do
21000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21001    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21003    break 2
21004  fi
21005done
21006  done
21007IFS=$as_save_IFS
21008
21009  ;;
21010esac
21011fi
21012OTOOL=$ac_cv_path_OTOOL
21013if test -n "$OTOOL"; then
21014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21015$as_echo "$OTOOL" >&6; }
21016else
21017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21018$as_echo "no" >&6; }
21019fi
21020
21021
21022  test -n "$OTOOL" && break
21023done
21024
21025    else
21026      # If it succeeded, then it was overridden by the user. We will use it
21027      # for the tool.
21028
21029      # First remove it from the list of overridden variables, so we can test
21030      # for unknown variables in the end.
21031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21032
21033      # Check if we try to supply an empty value
21034      if test "x$OTOOL" = x; then
21035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21036$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21038$as_echo_n "checking for OTOOL... " >&6; }
21039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21040$as_echo "disabled" >&6; }
21041      else
21042        # Check if the provided tool contains a complete path.
21043        tool_specified="$OTOOL"
21044        tool_basename="${tool_specified##*/}"
21045        if test "x$tool_basename" = "x$tool_specified"; then
21046          # A command without a complete path is provided, search $PATH.
21047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21048$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21049          # Extract the first word of "$tool_basename", so it can be a program name with args.
21050set dummy $tool_basename; ac_word=$2
21051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21052$as_echo_n "checking for $ac_word... " >&6; }
21053if ${ac_cv_path_OTOOL+:} false; then :
21054  $as_echo_n "(cached) " >&6
21055else
21056  case $OTOOL in
21057  [\\/]* | ?:[\\/]*)
21058  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21059  ;;
21060  *)
21061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21062for as_dir in $PATH
21063do
21064  IFS=$as_save_IFS
21065  test -z "$as_dir" && as_dir=.
21066    for ac_exec_ext in '' $ac_executable_extensions; do
21067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21068    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21070    break 2
21071  fi
21072done
21073  done
21074IFS=$as_save_IFS
21075
21076  ;;
21077esac
21078fi
21079OTOOL=$ac_cv_path_OTOOL
21080if test -n "$OTOOL"; then
21081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21082$as_echo "$OTOOL" >&6; }
21083else
21084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21085$as_echo "no" >&6; }
21086fi
21087
21088
21089          if test "x$OTOOL" = x; then
21090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21091          fi
21092        else
21093          # Otherwise we believe it is a complete path. Use it as it is.
21094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21095$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21097$as_echo_n "checking for OTOOL... " >&6; }
21098          if test ! -x "$tool_specified"; then
21099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21100$as_echo "not found" >&6; }
21101            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21102          fi
21103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21104$as_echo "$tool_specified" >&6; }
21105        fi
21106      fi
21107    fi
21108
21109  fi
21110
21111
21112  if test "x$OTOOL" = "x"; then
21113    OTOOL="true"
21114  fi
21115
21116
21117  # Publish this variable in the help.
21118
21119
21120  if [ -z "${READELF+x}" ]; then
21121    # The variable is not set by user, try to locate tool using the code snippet
21122    for ac_prog in greadelf readelf
21123do
21124  # Extract the first word of "$ac_prog", so it can be a program name with args.
21125set dummy $ac_prog; ac_word=$2
21126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21127$as_echo_n "checking for $ac_word... " >&6; }
21128if ${ac_cv_path_READELF+:} false; then :
21129  $as_echo_n "(cached) " >&6
21130else
21131  case $READELF in
21132  [\\/]* | ?:[\\/]*)
21133  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21134  ;;
21135  *)
21136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21137for as_dir in $PATH
21138do
21139  IFS=$as_save_IFS
21140  test -z "$as_dir" && as_dir=.
21141    for ac_exec_ext in '' $ac_executable_extensions; do
21142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21143    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21145    break 2
21146  fi
21147done
21148  done
21149IFS=$as_save_IFS
21150
21151  ;;
21152esac
21153fi
21154READELF=$ac_cv_path_READELF
21155if test -n "$READELF"; then
21156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21157$as_echo "$READELF" >&6; }
21158else
21159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21160$as_echo "no" >&6; }
21161fi
21162
21163
21164  test -n "$READELF" && break
21165done
21166
21167  else
21168    # The variable is set, but is it from the command line or the environment?
21169
21170    # Try to remove the string !READELF! from our list.
21171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21173      # If it failed, the variable was not from the command line. Ignore it,
21174      # but warn the user (except for BASH, which is always set by the calling BASH).
21175      if test "xREADELF" != xBASH; then
21176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21177$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21178      fi
21179      # Try to locate tool using the code snippet
21180      for ac_prog in greadelf readelf
21181do
21182  # Extract the first word of "$ac_prog", so it can be a program name with args.
21183set dummy $ac_prog; ac_word=$2
21184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21185$as_echo_n "checking for $ac_word... " >&6; }
21186if ${ac_cv_path_READELF+:} false; then :
21187  $as_echo_n "(cached) " >&6
21188else
21189  case $READELF in
21190  [\\/]* | ?:[\\/]*)
21191  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21192  ;;
21193  *)
21194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21195for as_dir in $PATH
21196do
21197  IFS=$as_save_IFS
21198  test -z "$as_dir" && as_dir=.
21199    for ac_exec_ext in '' $ac_executable_extensions; do
21200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21201    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21203    break 2
21204  fi
21205done
21206  done
21207IFS=$as_save_IFS
21208
21209  ;;
21210esac
21211fi
21212READELF=$ac_cv_path_READELF
21213if test -n "$READELF"; then
21214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21215$as_echo "$READELF" >&6; }
21216else
21217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21218$as_echo "no" >&6; }
21219fi
21220
21221
21222  test -n "$READELF" && break
21223done
21224
21225    else
21226      # If it succeeded, then it was overridden by the user. We will use it
21227      # for the tool.
21228
21229      # First remove it from the list of overridden variables, so we can test
21230      # for unknown variables in the end.
21231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21232
21233      # Check if we try to supply an empty value
21234      if test "x$READELF" = x; then
21235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21236$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21238$as_echo_n "checking for READELF... " >&6; }
21239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21240$as_echo "disabled" >&6; }
21241      else
21242        # Check if the provided tool contains a complete path.
21243        tool_specified="$READELF"
21244        tool_basename="${tool_specified##*/}"
21245        if test "x$tool_basename" = "x$tool_specified"; then
21246          # A command without a complete path is provided, search $PATH.
21247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21248$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21249          # Extract the first word of "$tool_basename", so it can be a program name with args.
21250set dummy $tool_basename; ac_word=$2
21251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21252$as_echo_n "checking for $ac_word... " >&6; }
21253if ${ac_cv_path_READELF+:} false; then :
21254  $as_echo_n "(cached) " >&6
21255else
21256  case $READELF in
21257  [\\/]* | ?:[\\/]*)
21258  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21259  ;;
21260  *)
21261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21262for as_dir in $PATH
21263do
21264  IFS=$as_save_IFS
21265  test -z "$as_dir" && as_dir=.
21266    for ac_exec_ext in '' $ac_executable_extensions; do
21267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21268    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21270    break 2
21271  fi
21272done
21273  done
21274IFS=$as_save_IFS
21275
21276  ;;
21277esac
21278fi
21279READELF=$ac_cv_path_READELF
21280if test -n "$READELF"; then
21281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21282$as_echo "$READELF" >&6; }
21283else
21284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21285$as_echo "no" >&6; }
21286fi
21287
21288
21289          if test "x$READELF" = x; then
21290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21291          fi
21292        else
21293          # Otherwise we believe it is a complete path. Use it as it is.
21294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21295$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21297$as_echo_n "checking for READELF... " >&6; }
21298          if test ! -x "$tool_specified"; then
21299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21300$as_echo "not found" >&6; }
21301            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21302          fi
21303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21304$as_echo "$tool_specified" >&6; }
21305        fi
21306      fi
21307    fi
21308
21309  fi
21310
21311
21312
21313
21314  # Publish this variable in the help.
21315
21316
21317  if [ -z "${HG+x}" ]; then
21318    # The variable is not set by user, try to locate tool using the code snippet
21319    for ac_prog in hg
21320do
21321  # Extract the first word of "$ac_prog", so it can be a program name with args.
21322set dummy $ac_prog; ac_word=$2
21323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21324$as_echo_n "checking for $ac_word... " >&6; }
21325if ${ac_cv_path_HG+:} false; then :
21326  $as_echo_n "(cached) " >&6
21327else
21328  case $HG in
21329  [\\/]* | ?:[\\/]*)
21330  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21331  ;;
21332  *)
21333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21334for as_dir in $PATH
21335do
21336  IFS=$as_save_IFS
21337  test -z "$as_dir" && as_dir=.
21338    for ac_exec_ext in '' $ac_executable_extensions; do
21339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21340    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21342    break 2
21343  fi
21344done
21345  done
21346IFS=$as_save_IFS
21347
21348  ;;
21349esac
21350fi
21351HG=$ac_cv_path_HG
21352if test -n "$HG"; then
21353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21354$as_echo "$HG" >&6; }
21355else
21356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21357$as_echo "no" >&6; }
21358fi
21359
21360
21361  test -n "$HG" && break
21362done
21363
21364  else
21365    # The variable is set, but is it from the command line or the environment?
21366
21367    # Try to remove the string !HG! from our list.
21368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21370      # If it failed, the variable was not from the command line. Ignore it,
21371      # but warn the user (except for BASH, which is always set by the calling BASH).
21372      if test "xHG" != xBASH; then
21373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21374$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21375      fi
21376      # Try to locate tool using the code snippet
21377      for ac_prog in hg
21378do
21379  # Extract the first word of "$ac_prog", so it can be a program name with args.
21380set dummy $ac_prog; ac_word=$2
21381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21382$as_echo_n "checking for $ac_word... " >&6; }
21383if ${ac_cv_path_HG+:} false; then :
21384  $as_echo_n "(cached) " >&6
21385else
21386  case $HG in
21387  [\\/]* | ?:[\\/]*)
21388  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21389  ;;
21390  *)
21391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21392for as_dir in $PATH
21393do
21394  IFS=$as_save_IFS
21395  test -z "$as_dir" && as_dir=.
21396    for ac_exec_ext in '' $ac_executable_extensions; do
21397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21398    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21400    break 2
21401  fi
21402done
21403  done
21404IFS=$as_save_IFS
21405
21406  ;;
21407esac
21408fi
21409HG=$ac_cv_path_HG
21410if test -n "$HG"; then
21411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21412$as_echo "$HG" >&6; }
21413else
21414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21415$as_echo "no" >&6; }
21416fi
21417
21418
21419  test -n "$HG" && break
21420done
21421
21422    else
21423      # If it succeeded, then it was overridden by the user. We will use it
21424      # for the tool.
21425
21426      # First remove it from the list of overridden variables, so we can test
21427      # for unknown variables in the end.
21428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21429
21430      # Check if we try to supply an empty value
21431      if test "x$HG" = x; then
21432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21433$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21435$as_echo_n "checking for HG... " >&6; }
21436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21437$as_echo "disabled" >&6; }
21438      else
21439        # Check if the provided tool contains a complete path.
21440        tool_specified="$HG"
21441        tool_basename="${tool_specified##*/}"
21442        if test "x$tool_basename" = "x$tool_specified"; then
21443          # A command without a complete path is provided, search $PATH.
21444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21445$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21446          # Extract the first word of "$tool_basename", so it can be a program name with args.
21447set dummy $tool_basename; ac_word=$2
21448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21449$as_echo_n "checking for $ac_word... " >&6; }
21450if ${ac_cv_path_HG+:} false; then :
21451  $as_echo_n "(cached) " >&6
21452else
21453  case $HG in
21454  [\\/]* | ?:[\\/]*)
21455  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21456  ;;
21457  *)
21458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21459for as_dir in $PATH
21460do
21461  IFS=$as_save_IFS
21462  test -z "$as_dir" && as_dir=.
21463    for ac_exec_ext in '' $ac_executable_extensions; do
21464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21465    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21467    break 2
21468  fi
21469done
21470  done
21471IFS=$as_save_IFS
21472
21473  ;;
21474esac
21475fi
21476HG=$ac_cv_path_HG
21477if test -n "$HG"; then
21478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21479$as_echo "$HG" >&6; }
21480else
21481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21482$as_echo "no" >&6; }
21483fi
21484
21485
21486          if test "x$HG" = x; then
21487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21488          fi
21489        else
21490          # Otherwise we believe it is a complete path. Use it as it is.
21491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21492$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21494$as_echo_n "checking for HG... " >&6; }
21495          if test ! -x "$tool_specified"; then
21496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21497$as_echo "not found" >&6; }
21498            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21499          fi
21500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21501$as_echo "$tool_specified" >&6; }
21502        fi
21503      fi
21504    fi
21505
21506  fi
21507
21508
21509
21510
21511  # Publish this variable in the help.
21512
21513
21514  if [ -z "${STAT+x}" ]; then
21515    # The variable is not set by user, try to locate tool using the code snippet
21516    for ac_prog in stat
21517do
21518  # Extract the first word of "$ac_prog", so it can be a program name with args.
21519set dummy $ac_prog; ac_word=$2
21520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21521$as_echo_n "checking for $ac_word... " >&6; }
21522if ${ac_cv_path_STAT+:} false; then :
21523  $as_echo_n "(cached) " >&6
21524else
21525  case $STAT in
21526  [\\/]* | ?:[\\/]*)
21527  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21528  ;;
21529  *)
21530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21531for as_dir in $PATH
21532do
21533  IFS=$as_save_IFS
21534  test -z "$as_dir" && as_dir=.
21535    for ac_exec_ext in '' $ac_executable_extensions; do
21536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21537    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21539    break 2
21540  fi
21541done
21542  done
21543IFS=$as_save_IFS
21544
21545  ;;
21546esac
21547fi
21548STAT=$ac_cv_path_STAT
21549if test -n "$STAT"; then
21550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21551$as_echo "$STAT" >&6; }
21552else
21553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21554$as_echo "no" >&6; }
21555fi
21556
21557
21558  test -n "$STAT" && break
21559done
21560
21561  else
21562    # The variable is set, but is it from the command line or the environment?
21563
21564    # Try to remove the string !STAT! from our list.
21565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21567      # If it failed, the variable was not from the command line. Ignore it,
21568      # but warn the user (except for BASH, which is always set by the calling BASH).
21569      if test "xSTAT" != xBASH; then
21570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21571$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21572      fi
21573      # Try to locate tool using the code snippet
21574      for ac_prog in stat
21575do
21576  # Extract the first word of "$ac_prog", so it can be a program name with args.
21577set dummy $ac_prog; ac_word=$2
21578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21579$as_echo_n "checking for $ac_word... " >&6; }
21580if ${ac_cv_path_STAT+:} false; then :
21581  $as_echo_n "(cached) " >&6
21582else
21583  case $STAT in
21584  [\\/]* | ?:[\\/]*)
21585  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21586  ;;
21587  *)
21588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21589for as_dir in $PATH
21590do
21591  IFS=$as_save_IFS
21592  test -z "$as_dir" && as_dir=.
21593    for ac_exec_ext in '' $ac_executable_extensions; do
21594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21595    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21597    break 2
21598  fi
21599done
21600  done
21601IFS=$as_save_IFS
21602
21603  ;;
21604esac
21605fi
21606STAT=$ac_cv_path_STAT
21607if test -n "$STAT"; then
21608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21609$as_echo "$STAT" >&6; }
21610else
21611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21612$as_echo "no" >&6; }
21613fi
21614
21615
21616  test -n "$STAT" && break
21617done
21618
21619    else
21620      # If it succeeded, then it was overridden by the user. We will use it
21621      # for the tool.
21622
21623      # First remove it from the list of overridden variables, so we can test
21624      # for unknown variables in the end.
21625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21626
21627      # Check if we try to supply an empty value
21628      if test "x$STAT" = x; then
21629        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21630$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21632$as_echo_n "checking for STAT... " >&6; }
21633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21634$as_echo "disabled" >&6; }
21635      else
21636        # Check if the provided tool contains a complete path.
21637        tool_specified="$STAT"
21638        tool_basename="${tool_specified##*/}"
21639        if test "x$tool_basename" = "x$tool_specified"; then
21640          # A command without a complete path is provided, search $PATH.
21641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21642$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21643          # Extract the first word of "$tool_basename", so it can be a program name with args.
21644set dummy $tool_basename; ac_word=$2
21645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21646$as_echo_n "checking for $ac_word... " >&6; }
21647if ${ac_cv_path_STAT+:} false; then :
21648  $as_echo_n "(cached) " >&6
21649else
21650  case $STAT in
21651  [\\/]* | ?:[\\/]*)
21652  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21653  ;;
21654  *)
21655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21656for as_dir in $PATH
21657do
21658  IFS=$as_save_IFS
21659  test -z "$as_dir" && as_dir=.
21660    for ac_exec_ext in '' $ac_executable_extensions; do
21661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21662    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21664    break 2
21665  fi
21666done
21667  done
21668IFS=$as_save_IFS
21669
21670  ;;
21671esac
21672fi
21673STAT=$ac_cv_path_STAT
21674if test -n "$STAT"; then
21675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21676$as_echo "$STAT" >&6; }
21677else
21678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21679$as_echo "no" >&6; }
21680fi
21681
21682
21683          if test "x$STAT" = x; then
21684            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21685          fi
21686        else
21687          # Otherwise we believe it is a complete path. Use it as it is.
21688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21689$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21690          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21691$as_echo_n "checking for STAT... " >&6; }
21692          if test ! -x "$tool_specified"; then
21693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21694$as_echo "not found" >&6; }
21695            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21696          fi
21697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21698$as_echo "$tool_specified" >&6; }
21699        fi
21700      fi
21701    fi
21702
21703  fi
21704
21705
21706
21707
21708  # Publish this variable in the help.
21709
21710
21711  if [ -z "${TIME+x}" ]; then
21712    # The variable is not set by user, try to locate tool using the code snippet
21713    for ac_prog in time
21714do
21715  # Extract the first word of "$ac_prog", so it can be a program name with args.
21716set dummy $ac_prog; ac_word=$2
21717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21718$as_echo_n "checking for $ac_word... " >&6; }
21719if ${ac_cv_path_TIME+:} false; then :
21720  $as_echo_n "(cached) " >&6
21721else
21722  case $TIME in
21723  [\\/]* | ?:[\\/]*)
21724  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21725  ;;
21726  *)
21727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21728for as_dir in $PATH
21729do
21730  IFS=$as_save_IFS
21731  test -z "$as_dir" && as_dir=.
21732    for ac_exec_ext in '' $ac_executable_extensions; do
21733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21734    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21736    break 2
21737  fi
21738done
21739  done
21740IFS=$as_save_IFS
21741
21742  ;;
21743esac
21744fi
21745TIME=$ac_cv_path_TIME
21746if test -n "$TIME"; then
21747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21748$as_echo "$TIME" >&6; }
21749else
21750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21751$as_echo "no" >&6; }
21752fi
21753
21754
21755  test -n "$TIME" && break
21756done
21757
21758  else
21759    # The variable is set, but is it from the command line or the environment?
21760
21761    # Try to remove the string !TIME! from our list.
21762    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21763    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21764      # If it failed, the variable was not from the command line. Ignore it,
21765      # but warn the user (except for BASH, which is always set by the calling BASH).
21766      if test "xTIME" != xBASH; then
21767        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21768$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21769      fi
21770      # Try to locate tool using the code snippet
21771      for ac_prog in time
21772do
21773  # Extract the first word of "$ac_prog", so it can be a program name with args.
21774set dummy $ac_prog; ac_word=$2
21775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21776$as_echo_n "checking for $ac_word... " >&6; }
21777if ${ac_cv_path_TIME+:} false; then :
21778  $as_echo_n "(cached) " >&6
21779else
21780  case $TIME in
21781  [\\/]* | ?:[\\/]*)
21782  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21783  ;;
21784  *)
21785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21786for as_dir in $PATH
21787do
21788  IFS=$as_save_IFS
21789  test -z "$as_dir" && as_dir=.
21790    for ac_exec_ext in '' $ac_executable_extensions; do
21791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21792    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21794    break 2
21795  fi
21796done
21797  done
21798IFS=$as_save_IFS
21799
21800  ;;
21801esac
21802fi
21803TIME=$ac_cv_path_TIME
21804if test -n "$TIME"; then
21805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21806$as_echo "$TIME" >&6; }
21807else
21808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21809$as_echo "no" >&6; }
21810fi
21811
21812
21813  test -n "$TIME" && break
21814done
21815
21816    else
21817      # If it succeeded, then it was overridden by the user. We will use it
21818      # for the tool.
21819
21820      # First remove it from the list of overridden variables, so we can test
21821      # for unknown variables in the end.
21822      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21823
21824      # Check if we try to supply an empty value
21825      if test "x$TIME" = x; then
21826        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21827$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21829$as_echo_n "checking for TIME... " >&6; }
21830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21831$as_echo "disabled" >&6; }
21832      else
21833        # Check if the provided tool contains a complete path.
21834        tool_specified="$TIME"
21835        tool_basename="${tool_specified##*/}"
21836        if test "x$tool_basename" = "x$tool_specified"; then
21837          # A command without a complete path is provided, search $PATH.
21838          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21839$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21840          # Extract the first word of "$tool_basename", so it can be a program name with args.
21841set dummy $tool_basename; ac_word=$2
21842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21843$as_echo_n "checking for $ac_word... " >&6; }
21844if ${ac_cv_path_TIME+:} false; then :
21845  $as_echo_n "(cached) " >&6
21846else
21847  case $TIME in
21848  [\\/]* | ?:[\\/]*)
21849  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21850  ;;
21851  *)
21852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21853for as_dir in $PATH
21854do
21855  IFS=$as_save_IFS
21856  test -z "$as_dir" && as_dir=.
21857    for ac_exec_ext in '' $ac_executable_extensions; do
21858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21859    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21861    break 2
21862  fi
21863done
21864  done
21865IFS=$as_save_IFS
21866
21867  ;;
21868esac
21869fi
21870TIME=$ac_cv_path_TIME
21871if test -n "$TIME"; then
21872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21873$as_echo "$TIME" >&6; }
21874else
21875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21876$as_echo "no" >&6; }
21877fi
21878
21879
21880          if test "x$TIME" = x; then
21881            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21882          fi
21883        else
21884          # Otherwise we believe it is a complete path. Use it as it is.
21885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21886$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21887          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21888$as_echo_n "checking for TIME... " >&6; }
21889          if test ! -x "$tool_specified"; then
21890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21891$as_echo "not found" >&6; }
21892            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21893          fi
21894          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21895$as_echo "$tool_specified" >&6; }
21896        fi
21897      fi
21898    fi
21899
21900  fi
21901
21902
21903
21904
21905  # Publish this variable in the help.
21906
21907
21908  if [ -z "${PATCH+x}" ]; then
21909    # The variable is not set by user, try to locate tool using the code snippet
21910    for ac_prog in gpatch patch
21911do
21912  # Extract the first word of "$ac_prog", so it can be a program name with args.
21913set dummy $ac_prog; ac_word=$2
21914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21915$as_echo_n "checking for $ac_word... " >&6; }
21916if ${ac_cv_path_PATCH+:} false; then :
21917  $as_echo_n "(cached) " >&6
21918else
21919  case $PATCH in
21920  [\\/]* | ?:[\\/]*)
21921  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21922  ;;
21923  *)
21924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21925for as_dir in $PATH
21926do
21927  IFS=$as_save_IFS
21928  test -z "$as_dir" && as_dir=.
21929    for ac_exec_ext in '' $ac_executable_extensions; do
21930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21931    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21933    break 2
21934  fi
21935done
21936  done
21937IFS=$as_save_IFS
21938
21939  ;;
21940esac
21941fi
21942PATCH=$ac_cv_path_PATCH
21943if test -n "$PATCH"; then
21944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21945$as_echo "$PATCH" >&6; }
21946else
21947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21948$as_echo "no" >&6; }
21949fi
21950
21951
21952  test -n "$PATCH" && break
21953done
21954
21955  else
21956    # The variable is set, but is it from the command line or the environment?
21957
21958    # Try to remove the string !PATCH! from our list.
21959    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21960    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21961      # If it failed, the variable was not from the command line. Ignore it,
21962      # but warn the user (except for BASH, which is always set by the calling BASH).
21963      if test "xPATCH" != xBASH; then
21964        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21965$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21966      fi
21967      # Try to locate tool using the code snippet
21968      for ac_prog in gpatch patch
21969do
21970  # Extract the first word of "$ac_prog", so it can be a program name with args.
21971set dummy $ac_prog; ac_word=$2
21972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21973$as_echo_n "checking for $ac_word... " >&6; }
21974if ${ac_cv_path_PATCH+:} false; then :
21975  $as_echo_n "(cached) " >&6
21976else
21977  case $PATCH in
21978  [\\/]* | ?:[\\/]*)
21979  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21980  ;;
21981  *)
21982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21983for as_dir in $PATH
21984do
21985  IFS=$as_save_IFS
21986  test -z "$as_dir" && as_dir=.
21987    for ac_exec_ext in '' $ac_executable_extensions; do
21988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21989    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21991    break 2
21992  fi
21993done
21994  done
21995IFS=$as_save_IFS
21996
21997  ;;
21998esac
21999fi
22000PATCH=$ac_cv_path_PATCH
22001if test -n "$PATCH"; then
22002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22003$as_echo "$PATCH" >&6; }
22004else
22005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22006$as_echo "no" >&6; }
22007fi
22008
22009
22010  test -n "$PATCH" && break
22011done
22012
22013    else
22014      # If it succeeded, then it was overridden by the user. We will use it
22015      # for the tool.
22016
22017      # First remove it from the list of overridden variables, so we can test
22018      # for unknown variables in the end.
22019      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22020
22021      # Check if we try to supply an empty value
22022      if test "x$PATCH" = x; then
22023        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22024$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22025        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22026$as_echo_n "checking for PATCH... " >&6; }
22027        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22028$as_echo "disabled" >&6; }
22029      else
22030        # Check if the provided tool contains a complete path.
22031        tool_specified="$PATCH"
22032        tool_basename="${tool_specified##*/}"
22033        if test "x$tool_basename" = "x$tool_specified"; then
22034          # A command without a complete path is provided, search $PATH.
22035          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22036$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22037          # Extract the first word of "$tool_basename", so it can be a program name with args.
22038set dummy $tool_basename; ac_word=$2
22039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22040$as_echo_n "checking for $ac_word... " >&6; }
22041if ${ac_cv_path_PATCH+:} false; then :
22042  $as_echo_n "(cached) " >&6
22043else
22044  case $PATCH in
22045  [\\/]* | ?:[\\/]*)
22046  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22047  ;;
22048  *)
22049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22050for as_dir in $PATH
22051do
22052  IFS=$as_save_IFS
22053  test -z "$as_dir" && as_dir=.
22054    for ac_exec_ext in '' $ac_executable_extensions; do
22055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22056    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22058    break 2
22059  fi
22060done
22061  done
22062IFS=$as_save_IFS
22063
22064  ;;
22065esac
22066fi
22067PATCH=$ac_cv_path_PATCH
22068if test -n "$PATCH"; then
22069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22070$as_echo "$PATCH" >&6; }
22071else
22072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22073$as_echo "no" >&6; }
22074fi
22075
22076
22077          if test "x$PATCH" = x; then
22078            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22079          fi
22080        else
22081          # Otherwise we believe it is a complete path. Use it as it is.
22082          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22083$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22084          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22085$as_echo_n "checking for PATCH... " >&6; }
22086          if test ! -x "$tool_specified"; then
22087            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22088$as_echo "not found" >&6; }
22089            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22090          fi
22091          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22092$as_echo "$tool_specified" >&6; }
22093        fi
22094      fi
22095    fi
22096
22097  fi
22098
22099
22100  # Check if it's GNU time
22101  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22102  if test "x$IS_GNU_TIME" != x; then
22103    IS_GNU_TIME=yes
22104  else
22105    IS_GNU_TIME=no
22106  fi
22107
22108
22109  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22110
22111
22112
22113  # Publish this variable in the help.
22114
22115
22116  if [ -z "${DSYMUTIL+x}" ]; then
22117    # The variable is not set by user, try to locate tool using the code snippet
22118    for ac_prog in dsymutil
22119do
22120  # Extract the first word of "$ac_prog", so it can be a program name with args.
22121set dummy $ac_prog; ac_word=$2
22122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22123$as_echo_n "checking for $ac_word... " >&6; }
22124if ${ac_cv_path_DSYMUTIL+:} false; then :
22125  $as_echo_n "(cached) " >&6
22126else
22127  case $DSYMUTIL in
22128  [\\/]* | ?:[\\/]*)
22129  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22130  ;;
22131  *)
22132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22133for as_dir in $PATH
22134do
22135  IFS=$as_save_IFS
22136  test -z "$as_dir" && as_dir=.
22137    for ac_exec_ext in '' $ac_executable_extensions; do
22138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22139    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22141    break 2
22142  fi
22143done
22144  done
22145IFS=$as_save_IFS
22146
22147  ;;
22148esac
22149fi
22150DSYMUTIL=$ac_cv_path_DSYMUTIL
22151if test -n "$DSYMUTIL"; then
22152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22153$as_echo "$DSYMUTIL" >&6; }
22154else
22155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22156$as_echo "no" >&6; }
22157fi
22158
22159
22160  test -n "$DSYMUTIL" && break
22161done
22162
22163  else
22164    # The variable is set, but is it from the command line or the environment?
22165
22166    # Try to remove the string !DSYMUTIL! from our list.
22167    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22168    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22169      # If it failed, the variable was not from the command line. Ignore it,
22170      # but warn the user (except for BASH, which is always set by the calling BASH).
22171      if test "xDSYMUTIL" != xBASH; then
22172        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22173$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22174      fi
22175      # Try to locate tool using the code snippet
22176      for ac_prog in dsymutil
22177do
22178  # Extract the first word of "$ac_prog", so it can be a program name with args.
22179set dummy $ac_prog; ac_word=$2
22180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22181$as_echo_n "checking for $ac_word... " >&6; }
22182if ${ac_cv_path_DSYMUTIL+:} false; then :
22183  $as_echo_n "(cached) " >&6
22184else
22185  case $DSYMUTIL in
22186  [\\/]* | ?:[\\/]*)
22187  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22188  ;;
22189  *)
22190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22191for as_dir in $PATH
22192do
22193  IFS=$as_save_IFS
22194  test -z "$as_dir" && as_dir=.
22195    for ac_exec_ext in '' $ac_executable_extensions; do
22196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22197    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22199    break 2
22200  fi
22201done
22202  done
22203IFS=$as_save_IFS
22204
22205  ;;
22206esac
22207fi
22208DSYMUTIL=$ac_cv_path_DSYMUTIL
22209if test -n "$DSYMUTIL"; then
22210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22211$as_echo "$DSYMUTIL" >&6; }
22212else
22213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22214$as_echo "no" >&6; }
22215fi
22216
22217
22218  test -n "$DSYMUTIL" && break
22219done
22220
22221    else
22222      # If it succeeded, then it was overridden by the user. We will use it
22223      # for the tool.
22224
22225      # First remove it from the list of overridden variables, so we can test
22226      # for unknown variables in the end.
22227      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22228
22229      # Check if we try to supply an empty value
22230      if test "x$DSYMUTIL" = x; then
22231        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22232$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22234$as_echo_n "checking for DSYMUTIL... " >&6; }
22235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22236$as_echo "disabled" >&6; }
22237      else
22238        # Check if the provided tool contains a complete path.
22239        tool_specified="$DSYMUTIL"
22240        tool_basename="${tool_specified##*/}"
22241        if test "x$tool_basename" = "x$tool_specified"; then
22242          # A command without a complete path is provided, search $PATH.
22243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22244$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22245          # Extract the first word of "$tool_basename", so it can be a program name with args.
22246set dummy $tool_basename; ac_word=$2
22247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22248$as_echo_n "checking for $ac_word... " >&6; }
22249if ${ac_cv_path_DSYMUTIL+:} false; then :
22250  $as_echo_n "(cached) " >&6
22251else
22252  case $DSYMUTIL in
22253  [\\/]* | ?:[\\/]*)
22254  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22255  ;;
22256  *)
22257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22258for as_dir in $PATH
22259do
22260  IFS=$as_save_IFS
22261  test -z "$as_dir" && as_dir=.
22262    for ac_exec_ext in '' $ac_executable_extensions; do
22263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22264    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22266    break 2
22267  fi
22268done
22269  done
22270IFS=$as_save_IFS
22271
22272  ;;
22273esac
22274fi
22275DSYMUTIL=$ac_cv_path_DSYMUTIL
22276if test -n "$DSYMUTIL"; then
22277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22278$as_echo "$DSYMUTIL" >&6; }
22279else
22280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22281$as_echo "no" >&6; }
22282fi
22283
22284
22285          if test "x$DSYMUTIL" = x; then
22286            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22287          fi
22288        else
22289          # Otherwise we believe it is a complete path. Use it as it is.
22290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22291$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22292          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22293$as_echo_n "checking for DSYMUTIL... " >&6; }
22294          if test ! -x "$tool_specified"; then
22295            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22296$as_echo "not found" >&6; }
22297            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22298          fi
22299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22300$as_echo "$tool_specified" >&6; }
22301        fi
22302      fi
22303    fi
22304
22305  fi
22306
22307
22308
22309  if test "x$DSYMUTIL" = x; then
22310    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22311  fi
22312
22313
22314
22315
22316
22317  # Publish this variable in the help.
22318
22319
22320  if [ -z "${XATTR+x}" ]; then
22321    # The variable is not set by user, try to locate tool using the code snippet
22322    for ac_prog in xattr
22323do
22324  # Extract the first word of "$ac_prog", so it can be a program name with args.
22325set dummy $ac_prog; ac_word=$2
22326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22327$as_echo_n "checking for $ac_word... " >&6; }
22328if ${ac_cv_path_XATTR+:} false; then :
22329  $as_echo_n "(cached) " >&6
22330else
22331  case $XATTR in
22332  [\\/]* | ?:[\\/]*)
22333  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22334  ;;
22335  *)
22336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22337for as_dir in $PATH
22338do
22339  IFS=$as_save_IFS
22340  test -z "$as_dir" && as_dir=.
22341    for ac_exec_ext in '' $ac_executable_extensions; do
22342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22343    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22345    break 2
22346  fi
22347done
22348  done
22349IFS=$as_save_IFS
22350
22351  ;;
22352esac
22353fi
22354XATTR=$ac_cv_path_XATTR
22355if test -n "$XATTR"; then
22356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22357$as_echo "$XATTR" >&6; }
22358else
22359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22360$as_echo "no" >&6; }
22361fi
22362
22363
22364  test -n "$XATTR" && break
22365done
22366
22367  else
22368    # The variable is set, but is it from the command line or the environment?
22369
22370    # Try to remove the string !XATTR! from our list.
22371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22373      # If it failed, the variable was not from the command line. Ignore it,
22374      # but warn the user (except for BASH, which is always set by the calling BASH).
22375      if test "xXATTR" != xBASH; then
22376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22377$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22378      fi
22379      # Try to locate tool using the code snippet
22380      for ac_prog in xattr
22381do
22382  # Extract the first word of "$ac_prog", so it can be a program name with args.
22383set dummy $ac_prog; ac_word=$2
22384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22385$as_echo_n "checking for $ac_word... " >&6; }
22386if ${ac_cv_path_XATTR+:} false; then :
22387  $as_echo_n "(cached) " >&6
22388else
22389  case $XATTR in
22390  [\\/]* | ?:[\\/]*)
22391  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22392  ;;
22393  *)
22394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22395for as_dir in $PATH
22396do
22397  IFS=$as_save_IFS
22398  test -z "$as_dir" && as_dir=.
22399    for ac_exec_ext in '' $ac_executable_extensions; do
22400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22401    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22403    break 2
22404  fi
22405done
22406  done
22407IFS=$as_save_IFS
22408
22409  ;;
22410esac
22411fi
22412XATTR=$ac_cv_path_XATTR
22413if test -n "$XATTR"; then
22414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22415$as_echo "$XATTR" >&6; }
22416else
22417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22418$as_echo "no" >&6; }
22419fi
22420
22421
22422  test -n "$XATTR" && break
22423done
22424
22425    else
22426      # If it succeeded, then it was overridden by the user. We will use it
22427      # for the tool.
22428
22429      # First remove it from the list of overridden variables, so we can test
22430      # for unknown variables in the end.
22431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22432
22433      # Check if we try to supply an empty value
22434      if test "x$XATTR" = x; then
22435        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22436$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22437        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22438$as_echo_n "checking for XATTR... " >&6; }
22439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22440$as_echo "disabled" >&6; }
22441      else
22442        # Check if the provided tool contains a complete path.
22443        tool_specified="$XATTR"
22444        tool_basename="${tool_specified##*/}"
22445        if test "x$tool_basename" = "x$tool_specified"; then
22446          # A command without a complete path is provided, search $PATH.
22447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22448$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22449          # Extract the first word of "$tool_basename", so it can be a program name with args.
22450set dummy $tool_basename; ac_word=$2
22451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22452$as_echo_n "checking for $ac_word... " >&6; }
22453if ${ac_cv_path_XATTR+:} false; then :
22454  $as_echo_n "(cached) " >&6
22455else
22456  case $XATTR in
22457  [\\/]* | ?:[\\/]*)
22458  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22459  ;;
22460  *)
22461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22462for as_dir in $PATH
22463do
22464  IFS=$as_save_IFS
22465  test -z "$as_dir" && as_dir=.
22466    for ac_exec_ext in '' $ac_executable_extensions; do
22467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22468    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22470    break 2
22471  fi
22472done
22473  done
22474IFS=$as_save_IFS
22475
22476  ;;
22477esac
22478fi
22479XATTR=$ac_cv_path_XATTR
22480if test -n "$XATTR"; then
22481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22482$as_echo "$XATTR" >&6; }
22483else
22484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22485$as_echo "no" >&6; }
22486fi
22487
22488
22489          if test "x$XATTR" = x; then
22490            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22491          fi
22492        else
22493          # Otherwise we believe it is a complete path. Use it as it is.
22494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22495$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22496          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22497$as_echo_n "checking for XATTR... " >&6; }
22498          if test ! -x "$tool_specified"; then
22499            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22500$as_echo "not found" >&6; }
22501            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22502          fi
22503          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22504$as_echo "$tool_specified" >&6; }
22505        fi
22506      fi
22507    fi
22508
22509  fi
22510
22511
22512
22513  if test "x$XATTR" = x; then
22514    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22515  fi
22516
22517
22518
22519
22520  # Publish this variable in the help.
22521
22522
22523  if [ -z "${CODESIGN+x}" ]; then
22524    # The variable is not set by user, try to locate tool using the code snippet
22525    for ac_prog in codesign
22526do
22527  # Extract the first word of "$ac_prog", so it can be a program name with args.
22528set dummy $ac_prog; ac_word=$2
22529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22530$as_echo_n "checking for $ac_word... " >&6; }
22531if ${ac_cv_path_CODESIGN+:} false; then :
22532  $as_echo_n "(cached) " >&6
22533else
22534  case $CODESIGN in
22535  [\\/]* | ?:[\\/]*)
22536  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22537  ;;
22538  *)
22539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22540for as_dir in $PATH
22541do
22542  IFS=$as_save_IFS
22543  test -z "$as_dir" && as_dir=.
22544    for ac_exec_ext in '' $ac_executable_extensions; do
22545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22546    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22548    break 2
22549  fi
22550done
22551  done
22552IFS=$as_save_IFS
22553
22554  ;;
22555esac
22556fi
22557CODESIGN=$ac_cv_path_CODESIGN
22558if test -n "$CODESIGN"; then
22559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22560$as_echo "$CODESIGN" >&6; }
22561else
22562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22563$as_echo "no" >&6; }
22564fi
22565
22566
22567  test -n "$CODESIGN" && break
22568done
22569
22570  else
22571    # The variable is set, but is it from the command line or the environment?
22572
22573    # Try to remove the string !CODESIGN! from our list.
22574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22576      # If it failed, the variable was not from the command line. Ignore it,
22577      # but warn the user (except for BASH, which is always set by the calling BASH).
22578      if test "xCODESIGN" != xBASH; then
22579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22580$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22581      fi
22582      # Try to locate tool using the code snippet
22583      for ac_prog in codesign
22584do
22585  # Extract the first word of "$ac_prog", so it can be a program name with args.
22586set dummy $ac_prog; ac_word=$2
22587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22588$as_echo_n "checking for $ac_word... " >&6; }
22589if ${ac_cv_path_CODESIGN+:} false; then :
22590  $as_echo_n "(cached) " >&6
22591else
22592  case $CODESIGN in
22593  [\\/]* | ?:[\\/]*)
22594  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22595  ;;
22596  *)
22597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22598for as_dir in $PATH
22599do
22600  IFS=$as_save_IFS
22601  test -z "$as_dir" && as_dir=.
22602    for ac_exec_ext in '' $ac_executable_extensions; do
22603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22604    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22606    break 2
22607  fi
22608done
22609  done
22610IFS=$as_save_IFS
22611
22612  ;;
22613esac
22614fi
22615CODESIGN=$ac_cv_path_CODESIGN
22616if test -n "$CODESIGN"; then
22617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22618$as_echo "$CODESIGN" >&6; }
22619else
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22621$as_echo "no" >&6; }
22622fi
22623
22624
22625  test -n "$CODESIGN" && break
22626done
22627
22628    else
22629      # If it succeeded, then it was overridden by the user. We will use it
22630      # for the tool.
22631
22632      # First remove it from the list of overridden variables, so we can test
22633      # for unknown variables in the end.
22634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22635
22636      # Check if we try to supply an empty value
22637      if test "x$CODESIGN" = x; then
22638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22639$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22641$as_echo_n "checking for CODESIGN... " >&6; }
22642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22643$as_echo "disabled" >&6; }
22644      else
22645        # Check if the provided tool contains a complete path.
22646        tool_specified="$CODESIGN"
22647        tool_basename="${tool_specified##*/}"
22648        if test "x$tool_basename" = "x$tool_specified"; then
22649          # A command without a complete path is provided, search $PATH.
22650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22651$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22652          # Extract the first word of "$tool_basename", so it can be a program name with args.
22653set dummy $tool_basename; ac_word=$2
22654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22655$as_echo_n "checking for $ac_word... " >&6; }
22656if ${ac_cv_path_CODESIGN+:} false; then :
22657  $as_echo_n "(cached) " >&6
22658else
22659  case $CODESIGN in
22660  [\\/]* | ?:[\\/]*)
22661  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22662  ;;
22663  *)
22664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22665for as_dir in $PATH
22666do
22667  IFS=$as_save_IFS
22668  test -z "$as_dir" && as_dir=.
22669    for ac_exec_ext in '' $ac_executable_extensions; do
22670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22671    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22673    break 2
22674  fi
22675done
22676  done
22677IFS=$as_save_IFS
22678
22679  ;;
22680esac
22681fi
22682CODESIGN=$ac_cv_path_CODESIGN
22683if test -n "$CODESIGN"; then
22684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22685$as_echo "$CODESIGN" >&6; }
22686else
22687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22688$as_echo "no" >&6; }
22689fi
22690
22691
22692          if test "x$CODESIGN" = x; then
22693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22694          fi
22695        else
22696          # Otherwise we believe it is a complete path. Use it as it is.
22697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22698$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22700$as_echo_n "checking for CODESIGN... " >&6; }
22701          if test ! -x "$tool_specified"; then
22702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22703$as_echo "not found" >&6; }
22704            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22705          fi
22706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22707$as_echo "$tool_specified" >&6; }
22708        fi
22709      fi
22710    fi
22711
22712  fi
22713
22714
22715    if test "x$CODESIGN" != "x"; then
22716      # Verify that the openjdk_codesign certificate is present
22717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22718$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22719      rm -f codesign-testfile
22720      touch codesign-testfile
22721      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22722      rm -f codesign-testfile
22723      if test "x$CODESIGN" = x; then
22724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22725$as_echo "no" >&6; }
22726      else
22727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22728$as_echo "yes" >&6; }
22729      fi
22730    fi
22731
22732
22733
22734  # Publish this variable in the help.
22735
22736
22737  if [ -z "${SETFILE+x}" ]; then
22738    # The variable is not set by user, try to locate tool using the code snippet
22739    for ac_prog in SetFile
22740do
22741  # Extract the first word of "$ac_prog", so it can be a program name with args.
22742set dummy $ac_prog; ac_word=$2
22743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22744$as_echo_n "checking for $ac_word... " >&6; }
22745if ${ac_cv_path_SETFILE+:} false; then :
22746  $as_echo_n "(cached) " >&6
22747else
22748  case $SETFILE in
22749  [\\/]* | ?:[\\/]*)
22750  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22751  ;;
22752  *)
22753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22754for as_dir in $PATH
22755do
22756  IFS=$as_save_IFS
22757  test -z "$as_dir" && as_dir=.
22758    for ac_exec_ext in '' $ac_executable_extensions; do
22759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22760    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22762    break 2
22763  fi
22764done
22765  done
22766IFS=$as_save_IFS
22767
22768  ;;
22769esac
22770fi
22771SETFILE=$ac_cv_path_SETFILE
22772if test -n "$SETFILE"; then
22773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22774$as_echo "$SETFILE" >&6; }
22775else
22776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22777$as_echo "no" >&6; }
22778fi
22779
22780
22781  test -n "$SETFILE" && break
22782done
22783
22784  else
22785    # The variable is set, but is it from the command line or the environment?
22786
22787    # Try to remove the string !SETFILE! from our list.
22788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22790      # If it failed, the variable was not from the command line. Ignore it,
22791      # but warn the user (except for BASH, which is always set by the calling BASH).
22792      if test "xSETFILE" != xBASH; then
22793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22794$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22795      fi
22796      # Try to locate tool using the code snippet
22797      for ac_prog in SetFile
22798do
22799  # Extract the first word of "$ac_prog", so it can be a program name with args.
22800set dummy $ac_prog; ac_word=$2
22801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22802$as_echo_n "checking for $ac_word... " >&6; }
22803if ${ac_cv_path_SETFILE+:} false; then :
22804  $as_echo_n "(cached) " >&6
22805else
22806  case $SETFILE in
22807  [\\/]* | ?:[\\/]*)
22808  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22809  ;;
22810  *)
22811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22812for as_dir in $PATH
22813do
22814  IFS=$as_save_IFS
22815  test -z "$as_dir" && as_dir=.
22816    for ac_exec_ext in '' $ac_executable_extensions; do
22817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22818    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22820    break 2
22821  fi
22822done
22823  done
22824IFS=$as_save_IFS
22825
22826  ;;
22827esac
22828fi
22829SETFILE=$ac_cv_path_SETFILE
22830if test -n "$SETFILE"; then
22831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22832$as_echo "$SETFILE" >&6; }
22833else
22834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22835$as_echo "no" >&6; }
22836fi
22837
22838
22839  test -n "$SETFILE" && break
22840done
22841
22842    else
22843      # If it succeeded, then it was overridden by the user. We will use it
22844      # for the tool.
22845
22846      # First remove it from the list of overridden variables, so we can test
22847      # for unknown variables in the end.
22848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22849
22850      # Check if we try to supply an empty value
22851      if test "x$SETFILE" = x; then
22852        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22853$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22855$as_echo_n "checking for SETFILE... " >&6; }
22856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22857$as_echo "disabled" >&6; }
22858      else
22859        # Check if the provided tool contains a complete path.
22860        tool_specified="$SETFILE"
22861        tool_basename="${tool_specified##*/}"
22862        if test "x$tool_basename" = "x$tool_specified"; then
22863          # A command without a complete path is provided, search $PATH.
22864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22865$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22866          # Extract the first word of "$tool_basename", so it can be a program name with args.
22867set dummy $tool_basename; ac_word=$2
22868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22869$as_echo_n "checking for $ac_word... " >&6; }
22870if ${ac_cv_path_SETFILE+:} false; then :
22871  $as_echo_n "(cached) " >&6
22872else
22873  case $SETFILE in
22874  [\\/]* | ?:[\\/]*)
22875  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22876  ;;
22877  *)
22878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22879for as_dir in $PATH
22880do
22881  IFS=$as_save_IFS
22882  test -z "$as_dir" && as_dir=.
22883    for ac_exec_ext in '' $ac_executable_extensions; do
22884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22885    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22887    break 2
22888  fi
22889done
22890  done
22891IFS=$as_save_IFS
22892
22893  ;;
22894esac
22895fi
22896SETFILE=$ac_cv_path_SETFILE
22897if test -n "$SETFILE"; then
22898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22899$as_echo "$SETFILE" >&6; }
22900else
22901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22902$as_echo "no" >&6; }
22903fi
22904
22905
22906          if test "x$SETFILE" = x; then
22907            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22908          fi
22909        else
22910          # Otherwise we believe it is a complete path. Use it as it is.
22911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22912$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22913          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22914$as_echo_n "checking for SETFILE... " >&6; }
22915          if test ! -x "$tool_specified"; then
22916            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22917$as_echo "not found" >&6; }
22918            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22919          fi
22920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22921$as_echo "$tool_specified" >&6; }
22922        fi
22923      fi
22924    fi
22925
22926  fi
22927
22928
22929
22930  if test "x$SETFILE" = x; then
22931    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22932  fi
22933
22934
22935  fi
22936
22937
22938  # Test if bash supports pipefail.
22939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22940$as_echo_n "checking if bash supports pipefail... " >&6; }
22941  if ${BASH} -c 'set -o pipefail'; then
22942    BASH_ARGS="$BASH_ARGS -o pipefail"
22943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22944$as_echo "yes" >&6; }
22945  else
22946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22947$as_echo "no" >&6; }
22948  fi
22949
22950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22951$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22952  if ${BASH} -e -c 'true'; then
22953    BASH_ARGS="$BASH_ARGS -e"
22954    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22955$as_echo "yes" >&6; }
22956  else
22957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22958$as_echo "no" >&6; }
22959  fi
22960
22961
22962
22963
22964# Check if pkg-config is available.
22965
22966
22967if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22968	if test -n "$ac_tool_prefix"; then
22969  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22970set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22972$as_echo_n "checking for $ac_word... " >&6; }
22973if ${ac_cv_path_PKG_CONFIG+:} false; then :
22974  $as_echo_n "(cached) " >&6
22975else
22976  case $PKG_CONFIG in
22977  [\\/]* | ?:[\\/]*)
22978  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22979  ;;
22980  *)
22981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22982for as_dir in $PATH
22983do
22984  IFS=$as_save_IFS
22985  test -z "$as_dir" && as_dir=.
22986    for ac_exec_ext in '' $ac_executable_extensions; do
22987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22988    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22990    break 2
22991  fi
22992done
22993  done
22994IFS=$as_save_IFS
22995
22996  ;;
22997esac
22998fi
22999PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23000if test -n "$PKG_CONFIG"; then
23001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23002$as_echo "$PKG_CONFIG" >&6; }
23003else
23004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23005$as_echo "no" >&6; }
23006fi
23007
23008
23009fi
23010if test -z "$ac_cv_path_PKG_CONFIG"; then
23011  ac_pt_PKG_CONFIG=$PKG_CONFIG
23012  # Extract the first word of "pkg-config", so it can be a program name with args.
23013set dummy pkg-config; ac_word=$2
23014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23015$as_echo_n "checking for $ac_word... " >&6; }
23016if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23017  $as_echo_n "(cached) " >&6
23018else
23019  case $ac_pt_PKG_CONFIG in
23020  [\\/]* | ?:[\\/]*)
23021  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23022  ;;
23023  *)
23024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23025for as_dir in $PATH
23026do
23027  IFS=$as_save_IFS
23028  test -z "$as_dir" && as_dir=.
23029    for ac_exec_ext in '' $ac_executable_extensions; do
23030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23031    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23033    break 2
23034  fi
23035done
23036  done
23037IFS=$as_save_IFS
23038
23039  ;;
23040esac
23041fi
23042ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23043if test -n "$ac_pt_PKG_CONFIG"; then
23044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23045$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23046else
23047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23048$as_echo "no" >&6; }
23049fi
23050
23051  if test "x$ac_pt_PKG_CONFIG" = x; then
23052    PKG_CONFIG=""
23053  else
23054    case $cross_compiling:$ac_tool_warned in
23055yes:)
23056{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23057$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23058ac_tool_warned=yes ;;
23059esac
23060    PKG_CONFIG=$ac_pt_PKG_CONFIG
23061  fi
23062else
23063  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23064fi
23065
23066fi
23067if test -n "$PKG_CONFIG"; then
23068	_pkg_min_version=0.9.0
23069	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23070$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23071	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23072		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23073$as_echo "yes" >&6; }
23074	else
23075		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23076$as_echo "no" >&6; }
23077		PKG_CONFIG=""
23078	fi
23079
23080fi
23081
23082# After basic tools have been setup, we can check build os specific details.
23083
23084  ###############################################################################
23085
23086  # Note that this is the build platform OS version!
23087
23088  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23089  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23090  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23091  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23092
23093
23094
23095
23096
23097# Misc basic settings
23098
23099
23100# Check whether --with-default-make-target was given.
23101if test "${with_default_make_target+set}" = set; then :
23102  withval=$with_default_make_target;
23103fi
23104
23105  if test "x$with_default_make_target" = "x" \
23106      || test "x$with_default_make_target" = "xyes"; then
23107    DEFAULT_MAKE_TARGET="exploded-image"
23108  elif test "x$with_default_make_target" = "xno"; then
23109    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23110  else
23111    DEFAULT_MAKE_TARGET="$with_default_make_target"
23112  fi
23113
23114
23115
23116
23117###############################################################################
23118#
23119# Determine OpenJDK variants, options and version numbers.
23120#
23121###############################################################################
23122
23123# We need build & target for this.
23124
23125
23126  ###############################################################################
23127  #
23128  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23129  # We always build headless support.
23130  #
23131  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23132$as_echo_n "checking headful support... " >&6; }
23133  # Check whether --enable-headful was given.
23134if test "${enable_headful+set}" = set; then :
23135  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23136else
23137  SUPPORT_HEADFUL=yes
23138fi
23139
23140
23141  SUPPORT_HEADLESS=yes
23142  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23143
23144  if test "x$SUPPORT_HEADFUL" = xyes; then
23145    # We are building both headful and headless.
23146    headful_msg="include support for both headful and headless"
23147  fi
23148
23149  if test "x$SUPPORT_HEADFUL" = xno; then
23150    # Thus we are building headless only.
23151    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23152    headful_msg="headless only"
23153  fi
23154
23155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23156$as_echo "$headful_msg" >&6; }
23157
23158
23159
23160
23161
23162  # Control wether Hotspot runs Queens test after build.
23163  # Check whether --enable-hotspot-test-in-build was given.
23164if test "${enable_hotspot_test_in_build+set}" = set; then :
23165  enableval=$enable_hotspot_test_in_build;
23166else
23167  enable_hotspot_test_in_build=no
23168fi
23169
23170  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23171    TEST_IN_BUILD=true
23172  else
23173    TEST_IN_BUILD=false
23174  fi
23175
23176
23177  ###############################################################################
23178  #
23179  # Choose cacerts source file
23180  #
23181
23182# Check whether --with-cacerts-file was given.
23183if test "${with_cacerts_file+set}" = set; then :
23184  withval=$with_cacerts_file;
23185fi
23186
23187  if test "x$with_cacerts_file" != x; then
23188    CACERTS_FILE=$with_cacerts_file
23189  fi
23190
23191
23192  ###############################################################################
23193  #
23194  # Enable or disable unlimited crypto
23195  #
23196  # Check whether --enable-unlimited-crypto was given.
23197if test "${enable_unlimited_crypto+set}" = set; then :
23198  enableval=$enable_unlimited_crypto;
23199else
23200  enable_unlimited_crypto=no
23201fi
23202
23203  if test "x$enable_unlimited_crypto" = "xyes"; then
23204    UNLIMITED_CRYPTO=true
23205  else
23206    UNLIMITED_CRYPTO=false
23207  fi
23208
23209
23210  ###############################################################################
23211  #
23212  # Compress jars
23213  #
23214  COMPRESS_JARS=false
23215
23216
23217
23218  # Setup default copyright year. Mostly overridden when building close to a new year.
23219
23220# Check whether --with-copyright-year was given.
23221if test "${with_copyright_year+set}" = set; then :
23222  withval=$with_copyright_year;
23223fi
23224
23225  if test "x$with_copyright_year" = xyes; then
23226    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23227  elif test "x$with_copyright_year" != x; then
23228    COPYRIGHT_YEAR="$with_copyright_year"
23229  else
23230    COPYRIGHT_YEAR=`date +'%Y'`
23231  fi
23232
23233
23234
23235  # Warn user that old version arguments are deprecated.
23236
23237
23238# Check whether --with-milestone was given.
23239if test "${with_milestone+set}" = set; then :
23240  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23241$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23242fi
23243
23244
23245
23246
23247# Check whether --with-update-version was given.
23248if test "${with_update_version+set}" = set; then :
23249  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23250$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23251fi
23252
23253
23254
23255
23256# Check whether --with-user-release-suffix was given.
23257if test "${with_user_release_suffix+set}" = set; then :
23258  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
23259$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23260fi
23261
23262
23263
23264
23265# Check whether --with-build-number was given.
23266if test "${with_build_number+set}" = set; then :
23267  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23268$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23269fi
23270
23271
23272
23273  # Source the version numbers file
23274  . $AUTOCONF_DIR/version-numbers
23275
23276  # Some non-version number information is set in that file
23277
23278
23279
23280
23281
23282
23283
23284
23285  # Override version from arguments
23286
23287  # If --with-version-string is set, process it first. It is possible to
23288  # override parts with more specific flags, since these are processed later.
23289
23290# Check whether --with-version-string was given.
23291if test "${with_version_string+set}" = set; then :
23292  withval=$with_version_string;
23293fi
23294
23295  if test "x$with_version_string" = xyes; then
23296    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23297  elif test "x$with_version_string" != x; then
23298    # Additional [] needed to keep m4 from mangling shell constructs.
23299    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23300      VERSION_MAJOR=${BASH_REMATCH[1]}
23301      VERSION_MINOR=${BASH_REMATCH[3]}
23302      VERSION_SECURITY=${BASH_REMATCH[5]}
23303      VERSION_PATCH=${BASH_REMATCH[7]}
23304      VERSION_PRE=${BASH_REMATCH[9]}
23305      version_plus_separator=${BASH_REMATCH[11]}
23306      VERSION_BUILD=${BASH_REMATCH[12]}
23307      VERSION_OPT=${BASH_REMATCH[14]}
23308      # Unspecified numerical fields are interpreted as 0.
23309      if test "x$VERSION_MINOR" = x; then
23310        VERSION_MINOR=0
23311      fi
23312      if test "x$VERSION_SECURITY" = x; then
23313        VERSION_SECURITY=0
23314      fi
23315      if test "x$VERSION_PATCH" = x; then
23316        VERSION_PATCH=0
23317      fi
23318      if test "x$version_plus_separator" != x \
23319          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23320        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23321      fi
23322      # Stop the version part process from setting default values.
23323      # We still allow them to explicitely override though.
23324      NO_DEFAULT_VERSION_PARTS=true
23325    else
23326      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23327    fi
23328  fi
23329
23330
23331# Check whether --with-version-pre was given.
23332if test "${with_version_pre+set}" = set; then :
23333  withval=$with_version_pre; with_version_pre_present=true
23334else
23335  with_version_pre_present=false
23336fi
23337
23338
23339  if test "x$with_version_pre_present" = xtrue; then
23340    if test "x$with_version_pre" = xyes; then
23341      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23342    elif test "x$with_version_pre" = xno; then
23343      # Interpret --without-* as empty string instead of the literal "no"
23344      VERSION_PRE=
23345    else
23346      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23347       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23348      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23350$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23351      fi
23352    fi
23353  else
23354    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23355      # Default is to use "internal" as pre
23356      VERSION_PRE="internal"
23357    fi
23358  fi
23359
23360
23361# Check whether --with-version-opt was given.
23362if test "${with_version_opt+set}" = set; then :
23363  withval=$with_version_opt; with_version_opt_present=true
23364else
23365  with_version_opt_present=false
23366fi
23367
23368
23369  if test "x$with_version_opt_present" = xtrue; then
23370    if test "x$with_version_opt" = xyes; then
23371      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23372    elif test "x$with_version_opt" = xno; then
23373      # Interpret --without-* as empty string instead of the literal "no"
23374      VERSION_OPT=
23375    else
23376      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23377       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23378      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23380$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23381      fi
23382    fi
23383  else
23384    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23385      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23386      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23387      # Outer [ ] to quote m4.
23388       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23389       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23390      VERSION_OPT="$timestamp.$username.$basedirname"
23391    fi
23392  fi
23393
23394
23395# Check whether --with-version-build was given.
23396if test "${with_version_build+set}" = set; then :
23397  withval=$with_version_build; with_version_build_present=true
23398else
23399  with_version_build_present=false
23400fi
23401
23402
23403  if test "x$with_version_build_present" = xtrue; then
23404    if test "x$with_version_build" = xyes; then
23405      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23406    elif test "x$with_version_build" = xno; then
23407      # Interpret --without-* as empty string instead of the literal "no"
23408      VERSION_BUILD=
23409    elif test "x$with_version_build" = x; then
23410      VERSION_BUILD=
23411    else
23412
23413  # Additional [] needed to keep m4 from mangling shell constructs.
23414  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23415    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23416  fi
23417  # Extract the version number without leading zeros.
23418  cleaned_value=${BASH_REMATCH[1]}
23419  if test "x$cleaned_value" = x; then
23420    # Special case for zero
23421    cleaned_value=${BASH_REMATCH[2]}
23422  fi
23423
23424  if test $cleaned_value -gt 255; then
23425    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23426  fi
23427  if test "x$cleaned_value" != "x$with_version_build"; then
23428    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23429$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23430  fi
23431  VERSION_BUILD=$cleaned_value
23432
23433    fi
23434  else
23435    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23436      # Default is to not have a build number.
23437      VERSION_BUILD=""
23438      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23439      VERSION_BUILD=0
23440    fi
23441  fi
23442
23443
23444# Check whether --with-version-major was given.
23445if test "${with_version_major+set}" = set; then :
23446  withval=$with_version_major; with_version_major_present=true
23447else
23448  with_version_major_present=false
23449fi
23450
23451
23452  if test "x$with_version_major_present" = xtrue; then
23453    if test "x$with_version_major" = xyes; then
23454      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23455    else
23456
23457  # Additional [] needed to keep m4 from mangling shell constructs.
23458  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23459    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23460  fi
23461  # Extract the version number without leading zeros.
23462  cleaned_value=${BASH_REMATCH[1]}
23463  if test "x$cleaned_value" = x; then
23464    # Special case for zero
23465    cleaned_value=${BASH_REMATCH[2]}
23466  fi
23467
23468  if test $cleaned_value -gt 255; then
23469    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23470  fi
23471  if test "x$cleaned_value" != "x$with_version_major"; then
23472    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23473$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23474  fi
23475  VERSION_MAJOR=$cleaned_value
23476
23477    fi
23478  else
23479    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23480      # Default is to get value from version-numbers
23481      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23482    fi
23483  fi
23484
23485
23486# Check whether --with-version-minor was given.
23487if test "${with_version_minor+set}" = set; then :
23488  withval=$with_version_minor; with_version_minor_present=true
23489else
23490  with_version_minor_present=false
23491fi
23492
23493
23494  if test "x$with_version_minor_present" = xtrue; then
23495    if test "x$with_version_minor" = xyes; then
23496      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23497    elif test "x$with_version_minor" = xno; then
23498      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23499      VERSION_MINOR=0
23500    elif test "x$with_version_minor" = x; then
23501      VERSION_MINOR=0
23502    else
23503
23504  # Additional [] needed to keep m4 from mangling shell constructs.
23505  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23506    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23507  fi
23508  # Extract the version number without leading zeros.
23509  cleaned_value=${BASH_REMATCH[1]}
23510  if test "x$cleaned_value" = x; then
23511    # Special case for zero
23512    cleaned_value=${BASH_REMATCH[2]}
23513  fi
23514
23515  if test $cleaned_value -gt 255; then
23516    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23517  fi
23518  if test "x$cleaned_value" != "x$with_version_minor"; then
23519    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23520$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23521  fi
23522  VERSION_MINOR=$cleaned_value
23523
23524    fi
23525  else
23526    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23527      # Default is 0, if unspecified
23528      VERSION_MINOR=0
23529    fi
23530  fi
23531
23532
23533# Check whether --with-version-security was given.
23534if test "${with_version_security+set}" = set; then :
23535  withval=$with_version_security; with_version_security_present=true
23536else
23537  with_version_security_present=false
23538fi
23539
23540
23541  if test "x$with_version_security_present" = xtrue; then
23542    if test "x$with_version_security" = xyes; then
23543      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23544    elif test "x$with_version_security" = xno; then
23545      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23546      VERSION_SECURITY=0
23547    elif test "x$with_version_security" = x; then
23548      VERSION_SECURITY=0
23549    else
23550
23551  # Additional [] needed to keep m4 from mangling shell constructs.
23552  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23553    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23554  fi
23555  # Extract the version number without leading zeros.
23556  cleaned_value=${BASH_REMATCH[1]}
23557  if test "x$cleaned_value" = x; then
23558    # Special case for zero
23559    cleaned_value=${BASH_REMATCH[2]}
23560  fi
23561
23562  if test $cleaned_value -gt 255; then
23563    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23564  fi
23565  if test "x$cleaned_value" != "x$with_version_security"; then
23566    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23567$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23568  fi
23569  VERSION_SECURITY=$cleaned_value
23570
23571    fi
23572  else
23573    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23574      # Default is 0, if unspecified
23575      VERSION_SECURITY=0
23576    fi
23577  fi
23578
23579
23580# Check whether --with-version-patch was given.
23581if test "${with_version_patch+set}" = set; then :
23582  withval=$with_version_patch; with_version_patch_present=true
23583else
23584  with_version_patch_present=false
23585fi
23586
23587
23588  if test "x$with_version_patch_present" = xtrue; then
23589    if test "x$with_version_patch" = xyes; then
23590      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23591    elif test "x$with_version_patch" = xno; then
23592      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23593      VERSION_PATCH=0
23594    elif test "x$with_version_patch" = x; then
23595      VERSION_PATCH=0
23596    else
23597
23598  # Additional [] needed to keep m4 from mangling shell constructs.
23599  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23600    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23601  fi
23602  # Extract the version number without leading zeros.
23603  cleaned_value=${BASH_REMATCH[1]}
23604  if test "x$cleaned_value" = x; then
23605    # Special case for zero
23606    cleaned_value=${BASH_REMATCH[2]}
23607  fi
23608
23609  if test $cleaned_value -gt 255; then
23610    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23611  fi
23612  if test "x$cleaned_value" != "x$with_version_patch"; then
23613    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23614$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23615  fi
23616  VERSION_PATCH=$cleaned_value
23617
23618    fi
23619  else
23620    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23621      # Default is 0, if unspecified
23622      VERSION_PATCH=0
23623    fi
23624  fi
23625
23626  # Calculate derived version properties
23627
23628  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23629  if test "x$VERSION_PRE" = x; then
23630    VERSION_IS_GA=true
23631  else
23632    VERSION_IS_GA=false
23633  fi
23634
23635  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23636  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23637
23638  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23639  # Strip trailing zeroes from stripped_version_number
23640  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23641  VERSION_NUMBER=$stripped_version_number
23642
23643  # The complete version string, with additional build information
23644  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23645    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23646  else
23647    # If either build or opt is set, we need a + separator
23648    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23649  fi
23650
23651  # The short version string, just VERSION_NUMBER and PRE, if present.
23652  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23653
23654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23655$as_echo_n "checking for version string... " >&6; }
23656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23657$as_echo "$VERSION_STRING" >&6; }
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673###############################################################################
23674#
23675# Setup BootJDK, used to bootstrap the build.
23676#
23677###############################################################################
23678
23679
23680  BOOT_JDK_FOUND=no
23681
23682# Check whether --with-boot-jdk was given.
23683if test "${with_boot_jdk+set}" = set; then :
23684  withval=$with_boot_jdk;
23685fi
23686
23687
23688  # We look for the Boot JDK through various means, going from more certain to
23689  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23690  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23691  # must check if this is indeed valid; otherwise we'll continue looking.
23692
23693  # Test: Is bootjdk explicitely set by command line arguments?
23694
23695  if test "x$BOOT_JDK_FOUND" = xno; then
23696    # Now execute the test
23697
23698  if test "x$with_boot_jdk" != x; then
23699    BOOT_JDK=$with_boot_jdk
23700    BOOT_JDK_FOUND=maybe
23701    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23702$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23703  fi
23704
23705
23706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23708      # Do we have a bin/java?
23709      if test ! -x "$BOOT_JDK/bin/java"; then
23710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23712        BOOT_JDK_FOUND=no
23713      else
23714        # Do we have a bin/javac?
23715        if test ! -x "$BOOT_JDK/bin/javac"; then
23716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23720          BOOT_JDK_FOUND=no
23721        else
23722          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23723          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23724
23725          # Extra M4 quote needed to protect [] in grep expression.
23726          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23727          if test "x$FOUND_CORRECT_VERSION" = x; then
23728            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23730            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23731$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23732            BOOT_JDK_FOUND=no
23733          else
23734            # We're done! :-)
23735            BOOT_JDK_FOUND=yes
23736
23737  # Only process if variable expands to non-empty
23738
23739  if test "x$BOOT_JDK" != x; then
23740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23741
23742  # Input might be given as Windows format, start by converting to
23743  # unix format.
23744  path="$BOOT_JDK"
23745  new_path=`$CYGPATH -u "$path"`
23746
23747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23750  # "foo.exe" is OK but "foo" is an error.
23751  #
23752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23753  # It is also a way to make sure we got the proper file name for the real test later on.
23754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23755  if test "x$test_shortpath" = x; then
23756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23758    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23759  fi
23760
23761  # Call helper function which possibly converts this using DOS-style short mode.
23762  # If so, the updated path is stored in $new_path.
23763
23764  input_path="$new_path"
23765  # Check if we need to convert this using DOS-style short mode. If the path
23766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23767  # take no chances and rewrite it.
23768  # Note: m4 eats our [], so we need to use [ and ] instead.
23769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23770  if test "x$has_forbidden_chars" != x; then
23771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23775      # Going to short mode and back again did indeed matter. Since short mode is
23776      # case insensitive, let's make it lowercase to improve readability.
23777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23778      # Now convert it back to Unix-style (cygpath)
23779      input_path=`$CYGPATH -u "$shortmode_path"`
23780      new_path="$input_path"
23781    fi
23782  fi
23783
23784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23785  if test "x$test_cygdrive_prefix" = x; then
23786    # As a simple fix, exclude /usr/bin since it's not a real path.
23787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23789      # a path prefixed by /cygdrive for fixpath to work.
23790      new_path="$CYGWIN_ROOT_PATH$input_path"
23791    fi
23792  fi
23793
23794
23795  if test "x$path" != "x$new_path"; then
23796    BOOT_JDK="$new_path"
23797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23799  fi
23800
23801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23802
23803  path="$BOOT_JDK"
23804  has_colon=`$ECHO $path | $GREP ^.:`
23805  new_path="$path"
23806  if test "x$has_colon" = x; then
23807    # Not in mixed or Windows style, start by that.
23808    new_path=`cmd //c echo $path`
23809  fi
23810
23811
23812  input_path="$new_path"
23813  # Check if we need to convert this using DOS-style short mode. If the path
23814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23815  # take no chances and rewrite it.
23816  # Note: m4 eats our [], so we need to use [ and ] instead.
23817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23818  if test "x$has_forbidden_chars" != x; then
23819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23821  fi
23822
23823
23824  windows_path="$new_path"
23825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23826    unix_path=`$CYGPATH -u "$windows_path"`
23827    new_path="$unix_path"
23828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23830    new_path="$unix_path"
23831  fi
23832
23833  if test "x$path" != "x$new_path"; then
23834    BOOT_JDK="$new_path"
23835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23836$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23837  fi
23838
23839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23841
23842    else
23843      # We're on a unix platform. Hooray! :)
23844      path="$BOOT_JDK"
23845      has_space=`$ECHO "$path" | $GREP " "`
23846      if test "x$has_space" != x; then
23847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23849        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23850      fi
23851
23852      # Use eval to expand a potential ~
23853      eval path="$path"
23854      if test ! -f "$path" && test ! -d "$path"; then
23855        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23856      fi
23857
23858      if test -d "$path"; then
23859        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23860      else
23861        dir="`$DIRNAME "$path"`"
23862        base="`$BASENAME "$path"`"
23863        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23864      fi
23865    fi
23866  fi
23867
23868            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23869$as_echo_n "checking for Boot JDK... " >&6; }
23870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23871$as_echo "$BOOT_JDK" >&6; }
23872            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23873$as_echo_n "checking Boot JDK version... " >&6; }
23874            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23876$as_echo "$BOOT_JDK_VERSION" >&6; }
23877          fi # end check jdk version
23878        fi # end check javac
23879      fi # end check java
23880    fi # end check boot jdk found
23881  fi
23882
23883  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23884    # Having specified an argument which is incorrect will produce an instant failure;
23885    # we should not go on looking
23886    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23887  fi
23888
23889  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23890
23891  if test "x$BOOT_JDK_FOUND" = xno; then
23892    # Now execute the test
23893
23894  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23895    # First check at user selected default
23896
23897  if test "x$BOOT_JDK_FOUND" = xno; then
23898    # Now execute the test
23899
23900  if test -x /usr/libexec/java_home; then
23901    BOOT_JDK=`/usr/libexec/java_home `
23902    BOOT_JDK_FOUND=maybe
23903    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23904$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23905  fi
23906
23907
23908    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23909    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23910      # Do we have a bin/java?
23911      if test ! -x "$BOOT_JDK/bin/java"; then
23912        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23913$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23914        BOOT_JDK_FOUND=no
23915      else
23916        # Do we have a bin/javac?
23917        if test ! -x "$BOOT_JDK/bin/javac"; then
23918          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23920          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23921$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23922          BOOT_JDK_FOUND=no
23923        else
23924          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23925          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23926
23927          # Extra M4 quote needed to protect [] in grep expression.
23928          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23929          if test "x$FOUND_CORRECT_VERSION" = x; then
23930            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23932            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23933$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23934            BOOT_JDK_FOUND=no
23935          else
23936            # We're done! :-)
23937            BOOT_JDK_FOUND=yes
23938
23939  # Only process if variable expands to non-empty
23940
23941  if test "x$BOOT_JDK" != x; then
23942    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23943
23944  # Input might be given as Windows format, start by converting to
23945  # unix format.
23946  path="$BOOT_JDK"
23947  new_path=`$CYGPATH -u "$path"`
23948
23949  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23950  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23951  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23952  # "foo.exe" is OK but "foo" is an error.
23953  #
23954  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23955  # It is also a way to make sure we got the proper file name for the real test later on.
23956  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23957  if test "x$test_shortpath" = x; then
23958    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23960    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23961  fi
23962
23963  # Call helper function which possibly converts this using DOS-style short mode.
23964  # If so, the updated path is stored in $new_path.
23965
23966  input_path="$new_path"
23967  # Check if we need to convert this using DOS-style short mode. If the path
23968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23969  # take no chances and rewrite it.
23970  # Note: m4 eats our [], so we need to use [ and ] instead.
23971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23972  if test "x$has_forbidden_chars" != x; then
23973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23974    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23975    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23976    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23977      # Going to short mode and back again did indeed matter. Since short mode is
23978      # case insensitive, let's make it lowercase to improve readability.
23979      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23980      # Now convert it back to Unix-style (cygpath)
23981      input_path=`$CYGPATH -u "$shortmode_path"`
23982      new_path="$input_path"
23983    fi
23984  fi
23985
23986  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23987  if test "x$test_cygdrive_prefix" = x; then
23988    # As a simple fix, exclude /usr/bin since it's not a real path.
23989    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23990      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23991      # a path prefixed by /cygdrive for fixpath to work.
23992      new_path="$CYGWIN_ROOT_PATH$input_path"
23993    fi
23994  fi
23995
23996
23997  if test "x$path" != "x$new_path"; then
23998    BOOT_JDK="$new_path"
23999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24000$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24001  fi
24002
24003    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24004
24005  path="$BOOT_JDK"
24006  has_colon=`$ECHO $path | $GREP ^.:`
24007  new_path="$path"
24008  if test "x$has_colon" = x; then
24009    # Not in mixed or Windows style, start by that.
24010    new_path=`cmd //c echo $path`
24011  fi
24012
24013
24014  input_path="$new_path"
24015  # Check if we need to convert this using DOS-style short mode. If the path
24016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24017  # take no chances and rewrite it.
24018  # Note: m4 eats our [], so we need to use [ and ] instead.
24019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24020  if test "x$has_forbidden_chars" != x; then
24021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24022    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24023  fi
24024
24025
24026  windows_path="$new_path"
24027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24028    unix_path=`$CYGPATH -u "$windows_path"`
24029    new_path="$unix_path"
24030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24031    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24032    new_path="$unix_path"
24033  fi
24034
24035  if test "x$path" != "x$new_path"; then
24036    BOOT_JDK="$new_path"
24037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24038$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24039  fi
24040
24041  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24042  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24043
24044    else
24045      # We're on a unix platform. Hooray! :)
24046      path="$BOOT_JDK"
24047      has_space=`$ECHO "$path" | $GREP " "`
24048      if test "x$has_space" != x; then
24049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24050$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24051        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24052      fi
24053
24054      # Use eval to expand a potential ~
24055      eval path="$path"
24056      if test ! -f "$path" && test ! -d "$path"; then
24057        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24058      fi
24059
24060      if test -d "$path"; then
24061        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24062      else
24063        dir="`$DIRNAME "$path"`"
24064        base="`$BASENAME "$path"`"
24065        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24066      fi
24067    fi
24068  fi
24069
24070            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24071$as_echo_n "checking for Boot JDK... " >&6; }
24072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24073$as_echo "$BOOT_JDK" >&6; }
24074            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24075$as_echo_n "checking Boot JDK version... " >&6; }
24076            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24077            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24078$as_echo "$BOOT_JDK_VERSION" >&6; }
24079          fi # end check jdk version
24080        fi # end check javac
24081      fi # end check java
24082    fi # end check boot jdk found
24083  fi
24084
24085    # If that did not work out (e.g. too old), try explicit versions instead
24086
24087  if test "x$BOOT_JDK_FOUND" = xno; then
24088    # Now execute the test
24089
24090  if test -x /usr/libexec/java_home; then
24091    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24092    BOOT_JDK_FOUND=maybe
24093    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24094$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24095  fi
24096
24097
24098    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24099    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24100      # Do we have a bin/java?
24101      if test ! -x "$BOOT_JDK/bin/java"; then
24102        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24104        BOOT_JDK_FOUND=no
24105      else
24106        # Do we have a bin/javac?
24107        if test ! -x "$BOOT_JDK/bin/javac"; then
24108          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24110          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24111$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24112          BOOT_JDK_FOUND=no
24113        else
24114          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24115          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24116
24117          # Extra M4 quote needed to protect [] in grep expression.
24118          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24119          if test "x$FOUND_CORRECT_VERSION" = x; then
24120            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24122            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24123$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24124            BOOT_JDK_FOUND=no
24125          else
24126            # We're done! :-)
24127            BOOT_JDK_FOUND=yes
24128
24129  # Only process if variable expands to non-empty
24130
24131  if test "x$BOOT_JDK" != x; then
24132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24133
24134  # Input might be given as Windows format, start by converting to
24135  # unix format.
24136  path="$BOOT_JDK"
24137  new_path=`$CYGPATH -u "$path"`
24138
24139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24142  # "foo.exe" is OK but "foo" is an error.
24143  #
24144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24145  # It is also a way to make sure we got the proper file name for the real test later on.
24146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24147  if test "x$test_shortpath" = x; then
24148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24150    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24151  fi
24152
24153  # Call helper function which possibly converts this using DOS-style short mode.
24154  # If so, the updated path is stored in $new_path.
24155
24156  input_path="$new_path"
24157  # Check if we need to convert this using DOS-style short mode. If the path
24158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24159  # take no chances and rewrite it.
24160  # Note: m4 eats our [], so we need to use [ and ] instead.
24161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24162  if test "x$has_forbidden_chars" != x; then
24163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24167      # Going to short mode and back again did indeed matter. Since short mode is
24168      # case insensitive, let's make it lowercase to improve readability.
24169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24170      # Now convert it back to Unix-style (cygpath)
24171      input_path=`$CYGPATH -u "$shortmode_path"`
24172      new_path="$input_path"
24173    fi
24174  fi
24175
24176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24177  if test "x$test_cygdrive_prefix" = x; then
24178    # As a simple fix, exclude /usr/bin since it's not a real path.
24179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24181      # a path prefixed by /cygdrive for fixpath to work.
24182      new_path="$CYGWIN_ROOT_PATH$input_path"
24183    fi
24184  fi
24185
24186
24187  if test "x$path" != "x$new_path"; then
24188    BOOT_JDK="$new_path"
24189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24191  fi
24192
24193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24194
24195  path="$BOOT_JDK"
24196  has_colon=`$ECHO $path | $GREP ^.:`
24197  new_path="$path"
24198  if test "x$has_colon" = x; then
24199    # Not in mixed or Windows style, start by that.
24200    new_path=`cmd //c echo $path`
24201  fi
24202
24203
24204  input_path="$new_path"
24205  # Check if we need to convert this using DOS-style short mode. If the path
24206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24207  # take no chances and rewrite it.
24208  # Note: m4 eats our [], so we need to use [ and ] instead.
24209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24210  if test "x$has_forbidden_chars" != x; then
24211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24213  fi
24214
24215
24216  windows_path="$new_path"
24217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24218    unix_path=`$CYGPATH -u "$windows_path"`
24219    new_path="$unix_path"
24220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24222    new_path="$unix_path"
24223  fi
24224
24225  if test "x$path" != "x$new_path"; then
24226    BOOT_JDK="$new_path"
24227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24229  fi
24230
24231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24233
24234    else
24235      # We're on a unix platform. Hooray! :)
24236      path="$BOOT_JDK"
24237      has_space=`$ECHO "$path" | $GREP " "`
24238      if test "x$has_space" != x; then
24239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24241        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24242      fi
24243
24244      # Use eval to expand a potential ~
24245      eval path="$path"
24246      if test ! -f "$path" && test ! -d "$path"; then
24247        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24248      fi
24249
24250      if test -d "$path"; then
24251        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24252      else
24253        dir="`$DIRNAME "$path"`"
24254        base="`$BASENAME "$path"`"
24255        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24256      fi
24257    fi
24258  fi
24259
24260            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24261$as_echo_n "checking for Boot JDK... " >&6; }
24262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24263$as_echo "$BOOT_JDK" >&6; }
24264            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24265$as_echo_n "checking Boot JDK version... " >&6; }
24266            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24267            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24268$as_echo "$BOOT_JDK_VERSION" >&6; }
24269          fi # end check jdk version
24270        fi # end check javac
24271      fi # end check java
24272    fi # end check boot jdk found
24273  fi
24274
24275
24276  if test "x$BOOT_JDK_FOUND" = xno; then
24277    # Now execute the test
24278
24279  if test -x /usr/libexec/java_home; then
24280    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24281    BOOT_JDK_FOUND=maybe
24282    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24283$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24284  fi
24285
24286
24287    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24288    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24289      # Do we have a bin/java?
24290      if test ! -x "$BOOT_JDK/bin/java"; then
24291        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24293        BOOT_JDK_FOUND=no
24294      else
24295        # Do we have a bin/javac?
24296        if test ! -x "$BOOT_JDK/bin/javac"; then
24297          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24298$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24299          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24300$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24301          BOOT_JDK_FOUND=no
24302        else
24303          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24304          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24305
24306          # Extra M4 quote needed to protect [] in grep expression.
24307          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24308          if test "x$FOUND_CORRECT_VERSION" = x; then
24309            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24310$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24311            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24312$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24313            BOOT_JDK_FOUND=no
24314          else
24315            # We're done! :-)
24316            BOOT_JDK_FOUND=yes
24317
24318  # Only process if variable expands to non-empty
24319
24320  if test "x$BOOT_JDK" != x; then
24321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24322
24323  # Input might be given as Windows format, start by converting to
24324  # unix format.
24325  path="$BOOT_JDK"
24326  new_path=`$CYGPATH -u "$path"`
24327
24328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24331  # "foo.exe" is OK but "foo" is an error.
24332  #
24333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24334  # It is also a way to make sure we got the proper file name for the real test later on.
24335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24336  if test "x$test_shortpath" = x; then
24337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24339    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24340  fi
24341
24342  # Call helper function which possibly converts this using DOS-style short mode.
24343  # If so, the updated path is stored in $new_path.
24344
24345  input_path="$new_path"
24346  # Check if we need to convert this using DOS-style short mode. If the path
24347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24348  # take no chances and rewrite it.
24349  # Note: m4 eats our [], so we need to use [ and ] instead.
24350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24351  if test "x$has_forbidden_chars" != x; then
24352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24356      # Going to short mode and back again did indeed matter. Since short mode is
24357      # case insensitive, let's make it lowercase to improve readability.
24358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24359      # Now convert it back to Unix-style (cygpath)
24360      input_path=`$CYGPATH -u "$shortmode_path"`
24361      new_path="$input_path"
24362    fi
24363  fi
24364
24365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24366  if test "x$test_cygdrive_prefix" = x; then
24367    # As a simple fix, exclude /usr/bin since it's not a real path.
24368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24370      # a path prefixed by /cygdrive for fixpath to work.
24371      new_path="$CYGWIN_ROOT_PATH$input_path"
24372    fi
24373  fi
24374
24375
24376  if test "x$path" != "x$new_path"; then
24377    BOOT_JDK="$new_path"
24378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24380  fi
24381
24382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24383
24384  path="$BOOT_JDK"
24385  has_colon=`$ECHO $path | $GREP ^.:`
24386  new_path="$path"
24387  if test "x$has_colon" = x; then
24388    # Not in mixed or Windows style, start by that.
24389    new_path=`cmd //c echo $path`
24390  fi
24391
24392
24393  input_path="$new_path"
24394  # Check if we need to convert this using DOS-style short mode. If the path
24395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24396  # take no chances and rewrite it.
24397  # Note: m4 eats our [], so we need to use [ and ] instead.
24398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24399  if test "x$has_forbidden_chars" != x; then
24400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24402  fi
24403
24404
24405  windows_path="$new_path"
24406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24407    unix_path=`$CYGPATH -u "$windows_path"`
24408    new_path="$unix_path"
24409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24411    new_path="$unix_path"
24412  fi
24413
24414  if test "x$path" != "x$new_path"; then
24415    BOOT_JDK="$new_path"
24416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24417$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24418  fi
24419
24420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24422
24423    else
24424      # We're on a unix platform. Hooray! :)
24425      path="$BOOT_JDK"
24426      has_space=`$ECHO "$path" | $GREP " "`
24427      if test "x$has_space" != x; then
24428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24430        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24431      fi
24432
24433      # Use eval to expand a potential ~
24434      eval path="$path"
24435      if test ! -f "$path" && test ! -d "$path"; then
24436        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24437      fi
24438
24439      if test -d "$path"; then
24440        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24441      else
24442        dir="`$DIRNAME "$path"`"
24443        base="`$BASENAME "$path"`"
24444        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24445      fi
24446    fi
24447  fi
24448
24449            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24450$as_echo_n "checking for Boot JDK... " >&6; }
24451            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24452$as_echo "$BOOT_JDK" >&6; }
24453            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24454$as_echo_n "checking Boot JDK version... " >&6; }
24455            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24457$as_echo "$BOOT_JDK_VERSION" >&6; }
24458          fi # end check jdk version
24459        fi # end check javac
24460      fi # end check java
24461    fi # end check boot jdk found
24462  fi
24463
24464
24465  if test "x$BOOT_JDK_FOUND" = xno; then
24466    # Now execute the test
24467
24468  if test -x /usr/libexec/java_home; then
24469    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24470    BOOT_JDK_FOUND=maybe
24471    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24472$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24473  fi
24474
24475
24476    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24477    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24478      # Do we have a bin/java?
24479      if test ! -x "$BOOT_JDK/bin/java"; then
24480        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24482        BOOT_JDK_FOUND=no
24483      else
24484        # Do we have a bin/javac?
24485        if test ! -x "$BOOT_JDK/bin/javac"; then
24486          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24488          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24489$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24490          BOOT_JDK_FOUND=no
24491        else
24492          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24493          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24494
24495          # Extra M4 quote needed to protect [] in grep expression.
24496          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24497          if test "x$FOUND_CORRECT_VERSION" = x; then
24498            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24499$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24500            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24501$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24502            BOOT_JDK_FOUND=no
24503          else
24504            # We're done! :-)
24505            BOOT_JDK_FOUND=yes
24506
24507  # Only process if variable expands to non-empty
24508
24509  if test "x$BOOT_JDK" != x; then
24510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24511
24512  # Input might be given as Windows format, start by converting to
24513  # unix format.
24514  path="$BOOT_JDK"
24515  new_path=`$CYGPATH -u "$path"`
24516
24517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24520  # "foo.exe" is OK but "foo" is an error.
24521  #
24522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24523  # It is also a way to make sure we got the proper file name for the real test later on.
24524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24525  if test "x$test_shortpath" = x; then
24526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24528    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24529  fi
24530
24531  # Call helper function which possibly converts this using DOS-style short mode.
24532  # If so, the updated path is stored in $new_path.
24533
24534  input_path="$new_path"
24535  # Check if we need to convert this using DOS-style short mode. If the path
24536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24537  # take no chances and rewrite it.
24538  # Note: m4 eats our [], so we need to use [ and ] instead.
24539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24540  if test "x$has_forbidden_chars" != x; then
24541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24545      # Going to short mode and back again did indeed matter. Since short mode is
24546      # case insensitive, let's make it lowercase to improve readability.
24547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24548      # Now convert it back to Unix-style (cygpath)
24549      input_path=`$CYGPATH -u "$shortmode_path"`
24550      new_path="$input_path"
24551    fi
24552  fi
24553
24554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24555  if test "x$test_cygdrive_prefix" = x; then
24556    # As a simple fix, exclude /usr/bin since it's not a real path.
24557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24559      # a path prefixed by /cygdrive for fixpath to work.
24560      new_path="$CYGWIN_ROOT_PATH$input_path"
24561    fi
24562  fi
24563
24564
24565  if test "x$path" != "x$new_path"; then
24566    BOOT_JDK="$new_path"
24567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24568$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24569  fi
24570
24571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24572
24573  path="$BOOT_JDK"
24574  has_colon=`$ECHO $path | $GREP ^.:`
24575  new_path="$path"
24576  if test "x$has_colon" = x; then
24577    # Not in mixed or Windows style, start by that.
24578    new_path=`cmd //c echo $path`
24579  fi
24580
24581
24582  input_path="$new_path"
24583  # Check if we need to convert this using DOS-style short mode. If the path
24584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24585  # take no chances and rewrite it.
24586  # Note: m4 eats our [], so we need to use [ and ] instead.
24587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24588  if test "x$has_forbidden_chars" != x; then
24589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24591  fi
24592
24593
24594  windows_path="$new_path"
24595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24596    unix_path=`$CYGPATH -u "$windows_path"`
24597    new_path="$unix_path"
24598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24600    new_path="$unix_path"
24601  fi
24602
24603  if test "x$path" != "x$new_path"; then
24604    BOOT_JDK="$new_path"
24605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24606$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24607  fi
24608
24609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24611
24612    else
24613      # We're on a unix platform. Hooray! :)
24614      path="$BOOT_JDK"
24615      has_space=`$ECHO "$path" | $GREP " "`
24616      if test "x$has_space" != x; then
24617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24618$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24619        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24620      fi
24621
24622      # Use eval to expand a potential ~
24623      eval path="$path"
24624      if test ! -f "$path" && test ! -d "$path"; then
24625        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24626      fi
24627
24628      if test -d "$path"; then
24629        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24630      else
24631        dir="`$DIRNAME "$path"`"
24632        base="`$BASENAME "$path"`"
24633        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24634      fi
24635    fi
24636  fi
24637
24638            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24639$as_echo_n "checking for Boot JDK... " >&6; }
24640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24641$as_echo "$BOOT_JDK" >&6; }
24642            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24643$as_echo_n "checking Boot JDK version... " >&6; }
24644            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24646$as_echo "$BOOT_JDK_VERSION" >&6; }
24647          fi # end check jdk version
24648        fi # end check javac
24649      fi # end check java
24650    fi # end check boot jdk found
24651  fi
24652
24653  fi
24654
24655
24656    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24657    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24658      # Do we have a bin/java?
24659      if test ! -x "$BOOT_JDK/bin/java"; then
24660        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24662        BOOT_JDK_FOUND=no
24663      else
24664        # Do we have a bin/javac?
24665        if test ! -x "$BOOT_JDK/bin/javac"; then
24666          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24667$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24668          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24669$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24670          BOOT_JDK_FOUND=no
24671        else
24672          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24673          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24674
24675          # Extra M4 quote needed to protect [] in grep expression.
24676          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24677          if test "x$FOUND_CORRECT_VERSION" = x; then
24678            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24680            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24681$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24682            BOOT_JDK_FOUND=no
24683          else
24684            # We're done! :-)
24685            BOOT_JDK_FOUND=yes
24686
24687  # Only process if variable expands to non-empty
24688
24689  if test "x$BOOT_JDK" != x; then
24690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24691
24692  # Input might be given as Windows format, start by converting to
24693  # unix format.
24694  path="$BOOT_JDK"
24695  new_path=`$CYGPATH -u "$path"`
24696
24697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24700  # "foo.exe" is OK but "foo" is an error.
24701  #
24702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24703  # It is also a way to make sure we got the proper file name for the real test later on.
24704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24705  if test "x$test_shortpath" = x; then
24706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24707$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24708    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24709  fi
24710
24711  # Call helper function which possibly converts this using DOS-style short mode.
24712  # If so, the updated path is stored in $new_path.
24713
24714  input_path="$new_path"
24715  # Check if we need to convert this using DOS-style short mode. If the path
24716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24717  # take no chances and rewrite it.
24718  # Note: m4 eats our [], so we need to use [ and ] instead.
24719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24720  if test "x$has_forbidden_chars" != x; then
24721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24725      # Going to short mode and back again did indeed matter. Since short mode is
24726      # case insensitive, let's make it lowercase to improve readability.
24727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24728      # Now convert it back to Unix-style (cygpath)
24729      input_path=`$CYGPATH -u "$shortmode_path"`
24730      new_path="$input_path"
24731    fi
24732  fi
24733
24734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24735  if test "x$test_cygdrive_prefix" = x; then
24736    # As a simple fix, exclude /usr/bin since it's not a real path.
24737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24739      # a path prefixed by /cygdrive for fixpath to work.
24740      new_path="$CYGWIN_ROOT_PATH$input_path"
24741    fi
24742  fi
24743
24744
24745  if test "x$path" != "x$new_path"; then
24746    BOOT_JDK="$new_path"
24747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24748$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24749  fi
24750
24751    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24752
24753  path="$BOOT_JDK"
24754  has_colon=`$ECHO $path | $GREP ^.:`
24755  new_path="$path"
24756  if test "x$has_colon" = x; then
24757    # Not in mixed or Windows style, start by that.
24758    new_path=`cmd //c echo $path`
24759  fi
24760
24761
24762  input_path="$new_path"
24763  # Check if we need to convert this using DOS-style short mode. If the path
24764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24765  # take no chances and rewrite it.
24766  # Note: m4 eats our [], so we need to use [ and ] instead.
24767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24768  if test "x$has_forbidden_chars" != x; then
24769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24771  fi
24772
24773
24774  windows_path="$new_path"
24775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24776    unix_path=`$CYGPATH -u "$windows_path"`
24777    new_path="$unix_path"
24778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24780    new_path="$unix_path"
24781  fi
24782
24783  if test "x$path" != "x$new_path"; then
24784    BOOT_JDK="$new_path"
24785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24786$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24787  fi
24788
24789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24791
24792    else
24793      # We're on a unix platform. Hooray! :)
24794      path="$BOOT_JDK"
24795      has_space=`$ECHO "$path" | $GREP " "`
24796      if test "x$has_space" != x; then
24797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24798$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24799        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24800      fi
24801
24802      # Use eval to expand a potential ~
24803      eval path="$path"
24804      if test ! -f "$path" && test ! -d "$path"; then
24805        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24806      fi
24807
24808      if test -d "$path"; then
24809        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24810      else
24811        dir="`$DIRNAME "$path"`"
24812        base="`$BASENAME "$path"`"
24813        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24814      fi
24815    fi
24816  fi
24817
24818            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24819$as_echo_n "checking for Boot JDK... " >&6; }
24820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24821$as_echo "$BOOT_JDK" >&6; }
24822            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24823$as_echo_n "checking Boot JDK version... " >&6; }
24824            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24826$as_echo "$BOOT_JDK_VERSION" >&6; }
24827          fi # end check jdk version
24828        fi # end check javac
24829      fi # end check java
24830    fi # end check boot jdk found
24831  fi
24832
24833
24834  # Test: Is $JAVA_HOME set?
24835
24836  if test "x$BOOT_JDK_FOUND" = xno; then
24837    # Now execute the test
24838
24839  if test "x$JAVA_HOME" != x; then
24840    JAVA_HOME_PROCESSED="$JAVA_HOME"
24841
24842  # Only process if variable expands to non-empty
24843
24844  if test "x$JAVA_HOME_PROCESSED" != x; then
24845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24846
24847  # Input might be given as Windows format, start by converting to
24848  # unix format.
24849  path="$JAVA_HOME_PROCESSED"
24850  new_path=`$CYGPATH -u "$path"`
24851
24852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24855  # "foo.exe" is OK but "foo" is an error.
24856  #
24857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24858  # It is also a way to make sure we got the proper file name for the real test later on.
24859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24860  if test "x$test_shortpath" = x; then
24861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24862$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24863    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24864  fi
24865
24866  # Call helper function which possibly converts this using DOS-style short mode.
24867  # If so, the updated path is stored in $new_path.
24868
24869  input_path="$new_path"
24870  # Check if we need to convert this using DOS-style short mode. If the path
24871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24872  # take no chances and rewrite it.
24873  # Note: m4 eats our [], so we need to use [ and ] instead.
24874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24875  if test "x$has_forbidden_chars" != x; then
24876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24880      # Going to short mode and back again did indeed matter. Since short mode is
24881      # case insensitive, let's make it lowercase to improve readability.
24882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24883      # Now convert it back to Unix-style (cygpath)
24884      input_path=`$CYGPATH -u "$shortmode_path"`
24885      new_path="$input_path"
24886    fi
24887  fi
24888
24889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24890  if test "x$test_cygdrive_prefix" = x; then
24891    # As a simple fix, exclude /usr/bin since it's not a real path.
24892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24894      # a path prefixed by /cygdrive for fixpath to work.
24895      new_path="$CYGWIN_ROOT_PATH$input_path"
24896    fi
24897  fi
24898
24899
24900  if test "x$path" != "x$new_path"; then
24901    JAVA_HOME_PROCESSED="$new_path"
24902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24903$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24904  fi
24905
24906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24907
24908  path="$JAVA_HOME_PROCESSED"
24909  has_colon=`$ECHO $path | $GREP ^.:`
24910  new_path="$path"
24911  if test "x$has_colon" = x; then
24912    # Not in mixed or Windows style, start by that.
24913    new_path=`cmd //c echo $path`
24914  fi
24915
24916
24917  input_path="$new_path"
24918  # Check if we need to convert this using DOS-style short mode. If the path
24919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24920  # take no chances and rewrite it.
24921  # Note: m4 eats our [], so we need to use [ and ] instead.
24922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24923  if test "x$has_forbidden_chars" != x; then
24924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24926  fi
24927
24928
24929  windows_path="$new_path"
24930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24931    unix_path=`$CYGPATH -u "$windows_path"`
24932    new_path="$unix_path"
24933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24935    new_path="$unix_path"
24936  fi
24937
24938  if test "x$path" != "x$new_path"; then
24939    JAVA_HOME_PROCESSED="$new_path"
24940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24941$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24942  fi
24943
24944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24946
24947    else
24948      # We're on a unix platform. Hooray! :)
24949      path="$JAVA_HOME_PROCESSED"
24950      has_space=`$ECHO "$path" | $GREP " "`
24951      if test "x$has_space" != x; then
24952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24953$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24955      fi
24956
24957      # Use eval to expand a potential ~
24958      eval path="$path"
24959      if test ! -f "$path" && test ! -d "$path"; then
24960        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24961      fi
24962
24963      if test -d "$path"; then
24964        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24965      else
24966        dir="`$DIRNAME "$path"`"
24967        base="`$BASENAME "$path"`"
24968        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
24969      fi
24970    fi
24971  fi
24972
24973    if test ! -d "$JAVA_HOME_PROCESSED"; then
24974      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24975$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24976    else
24977      # Aha, the user has set a JAVA_HOME
24978      # let us use that as the Boot JDK.
24979      BOOT_JDK="$JAVA_HOME_PROCESSED"
24980      BOOT_JDK_FOUND=maybe
24981      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24982$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24983    fi
24984  fi
24985
24986
24987    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24988    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24989      # Do we have a bin/java?
24990      if test ! -x "$BOOT_JDK/bin/java"; then
24991        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24993        BOOT_JDK_FOUND=no
24994      else
24995        # Do we have a bin/javac?
24996        if test ! -x "$BOOT_JDK/bin/javac"; then
24997          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24999          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25000$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25001          BOOT_JDK_FOUND=no
25002        else
25003          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25004          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25005
25006          # Extra M4 quote needed to protect [] in grep expression.
25007          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25008          if test "x$FOUND_CORRECT_VERSION" = x; then
25009            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25011            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25012$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25013            BOOT_JDK_FOUND=no
25014          else
25015            # We're done! :-)
25016            BOOT_JDK_FOUND=yes
25017
25018  # Only process if variable expands to non-empty
25019
25020  if test "x$BOOT_JDK" != x; then
25021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25022
25023  # Input might be given as Windows format, start by converting to
25024  # unix format.
25025  path="$BOOT_JDK"
25026  new_path=`$CYGPATH -u "$path"`
25027
25028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25031  # "foo.exe" is OK but "foo" is an error.
25032  #
25033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25034  # It is also a way to make sure we got the proper file name for the real test later on.
25035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25036  if test "x$test_shortpath" = x; then
25037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25039    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25040  fi
25041
25042  # Call helper function which possibly converts this using DOS-style short mode.
25043  # If so, the updated path is stored in $new_path.
25044
25045  input_path="$new_path"
25046  # Check if we need to convert this using DOS-style short mode. If the path
25047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25048  # take no chances and rewrite it.
25049  # Note: m4 eats our [], so we need to use [ and ] instead.
25050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25051  if test "x$has_forbidden_chars" != x; then
25052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25056      # Going to short mode and back again did indeed matter. Since short mode is
25057      # case insensitive, let's make it lowercase to improve readability.
25058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25059      # Now convert it back to Unix-style (cygpath)
25060      input_path=`$CYGPATH -u "$shortmode_path"`
25061      new_path="$input_path"
25062    fi
25063  fi
25064
25065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25066  if test "x$test_cygdrive_prefix" = x; then
25067    # As a simple fix, exclude /usr/bin since it's not a real path.
25068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25070      # a path prefixed by /cygdrive for fixpath to work.
25071      new_path="$CYGWIN_ROOT_PATH$input_path"
25072    fi
25073  fi
25074
25075
25076  if test "x$path" != "x$new_path"; then
25077    BOOT_JDK="$new_path"
25078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25080  fi
25081
25082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25083
25084  path="$BOOT_JDK"
25085  has_colon=`$ECHO $path | $GREP ^.:`
25086  new_path="$path"
25087  if test "x$has_colon" = x; then
25088    # Not in mixed or Windows style, start by that.
25089    new_path=`cmd //c echo $path`
25090  fi
25091
25092
25093  input_path="$new_path"
25094  # Check if we need to convert this using DOS-style short mode. If the path
25095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25096  # take no chances and rewrite it.
25097  # Note: m4 eats our [], so we need to use [ and ] instead.
25098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25099  if test "x$has_forbidden_chars" != x; then
25100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25102  fi
25103
25104
25105  windows_path="$new_path"
25106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25107    unix_path=`$CYGPATH -u "$windows_path"`
25108    new_path="$unix_path"
25109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25111    new_path="$unix_path"
25112  fi
25113
25114  if test "x$path" != "x$new_path"; then
25115    BOOT_JDK="$new_path"
25116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25118  fi
25119
25120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25122
25123    else
25124      # We're on a unix platform. Hooray! :)
25125      path="$BOOT_JDK"
25126      has_space=`$ECHO "$path" | $GREP " "`
25127      if test "x$has_space" != x; then
25128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25131      fi
25132
25133      # Use eval to expand a potential ~
25134      eval path="$path"
25135      if test ! -f "$path" && test ! -d "$path"; then
25136        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25137      fi
25138
25139      if test -d "$path"; then
25140        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25141      else
25142        dir="`$DIRNAME "$path"`"
25143        base="`$BASENAME "$path"`"
25144        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25145      fi
25146    fi
25147  fi
25148
25149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25150$as_echo_n "checking for Boot JDK... " >&6; }
25151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25152$as_echo "$BOOT_JDK" >&6; }
25153            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25154$as_echo_n "checking Boot JDK version... " >&6; }
25155            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25157$as_echo "$BOOT_JDK_VERSION" >&6; }
25158          fi # end check jdk version
25159        fi # end check javac
25160      fi # end check java
25161    fi # end check boot jdk found
25162  fi
25163
25164
25165  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25166
25167  if test "x$BOOT_JDK_FOUND" = xno; then
25168    # Now execute the test
25169
25170  # Extract the first word of "javac", so it can be a program name with args.
25171set dummy javac; ac_word=$2
25172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25173$as_echo_n "checking for $ac_word... " >&6; }
25174if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25175  $as_echo_n "(cached) " >&6
25176else
25177  case $JAVAC_CHECK in
25178  [\\/]* | ?:[\\/]*)
25179  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25180  ;;
25181  *)
25182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25183for as_dir in $PATH
25184do
25185  IFS=$as_save_IFS
25186  test -z "$as_dir" && as_dir=.
25187    for ac_exec_ext in '' $ac_executable_extensions; do
25188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25189    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25191    break 2
25192  fi
25193done
25194  done
25195IFS=$as_save_IFS
25196
25197  ;;
25198esac
25199fi
25200JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25201if test -n "$JAVAC_CHECK"; then
25202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25203$as_echo "$JAVAC_CHECK" >&6; }
25204else
25205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25206$as_echo "no" >&6; }
25207fi
25208
25209
25210  # Extract the first word of "java", so it can be a program name with args.
25211set dummy java; ac_word=$2
25212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25213$as_echo_n "checking for $ac_word... " >&6; }
25214if ${ac_cv_path_JAVA_CHECK+:} false; then :
25215  $as_echo_n "(cached) " >&6
25216else
25217  case $JAVA_CHECK in
25218  [\\/]* | ?:[\\/]*)
25219  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25220  ;;
25221  *)
25222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25223for as_dir in $PATH
25224do
25225  IFS=$as_save_IFS
25226  test -z "$as_dir" && as_dir=.
25227    for ac_exec_ext in '' $ac_executable_extensions; do
25228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25229    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25231    break 2
25232  fi
25233done
25234  done
25235IFS=$as_save_IFS
25236
25237  ;;
25238esac
25239fi
25240JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25241if test -n "$JAVA_CHECK"; then
25242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25243$as_echo "$JAVA_CHECK" >&6; }
25244else
25245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25246$as_echo "no" >&6; }
25247fi
25248
25249
25250  BINARY="$JAVAC_CHECK"
25251  if test "x$JAVAC_CHECK" = x; then
25252    BINARY="$JAVA_CHECK"
25253  fi
25254  if test "x$BINARY" != x; then
25255    # So there is a java(c) binary, it might be part of a JDK.
25256    # Lets find the JDK/JRE directory by following symbolic links.
25257    # Linux/GNU systems often have links from /usr/bin/java to
25258    # /etc/alternatives/java to the real JDK binary.
25259
25260  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25261    # Follow a chain of symbolic links. Use readlink
25262    # where it exists, else fall back to horribly
25263    # complicated shell code.
25264    if test "x$READLINK_TESTED" != yes; then
25265      # On MacOSX there is a readlink tool with a different
25266      # purpose than the GNU readlink tool. Check the found readlink.
25267      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25268      if test "x$ISGNU" = x; then
25269        # A readlink that we do not know how to use.
25270        # Are there other non-GNU readlinks out there?
25271        READLINK_TESTED=yes
25272        READLINK=
25273      fi
25274    fi
25275
25276    if test "x$READLINK" != x; then
25277      BINARY=`$READLINK -f $BINARY`
25278    else
25279      # Save the current directory for restoring afterwards
25280      STARTDIR=$PWD
25281      COUNTER=0
25282      sym_link_dir=`$DIRNAME $BINARY`
25283      sym_link_file=`$BASENAME $BINARY`
25284      cd $sym_link_dir
25285      # Use -P flag to resolve symlinks in directories.
25286      cd `$THEPWDCMD -P`
25287      sym_link_dir=`$THEPWDCMD -P`
25288      # Resolve file symlinks
25289      while test $COUNTER -lt 20; do
25290        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25291        if test "x$ISLINK" == x; then
25292          # This is not a symbolic link! We are done!
25293          break
25294        fi
25295        # Again resolve directory symlinks since the target of the just found
25296        # link could be in a different directory
25297        cd `$DIRNAME $ISLINK`
25298        sym_link_dir=`$THEPWDCMD -P`
25299        sym_link_file=`$BASENAME $ISLINK`
25300        let COUNTER=COUNTER+1
25301      done
25302      cd $STARTDIR
25303      BINARY=$sym_link_dir/$sym_link_file
25304    fi
25305  fi
25306
25307    BOOT_JDK=`dirname "$BINARY"`
25308    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25309    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25310      # Looks like we found ourselves an JDK
25311      BOOT_JDK_FOUND=maybe
25312      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25313$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25314    fi
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 | $EGREP '\"9([\.+-].*)?\"|(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      if test -d "$path"; then
25471        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25472      else
25473        dir="`$DIRNAME "$path"`"
25474        base="`$BASENAME "$path"`"
25475        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25476      fi
25477    fi
25478  fi
25479
25480            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25481$as_echo_n "checking for Boot JDK... " >&6; }
25482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25483$as_echo "$BOOT_JDK" >&6; }
25484            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25485$as_echo_n "checking Boot JDK version... " >&6; }
25486            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25488$as_echo "$BOOT_JDK_VERSION" >&6; }
25489          fi # end check jdk version
25490        fi # end check javac
25491      fi # end check java
25492    fi # end check boot jdk found
25493  fi
25494
25495
25496  # Test: Is there a JDK installed in default, well-known locations?
25497
25498  if test "x$BOOT_JDK_FOUND" = xno; then
25499    # Now execute the test
25500
25501  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25502
25503  if test "x$BOOT_JDK_FOUND" = xno; then
25504    # Now execute the test
25505
25506  if test "x$ProgramW6432" != x; then
25507    VIRTUAL_DIR="$ProgramW6432/Java"
25508
25509  windows_path="$VIRTUAL_DIR"
25510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25511    unix_path=`$CYGPATH -u "$windows_path"`
25512    VIRTUAL_DIR="$unix_path"
25513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25515    VIRTUAL_DIR="$unix_path"
25516  fi
25517
25518
25519  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25520  BOOT_JDK_SUFFIX=""
25521  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25522  if test "x$ALL_JDKS_FOUND" != x; then
25523    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25524
25525  if test "x$BOOT_JDK_FOUND" = xno; then
25526    # Now execute the test
25527
25528        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25529        if test -d "$BOOT_JDK"; then
25530          BOOT_JDK_FOUND=maybe
25531          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25532$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25533        fi
25534
25535
25536    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25537    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25538      # Do we have a bin/java?
25539      if test ! -x "$BOOT_JDK/bin/java"; then
25540        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25541$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25542        BOOT_JDK_FOUND=no
25543      else
25544        # Do we have a bin/javac?
25545        if test ! -x "$BOOT_JDK/bin/javac"; then
25546          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25548          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25549$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25550          BOOT_JDK_FOUND=no
25551        else
25552          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25553          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25554
25555          # Extra M4 quote needed to protect [] in grep expression.
25556          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25557          if test "x$FOUND_CORRECT_VERSION" = x; then
25558            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25560            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25561$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25562            BOOT_JDK_FOUND=no
25563          else
25564            # We're done! :-)
25565            BOOT_JDK_FOUND=yes
25566
25567  # Only process if variable expands to non-empty
25568
25569  if test "x$BOOT_JDK" != x; then
25570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25571
25572  # Input might be given as Windows format, start by converting to
25573  # unix format.
25574  path="$BOOT_JDK"
25575  new_path=`$CYGPATH -u "$path"`
25576
25577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25580  # "foo.exe" is OK but "foo" is an error.
25581  #
25582  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25583  # It is also a way to make sure we got the proper file name for the real test later on.
25584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25585  if test "x$test_shortpath" = x; then
25586    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25587$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25588    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25589  fi
25590
25591  # Call helper function which possibly converts this using DOS-style short mode.
25592  # If so, the updated path is stored in $new_path.
25593
25594  input_path="$new_path"
25595  # Check if we need to convert this using DOS-style short mode. If the path
25596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25597  # take no chances and rewrite it.
25598  # Note: m4 eats our [], so we need to use [ and ] instead.
25599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25600  if test "x$has_forbidden_chars" != x; then
25601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25605      # Going to short mode and back again did indeed matter. Since short mode is
25606      # case insensitive, let's make it lowercase to improve readability.
25607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25608      # Now convert it back to Unix-style (cygpath)
25609      input_path=`$CYGPATH -u "$shortmode_path"`
25610      new_path="$input_path"
25611    fi
25612  fi
25613
25614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25615  if test "x$test_cygdrive_prefix" = x; then
25616    # As a simple fix, exclude /usr/bin since it's not a real path.
25617    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25619      # a path prefixed by /cygdrive for fixpath to work.
25620      new_path="$CYGWIN_ROOT_PATH$input_path"
25621    fi
25622  fi
25623
25624
25625  if test "x$path" != "x$new_path"; then
25626    BOOT_JDK="$new_path"
25627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25628$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25629  fi
25630
25631    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25632
25633  path="$BOOT_JDK"
25634  has_colon=`$ECHO $path | $GREP ^.:`
25635  new_path="$path"
25636  if test "x$has_colon" = x; then
25637    # Not in mixed or Windows style, start by that.
25638    new_path=`cmd //c echo $path`
25639  fi
25640
25641
25642  input_path="$new_path"
25643  # Check if we need to convert this using DOS-style short mode. If the path
25644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25645  # take no chances and rewrite it.
25646  # Note: m4 eats our [], so we need to use [ and ] instead.
25647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25648  if test "x$has_forbidden_chars" != x; then
25649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25651  fi
25652
25653
25654  windows_path="$new_path"
25655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25656    unix_path=`$CYGPATH -u "$windows_path"`
25657    new_path="$unix_path"
25658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25660    new_path="$unix_path"
25661  fi
25662
25663  if test "x$path" != "x$new_path"; then
25664    BOOT_JDK="$new_path"
25665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25666$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25667  fi
25668
25669  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25670  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25671
25672    else
25673      # We're on a unix platform. Hooray! :)
25674      path="$BOOT_JDK"
25675      has_space=`$ECHO "$path" | $GREP " "`
25676      if test "x$has_space" != x; then
25677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25678$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25679        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25680      fi
25681
25682      # Use eval to expand a potential ~
25683      eval path="$path"
25684      if test ! -f "$path" && test ! -d "$path"; then
25685        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25686      fi
25687
25688      if test -d "$path"; then
25689        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25690      else
25691        dir="`$DIRNAME "$path"`"
25692        base="`$BASENAME "$path"`"
25693        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25694      fi
25695    fi
25696  fi
25697
25698            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25699$as_echo_n "checking for Boot JDK... " >&6; }
25700            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25701$as_echo "$BOOT_JDK" >&6; }
25702            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25703$as_echo_n "checking Boot JDK version... " >&6; }
25704            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25706$as_echo "$BOOT_JDK_VERSION" >&6; }
25707          fi # end check jdk version
25708        fi # end check javac
25709      fi # end check java
25710    fi # end check boot jdk found
25711  fi
25712
25713    done
25714  fi
25715
25716  fi
25717
25718
25719    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25720    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25721      # Do we have a bin/java?
25722      if test ! -x "$BOOT_JDK/bin/java"; then
25723        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25725        BOOT_JDK_FOUND=no
25726      else
25727        # Do we have a bin/javac?
25728        if test ! -x "$BOOT_JDK/bin/javac"; then
25729          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25731          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25732$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25733          BOOT_JDK_FOUND=no
25734        else
25735          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25736          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25737
25738          # Extra M4 quote needed to protect [] in grep expression.
25739          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25740          if test "x$FOUND_CORRECT_VERSION" = x; then
25741            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25743            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25744$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25745            BOOT_JDK_FOUND=no
25746          else
25747            # We're done! :-)
25748            BOOT_JDK_FOUND=yes
25749
25750  # Only process if variable expands to non-empty
25751
25752  if test "x$BOOT_JDK" != x; then
25753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25754
25755  # Input might be given as Windows format, start by converting to
25756  # unix format.
25757  path="$BOOT_JDK"
25758  new_path=`$CYGPATH -u "$path"`
25759
25760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25763  # "foo.exe" is OK but "foo" is an error.
25764  #
25765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25766  # It is also a way to make sure we got the proper file name for the real test later on.
25767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25768  if test "x$test_shortpath" = x; then
25769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25770$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25771    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25772  fi
25773
25774  # Call helper function which possibly converts this using DOS-style short mode.
25775  # If so, the updated path is stored in $new_path.
25776
25777  input_path="$new_path"
25778  # Check if we need to convert this using DOS-style short mode. If the path
25779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25780  # take no chances and rewrite it.
25781  # Note: m4 eats our [], so we need to use [ and ] instead.
25782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25783  if test "x$has_forbidden_chars" != x; then
25784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25788      # Going to short mode and back again did indeed matter. Since short mode is
25789      # case insensitive, let's make it lowercase to improve readability.
25790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25791      # Now convert it back to Unix-style (cygpath)
25792      input_path=`$CYGPATH -u "$shortmode_path"`
25793      new_path="$input_path"
25794    fi
25795  fi
25796
25797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25798  if test "x$test_cygdrive_prefix" = x; then
25799    # As a simple fix, exclude /usr/bin since it's not a real path.
25800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25802      # a path prefixed by /cygdrive for fixpath to work.
25803      new_path="$CYGWIN_ROOT_PATH$input_path"
25804    fi
25805  fi
25806
25807
25808  if test "x$path" != "x$new_path"; then
25809    BOOT_JDK="$new_path"
25810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25811$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25812  fi
25813
25814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25815
25816  path="$BOOT_JDK"
25817  has_colon=`$ECHO $path | $GREP ^.:`
25818  new_path="$path"
25819  if test "x$has_colon" = x; then
25820    # Not in mixed or Windows style, start by that.
25821    new_path=`cmd //c echo $path`
25822  fi
25823
25824
25825  input_path="$new_path"
25826  # Check if we need to convert this using DOS-style short mode. If the path
25827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25828  # take no chances and rewrite it.
25829  # Note: m4 eats our [], so we need to use [ and ] instead.
25830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25831  if test "x$has_forbidden_chars" != x; then
25832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25834  fi
25835
25836
25837  windows_path="$new_path"
25838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25839    unix_path=`$CYGPATH -u "$windows_path"`
25840    new_path="$unix_path"
25841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25843    new_path="$unix_path"
25844  fi
25845
25846  if test "x$path" != "x$new_path"; then
25847    BOOT_JDK="$new_path"
25848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25849$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25850  fi
25851
25852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25854
25855    else
25856      # We're on a unix platform. Hooray! :)
25857      path="$BOOT_JDK"
25858      has_space=`$ECHO "$path" | $GREP " "`
25859      if test "x$has_space" != x; then
25860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25861$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25863      fi
25864
25865      # Use eval to expand a potential ~
25866      eval path="$path"
25867      if test ! -f "$path" && test ! -d "$path"; then
25868        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25869      fi
25870
25871      if test -d "$path"; then
25872        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25873      else
25874        dir="`$DIRNAME "$path"`"
25875        base="`$BASENAME "$path"`"
25876        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25877      fi
25878    fi
25879  fi
25880
25881            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25882$as_echo_n "checking for Boot JDK... " >&6; }
25883            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25884$as_echo "$BOOT_JDK" >&6; }
25885            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25886$as_echo_n "checking Boot JDK version... " >&6; }
25887            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25889$as_echo "$BOOT_JDK_VERSION" >&6; }
25890          fi # end check jdk version
25891        fi # end check javac
25892      fi # end check java
25893    fi # end check boot jdk found
25894  fi
25895
25896
25897  if test "x$BOOT_JDK_FOUND" = xno; then
25898    # Now execute the test
25899
25900  if test "x$PROGRAMW6432" != x; then
25901    VIRTUAL_DIR="$PROGRAMW6432/Java"
25902
25903  windows_path="$VIRTUAL_DIR"
25904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25905    unix_path=`$CYGPATH -u "$windows_path"`
25906    VIRTUAL_DIR="$unix_path"
25907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25909    VIRTUAL_DIR="$unix_path"
25910  fi
25911
25912
25913  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25914  BOOT_JDK_SUFFIX=""
25915  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25916  if test "x$ALL_JDKS_FOUND" != x; then
25917    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25918
25919  if test "x$BOOT_JDK_FOUND" = xno; then
25920    # Now execute the test
25921
25922        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25923        if test -d "$BOOT_JDK"; then
25924          BOOT_JDK_FOUND=maybe
25925          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25926$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25927        fi
25928
25929
25930    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25931    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25932      # Do we have a bin/java?
25933      if test ! -x "$BOOT_JDK/bin/java"; then
25934        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25936        BOOT_JDK_FOUND=no
25937      else
25938        # Do we have a bin/javac?
25939        if test ! -x "$BOOT_JDK/bin/javac"; then
25940          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25942          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25943$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25944          BOOT_JDK_FOUND=no
25945        else
25946          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25947          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25948
25949          # Extra M4 quote needed to protect [] in grep expression.
25950          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25951          if test "x$FOUND_CORRECT_VERSION" = x; then
25952            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25954            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25955$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25956            BOOT_JDK_FOUND=no
25957          else
25958            # We're done! :-)
25959            BOOT_JDK_FOUND=yes
25960
25961  # Only process if variable expands to non-empty
25962
25963  if test "x$BOOT_JDK" != x; then
25964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25965
25966  # Input might be given as Windows format, start by converting to
25967  # unix format.
25968  path="$BOOT_JDK"
25969  new_path=`$CYGPATH -u "$path"`
25970
25971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25974  # "foo.exe" is OK but "foo" is an error.
25975  #
25976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25977  # It is also a way to make sure we got the proper file name for the real test later on.
25978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25979  if test "x$test_shortpath" = x; then
25980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25982    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25983  fi
25984
25985  # Call helper function which possibly converts this using DOS-style short mode.
25986  # If so, the updated path is stored in $new_path.
25987
25988  input_path="$new_path"
25989  # Check if we need to convert this using DOS-style short mode. If the path
25990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25991  # take no chances and rewrite it.
25992  # Note: m4 eats our [], so we need to use [ and ] instead.
25993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25994  if test "x$has_forbidden_chars" != x; then
25995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25999      # Going to short mode and back again did indeed matter. Since short mode is
26000      # case insensitive, let's make it lowercase to improve readability.
26001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26002      # Now convert it back to Unix-style (cygpath)
26003      input_path=`$CYGPATH -u "$shortmode_path"`
26004      new_path="$input_path"
26005    fi
26006  fi
26007
26008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26009  if test "x$test_cygdrive_prefix" = x; then
26010    # As a simple fix, exclude /usr/bin since it's not a real path.
26011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26013      # a path prefixed by /cygdrive for fixpath to work.
26014      new_path="$CYGWIN_ROOT_PATH$input_path"
26015    fi
26016  fi
26017
26018
26019  if test "x$path" != "x$new_path"; then
26020    BOOT_JDK="$new_path"
26021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26023  fi
26024
26025    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26026
26027  path="$BOOT_JDK"
26028  has_colon=`$ECHO $path | $GREP ^.:`
26029  new_path="$path"
26030  if test "x$has_colon" = x; then
26031    # Not in mixed or Windows style, start by that.
26032    new_path=`cmd //c echo $path`
26033  fi
26034
26035
26036  input_path="$new_path"
26037  # Check if we need to convert this using DOS-style short mode. If the path
26038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26039  # take no chances and rewrite it.
26040  # Note: m4 eats our [], so we need to use [ and ] instead.
26041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26042  if test "x$has_forbidden_chars" != x; then
26043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26045  fi
26046
26047
26048  windows_path="$new_path"
26049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26050    unix_path=`$CYGPATH -u "$windows_path"`
26051    new_path="$unix_path"
26052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26054    new_path="$unix_path"
26055  fi
26056
26057  if test "x$path" != "x$new_path"; then
26058    BOOT_JDK="$new_path"
26059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26061  fi
26062
26063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26065
26066    else
26067      # We're on a unix platform. Hooray! :)
26068      path="$BOOT_JDK"
26069      has_space=`$ECHO "$path" | $GREP " "`
26070      if test "x$has_space" != x; then
26071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26073        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26074      fi
26075
26076      # Use eval to expand a potential ~
26077      eval path="$path"
26078      if test ! -f "$path" && test ! -d "$path"; then
26079        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26080      fi
26081
26082      if test -d "$path"; then
26083        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26084      else
26085        dir="`$DIRNAME "$path"`"
26086        base="`$BASENAME "$path"`"
26087        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26088      fi
26089    fi
26090  fi
26091
26092            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26093$as_echo_n "checking for Boot JDK... " >&6; }
26094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26095$as_echo "$BOOT_JDK" >&6; }
26096            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26097$as_echo_n "checking Boot JDK version... " >&6; }
26098            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26100$as_echo "$BOOT_JDK_VERSION" >&6; }
26101          fi # end check jdk version
26102        fi # end check javac
26103      fi # end check java
26104    fi # end check boot jdk found
26105  fi
26106
26107    done
26108  fi
26109
26110  fi
26111
26112
26113    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26114    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26115      # Do we have a bin/java?
26116      if test ! -x "$BOOT_JDK/bin/java"; then
26117        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26119        BOOT_JDK_FOUND=no
26120      else
26121        # Do we have a bin/javac?
26122        if test ! -x "$BOOT_JDK/bin/javac"; then
26123          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26125          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26126$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26127          BOOT_JDK_FOUND=no
26128        else
26129          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26130          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26131
26132          # Extra M4 quote needed to protect [] in grep expression.
26133          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26134          if test "x$FOUND_CORRECT_VERSION" = x; then
26135            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26137            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26138$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26139            BOOT_JDK_FOUND=no
26140          else
26141            # We're done! :-)
26142            BOOT_JDK_FOUND=yes
26143
26144  # Only process if variable expands to non-empty
26145
26146  if test "x$BOOT_JDK" != x; then
26147    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26148
26149  # Input might be given as Windows format, start by converting to
26150  # unix format.
26151  path="$BOOT_JDK"
26152  new_path=`$CYGPATH -u "$path"`
26153
26154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26157  # "foo.exe" is OK but "foo" is an error.
26158  #
26159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26160  # It is also a way to make sure we got the proper file name for the real test later on.
26161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26162  if test "x$test_shortpath" = x; then
26163    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26164$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26165    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26166  fi
26167
26168  # Call helper function which possibly converts this using DOS-style short mode.
26169  # If so, the updated path is stored in $new_path.
26170
26171  input_path="$new_path"
26172  # Check if we need to convert this using DOS-style short mode. If the path
26173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26174  # take no chances and rewrite it.
26175  # Note: m4 eats our [], so we need to use [ and ] instead.
26176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26177  if test "x$has_forbidden_chars" != x; then
26178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26182      # Going to short mode and back again did indeed matter. Since short mode is
26183      # case insensitive, let's make it lowercase to improve readability.
26184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26185      # Now convert it back to Unix-style (cygpath)
26186      input_path=`$CYGPATH -u "$shortmode_path"`
26187      new_path="$input_path"
26188    fi
26189  fi
26190
26191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26192  if test "x$test_cygdrive_prefix" = x; then
26193    # As a simple fix, exclude /usr/bin since it's not a real path.
26194    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26196      # a path prefixed by /cygdrive for fixpath to work.
26197      new_path="$CYGWIN_ROOT_PATH$input_path"
26198    fi
26199  fi
26200
26201
26202  if test "x$path" != "x$new_path"; then
26203    BOOT_JDK="$new_path"
26204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26205$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26206  fi
26207
26208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26209
26210  path="$BOOT_JDK"
26211  has_colon=`$ECHO $path | $GREP ^.:`
26212  new_path="$path"
26213  if test "x$has_colon" = x; then
26214    # Not in mixed or Windows style, start by that.
26215    new_path=`cmd //c echo $path`
26216  fi
26217
26218
26219  input_path="$new_path"
26220  # Check if we need to convert this using DOS-style short mode. If the path
26221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26222  # take no chances and rewrite it.
26223  # Note: m4 eats our [], so we need to use [ and ] instead.
26224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26225  if test "x$has_forbidden_chars" != x; then
26226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26228  fi
26229
26230
26231  windows_path="$new_path"
26232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26233    unix_path=`$CYGPATH -u "$windows_path"`
26234    new_path="$unix_path"
26235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26237    new_path="$unix_path"
26238  fi
26239
26240  if test "x$path" != "x$new_path"; then
26241    BOOT_JDK="$new_path"
26242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26243$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26244  fi
26245
26246  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26247  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26248
26249    else
26250      # We're on a unix platform. Hooray! :)
26251      path="$BOOT_JDK"
26252      has_space=`$ECHO "$path" | $GREP " "`
26253      if test "x$has_space" != x; then
26254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26255$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26256        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26257      fi
26258
26259      # Use eval to expand a potential ~
26260      eval path="$path"
26261      if test ! -f "$path" && test ! -d "$path"; then
26262        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26263      fi
26264
26265      if test -d "$path"; then
26266        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26267      else
26268        dir="`$DIRNAME "$path"`"
26269        base="`$BASENAME "$path"`"
26270        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26271      fi
26272    fi
26273  fi
26274
26275            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26276$as_echo_n "checking for Boot JDK... " >&6; }
26277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26278$as_echo "$BOOT_JDK" >&6; }
26279            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26280$as_echo_n "checking Boot JDK version... " >&6; }
26281            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26283$as_echo "$BOOT_JDK_VERSION" >&6; }
26284          fi # end check jdk version
26285        fi # end check javac
26286      fi # end check java
26287    fi # end check boot jdk found
26288  fi
26289
26290
26291  if test "x$BOOT_JDK_FOUND" = xno; then
26292    # Now execute the test
26293
26294  if test "x$PROGRAMFILES" != x; then
26295    VIRTUAL_DIR="$PROGRAMFILES/Java"
26296
26297  windows_path="$VIRTUAL_DIR"
26298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26299    unix_path=`$CYGPATH -u "$windows_path"`
26300    VIRTUAL_DIR="$unix_path"
26301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26303    VIRTUAL_DIR="$unix_path"
26304  fi
26305
26306
26307  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26308  BOOT_JDK_SUFFIX=""
26309  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26310  if test "x$ALL_JDKS_FOUND" != x; then
26311    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26312
26313  if test "x$BOOT_JDK_FOUND" = xno; then
26314    # Now execute the test
26315
26316        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26317        if test -d "$BOOT_JDK"; then
26318          BOOT_JDK_FOUND=maybe
26319          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26320$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26321        fi
26322
26323
26324    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26325    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26326      # Do we have a bin/java?
26327      if test ! -x "$BOOT_JDK/bin/java"; then
26328        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26330        BOOT_JDK_FOUND=no
26331      else
26332        # Do we have a bin/javac?
26333        if test ! -x "$BOOT_JDK/bin/javac"; then
26334          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26336          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26337$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26338          BOOT_JDK_FOUND=no
26339        else
26340          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26341          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26342
26343          # Extra M4 quote needed to protect [] in grep expression.
26344          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26345          if test "x$FOUND_CORRECT_VERSION" = x; then
26346            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26348            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26349$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26350            BOOT_JDK_FOUND=no
26351          else
26352            # We're done! :-)
26353            BOOT_JDK_FOUND=yes
26354
26355  # Only process if variable expands to non-empty
26356
26357  if test "x$BOOT_JDK" != x; then
26358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26359
26360  # Input might be given as Windows format, start by converting to
26361  # unix format.
26362  path="$BOOT_JDK"
26363  new_path=`$CYGPATH -u "$path"`
26364
26365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26368  # "foo.exe" is OK but "foo" is an error.
26369  #
26370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26371  # It is also a way to make sure we got the proper file name for the real test later on.
26372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26373  if test "x$test_shortpath" = x; then
26374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26376    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26377  fi
26378
26379  # Call helper function which possibly converts this using DOS-style short mode.
26380  # If so, the updated path is stored in $new_path.
26381
26382  input_path="$new_path"
26383  # Check if we need to convert this using DOS-style short mode. If the path
26384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26385  # take no chances and rewrite it.
26386  # Note: m4 eats our [], so we need to use [ and ] instead.
26387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26388  if test "x$has_forbidden_chars" != x; then
26389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26393      # Going to short mode and back again did indeed matter. Since short mode is
26394      # case insensitive, let's make it lowercase to improve readability.
26395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26396      # Now convert it back to Unix-style (cygpath)
26397      input_path=`$CYGPATH -u "$shortmode_path"`
26398      new_path="$input_path"
26399    fi
26400  fi
26401
26402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26403  if test "x$test_cygdrive_prefix" = x; then
26404    # As a simple fix, exclude /usr/bin since it's not a real path.
26405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26407      # a path prefixed by /cygdrive for fixpath to work.
26408      new_path="$CYGWIN_ROOT_PATH$input_path"
26409    fi
26410  fi
26411
26412
26413  if test "x$path" != "x$new_path"; then
26414    BOOT_JDK="$new_path"
26415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26417  fi
26418
26419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26420
26421  path="$BOOT_JDK"
26422  has_colon=`$ECHO $path | $GREP ^.:`
26423  new_path="$path"
26424  if test "x$has_colon" = x; then
26425    # Not in mixed or Windows style, start by that.
26426    new_path=`cmd //c echo $path`
26427  fi
26428
26429
26430  input_path="$new_path"
26431  # Check if we need to convert this using DOS-style short mode. If the path
26432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26433  # take no chances and rewrite it.
26434  # Note: m4 eats our [], so we need to use [ and ] instead.
26435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26436  if test "x$has_forbidden_chars" != x; then
26437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26439  fi
26440
26441
26442  windows_path="$new_path"
26443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26444    unix_path=`$CYGPATH -u "$windows_path"`
26445    new_path="$unix_path"
26446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26448    new_path="$unix_path"
26449  fi
26450
26451  if test "x$path" != "x$new_path"; then
26452    BOOT_JDK="$new_path"
26453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26455  fi
26456
26457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26459
26460    else
26461      # We're on a unix platform. Hooray! :)
26462      path="$BOOT_JDK"
26463      has_space=`$ECHO "$path" | $GREP " "`
26464      if test "x$has_space" != x; then
26465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26466$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26468      fi
26469
26470      # Use eval to expand a potential ~
26471      eval path="$path"
26472      if test ! -f "$path" && test ! -d "$path"; then
26473        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26474      fi
26475
26476      if test -d "$path"; then
26477        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26478      else
26479        dir="`$DIRNAME "$path"`"
26480        base="`$BASENAME "$path"`"
26481        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26482      fi
26483    fi
26484  fi
26485
26486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26487$as_echo_n "checking for Boot JDK... " >&6; }
26488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26489$as_echo "$BOOT_JDK" >&6; }
26490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26491$as_echo_n "checking Boot JDK version... " >&6; }
26492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26494$as_echo "$BOOT_JDK_VERSION" >&6; }
26495          fi # end check jdk version
26496        fi # end check javac
26497      fi # end check java
26498    fi # end check boot jdk found
26499  fi
26500
26501    done
26502  fi
26503
26504  fi
26505
26506
26507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26509      # Do we have a bin/java?
26510      if test ! -x "$BOOT_JDK/bin/java"; then
26511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26513        BOOT_JDK_FOUND=no
26514      else
26515        # Do we have a bin/javac?
26516        if test ! -x "$BOOT_JDK/bin/javac"; then
26517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26521          BOOT_JDK_FOUND=no
26522        else
26523          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26524          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26525
26526          # Extra M4 quote needed to protect [] in grep expression.
26527          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26528          if test "x$FOUND_CORRECT_VERSION" = x; then
26529            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26531            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26532$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26533            BOOT_JDK_FOUND=no
26534          else
26535            # We're done! :-)
26536            BOOT_JDK_FOUND=yes
26537
26538  # Only process if variable expands to non-empty
26539
26540  if test "x$BOOT_JDK" != x; then
26541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26542
26543  # Input might be given as Windows format, start by converting to
26544  # unix format.
26545  path="$BOOT_JDK"
26546  new_path=`$CYGPATH -u "$path"`
26547
26548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26551  # "foo.exe" is OK but "foo" is an error.
26552  #
26553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26554  # It is also a way to make sure we got the proper file name for the real test later on.
26555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26556  if test "x$test_shortpath" = x; then
26557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26559    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26560  fi
26561
26562  # Call helper function which possibly converts this using DOS-style short mode.
26563  # If so, the updated path is stored in $new_path.
26564
26565  input_path="$new_path"
26566  # Check if we need to convert this using DOS-style short mode. If the path
26567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26568  # take no chances and rewrite it.
26569  # Note: m4 eats our [], so we need to use [ and ] instead.
26570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26571  if test "x$has_forbidden_chars" != x; then
26572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26576      # Going to short mode and back again did indeed matter. Since short mode is
26577      # case insensitive, let's make it lowercase to improve readability.
26578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26579      # Now convert it back to Unix-style (cygpath)
26580      input_path=`$CYGPATH -u "$shortmode_path"`
26581      new_path="$input_path"
26582    fi
26583  fi
26584
26585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26586  if test "x$test_cygdrive_prefix" = x; then
26587    # As a simple fix, exclude /usr/bin since it's not a real path.
26588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26590      # a path prefixed by /cygdrive for fixpath to work.
26591      new_path="$CYGWIN_ROOT_PATH$input_path"
26592    fi
26593  fi
26594
26595
26596  if test "x$path" != "x$new_path"; then
26597    BOOT_JDK="$new_path"
26598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26600  fi
26601
26602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26603
26604  path="$BOOT_JDK"
26605  has_colon=`$ECHO $path | $GREP ^.:`
26606  new_path="$path"
26607  if test "x$has_colon" = x; then
26608    # Not in mixed or Windows style, start by that.
26609    new_path=`cmd //c echo $path`
26610  fi
26611
26612
26613  input_path="$new_path"
26614  # Check if we need to convert this using DOS-style short mode. If the path
26615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26616  # take no chances and rewrite it.
26617  # Note: m4 eats our [], so we need to use [ and ] instead.
26618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26619  if test "x$has_forbidden_chars" != x; then
26620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26622  fi
26623
26624
26625  windows_path="$new_path"
26626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26627    unix_path=`$CYGPATH -u "$windows_path"`
26628    new_path="$unix_path"
26629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26631    new_path="$unix_path"
26632  fi
26633
26634  if test "x$path" != "x$new_path"; then
26635    BOOT_JDK="$new_path"
26636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26638  fi
26639
26640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26642
26643    else
26644      # We're on a unix platform. Hooray! :)
26645      path="$BOOT_JDK"
26646      has_space=`$ECHO "$path" | $GREP " "`
26647      if test "x$has_space" != x; then
26648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26651      fi
26652
26653      # Use eval to expand a potential ~
26654      eval path="$path"
26655      if test ! -f "$path" && test ! -d "$path"; then
26656        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26657      fi
26658
26659      if test -d "$path"; then
26660        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26661      else
26662        dir="`$DIRNAME "$path"`"
26663        base="`$BASENAME "$path"`"
26664        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26665      fi
26666    fi
26667  fi
26668
26669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26670$as_echo_n "checking for Boot JDK... " >&6; }
26671            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26672$as_echo "$BOOT_JDK" >&6; }
26673            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26674$as_echo_n "checking Boot JDK version... " >&6; }
26675            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26677$as_echo "$BOOT_JDK_VERSION" >&6; }
26678          fi # end check jdk version
26679        fi # end check javac
26680      fi # end check java
26681    fi # end check boot jdk found
26682  fi
26683
26684
26685  if test "x$BOOT_JDK_FOUND" = xno; then
26686    # Now execute the test
26687
26688  if test "x$ProgramFiles" != x; then
26689    VIRTUAL_DIR="$ProgramFiles/Java"
26690
26691  windows_path="$VIRTUAL_DIR"
26692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26693    unix_path=`$CYGPATH -u "$windows_path"`
26694    VIRTUAL_DIR="$unix_path"
26695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26697    VIRTUAL_DIR="$unix_path"
26698  fi
26699
26700
26701  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26702  BOOT_JDK_SUFFIX=""
26703  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26704  if test "x$ALL_JDKS_FOUND" != x; then
26705    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26706
26707  if test "x$BOOT_JDK_FOUND" = xno; then
26708    # Now execute the test
26709
26710        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26711        if test -d "$BOOT_JDK"; then
26712          BOOT_JDK_FOUND=maybe
26713          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26714$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26715        fi
26716
26717
26718    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26719    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26720      # Do we have a bin/java?
26721      if test ! -x "$BOOT_JDK/bin/java"; then
26722        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26724        BOOT_JDK_FOUND=no
26725      else
26726        # Do we have a bin/javac?
26727        if test ! -x "$BOOT_JDK/bin/javac"; then
26728          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26730          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26731$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26732          BOOT_JDK_FOUND=no
26733        else
26734          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26735          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26736
26737          # Extra M4 quote needed to protect [] in grep expression.
26738          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26739          if test "x$FOUND_CORRECT_VERSION" = x; then
26740            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26742            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26743$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26744            BOOT_JDK_FOUND=no
26745          else
26746            # We're done! :-)
26747            BOOT_JDK_FOUND=yes
26748
26749  # Only process if variable expands to non-empty
26750
26751  if test "x$BOOT_JDK" != x; then
26752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26753
26754  # Input might be given as Windows format, start by converting to
26755  # unix format.
26756  path="$BOOT_JDK"
26757  new_path=`$CYGPATH -u "$path"`
26758
26759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26762  # "foo.exe" is OK but "foo" is an error.
26763  #
26764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26765  # It is also a way to make sure we got the proper file name for the real test later on.
26766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26767  if test "x$test_shortpath" = x; then
26768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26769$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26770    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26771  fi
26772
26773  # Call helper function which possibly converts this using DOS-style short mode.
26774  # If so, the updated path is stored in $new_path.
26775
26776  input_path="$new_path"
26777  # Check if we need to convert this using DOS-style short mode. If the path
26778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26779  # take no chances and rewrite it.
26780  # Note: m4 eats our [], so we need to use [ and ] instead.
26781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26782  if test "x$has_forbidden_chars" != x; then
26783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26787      # Going to short mode and back again did indeed matter. Since short mode is
26788      # case insensitive, let's make it lowercase to improve readability.
26789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26790      # Now convert it back to Unix-style (cygpath)
26791      input_path=`$CYGPATH -u "$shortmode_path"`
26792      new_path="$input_path"
26793    fi
26794  fi
26795
26796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26797  if test "x$test_cygdrive_prefix" = x; then
26798    # As a simple fix, exclude /usr/bin since it's not a real path.
26799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26801      # a path prefixed by /cygdrive for fixpath to work.
26802      new_path="$CYGWIN_ROOT_PATH$input_path"
26803    fi
26804  fi
26805
26806
26807  if test "x$path" != "x$new_path"; then
26808    BOOT_JDK="$new_path"
26809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26811  fi
26812
26813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26814
26815  path="$BOOT_JDK"
26816  has_colon=`$ECHO $path | $GREP ^.:`
26817  new_path="$path"
26818  if test "x$has_colon" = x; then
26819    # Not in mixed or Windows style, start by that.
26820    new_path=`cmd //c echo $path`
26821  fi
26822
26823
26824  input_path="$new_path"
26825  # Check if we need to convert this using DOS-style short mode. If the path
26826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26827  # take no chances and rewrite it.
26828  # Note: m4 eats our [], so we need to use [ and ] instead.
26829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26830  if test "x$has_forbidden_chars" != x; then
26831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26833  fi
26834
26835
26836  windows_path="$new_path"
26837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26838    unix_path=`$CYGPATH -u "$windows_path"`
26839    new_path="$unix_path"
26840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26842    new_path="$unix_path"
26843  fi
26844
26845  if test "x$path" != "x$new_path"; then
26846    BOOT_JDK="$new_path"
26847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26848$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26849  fi
26850
26851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26853
26854    else
26855      # We're on a unix platform. Hooray! :)
26856      path="$BOOT_JDK"
26857      has_space=`$ECHO "$path" | $GREP " "`
26858      if test "x$has_space" != x; then
26859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26860$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26862      fi
26863
26864      # Use eval to expand a potential ~
26865      eval path="$path"
26866      if test ! -f "$path" && test ! -d "$path"; then
26867        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26868      fi
26869
26870      if test -d "$path"; then
26871        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26872      else
26873        dir="`$DIRNAME "$path"`"
26874        base="`$BASENAME "$path"`"
26875        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26876      fi
26877    fi
26878  fi
26879
26880            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26881$as_echo_n "checking for Boot JDK... " >&6; }
26882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26883$as_echo "$BOOT_JDK" >&6; }
26884            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26885$as_echo_n "checking Boot JDK version... " >&6; }
26886            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26888$as_echo "$BOOT_JDK_VERSION" >&6; }
26889          fi # end check jdk version
26890        fi # end check javac
26891      fi # end check java
26892    fi # end check boot jdk found
26893  fi
26894
26895    done
26896  fi
26897
26898  fi
26899
26900
26901    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26902    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26903      # Do we have a bin/java?
26904      if test ! -x "$BOOT_JDK/bin/java"; then
26905        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26907        BOOT_JDK_FOUND=no
26908      else
26909        # Do we have a bin/javac?
26910        if test ! -x "$BOOT_JDK/bin/javac"; then
26911          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26913          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26914$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26915          BOOT_JDK_FOUND=no
26916        else
26917          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26918          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26919
26920          # Extra M4 quote needed to protect [] in grep expression.
26921          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26922          if test "x$FOUND_CORRECT_VERSION" = x; then
26923            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26924$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26925            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26926$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26927            BOOT_JDK_FOUND=no
26928          else
26929            # We're done! :-)
26930            BOOT_JDK_FOUND=yes
26931
26932  # Only process if variable expands to non-empty
26933
26934  if test "x$BOOT_JDK" != x; then
26935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26936
26937  # Input might be given as Windows format, start by converting to
26938  # unix format.
26939  path="$BOOT_JDK"
26940  new_path=`$CYGPATH -u "$path"`
26941
26942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26945  # "foo.exe" is OK but "foo" is an error.
26946  #
26947  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26948  # It is also a way to make sure we got the proper file name for the real test later on.
26949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26950  if test "x$test_shortpath" = x; then
26951    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26952$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26953    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26954  fi
26955
26956  # Call helper function which possibly converts this using DOS-style short mode.
26957  # If so, the updated path is stored in $new_path.
26958
26959  input_path="$new_path"
26960  # Check if we need to convert this using DOS-style short mode. If the path
26961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26962  # take no chances and rewrite it.
26963  # Note: m4 eats our [], so we need to use [ and ] instead.
26964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26965  if test "x$has_forbidden_chars" != x; then
26966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26970      # Going to short mode and back again did indeed matter. Since short mode is
26971      # case insensitive, let's make it lowercase to improve readability.
26972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26973      # Now convert it back to Unix-style (cygpath)
26974      input_path=`$CYGPATH -u "$shortmode_path"`
26975      new_path="$input_path"
26976    fi
26977  fi
26978
26979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26980  if test "x$test_cygdrive_prefix" = x; then
26981    # As a simple fix, exclude /usr/bin since it's not a real path.
26982    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26984      # a path prefixed by /cygdrive for fixpath to work.
26985      new_path="$CYGWIN_ROOT_PATH$input_path"
26986    fi
26987  fi
26988
26989
26990  if test "x$path" != "x$new_path"; then
26991    BOOT_JDK="$new_path"
26992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26993$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26994  fi
26995
26996    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26997
26998  path="$BOOT_JDK"
26999  has_colon=`$ECHO $path | $GREP ^.:`
27000  new_path="$path"
27001  if test "x$has_colon" = x; then
27002    # Not in mixed or Windows style, start by that.
27003    new_path=`cmd //c echo $path`
27004  fi
27005
27006
27007  input_path="$new_path"
27008  # Check if we need to convert this using DOS-style short mode. If the path
27009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27010  # take no chances and rewrite it.
27011  # Note: m4 eats our [], so we need to use [ and ] instead.
27012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27013  if test "x$has_forbidden_chars" != x; then
27014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27016  fi
27017
27018
27019  windows_path="$new_path"
27020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27021    unix_path=`$CYGPATH -u "$windows_path"`
27022    new_path="$unix_path"
27023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27025    new_path="$unix_path"
27026  fi
27027
27028  if test "x$path" != "x$new_path"; then
27029    BOOT_JDK="$new_path"
27030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27032  fi
27033
27034  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27035  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27036
27037    else
27038      # We're on a unix platform. Hooray! :)
27039      path="$BOOT_JDK"
27040      has_space=`$ECHO "$path" | $GREP " "`
27041      if test "x$has_space" != x; then
27042        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27043$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27044        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27045      fi
27046
27047      # Use eval to expand a potential ~
27048      eval path="$path"
27049      if test ! -f "$path" && test ! -d "$path"; then
27050        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27051      fi
27052
27053      if test -d "$path"; then
27054        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27055      else
27056        dir="`$DIRNAME "$path"`"
27057        base="`$BASENAME "$path"`"
27058        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27059      fi
27060    fi
27061  fi
27062
27063            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27064$as_echo_n "checking for Boot JDK... " >&6; }
27065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27066$as_echo "$BOOT_JDK" >&6; }
27067            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27068$as_echo_n "checking Boot JDK version... " >&6; }
27069            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27071$as_echo "$BOOT_JDK_VERSION" >&6; }
27072          fi # end check jdk version
27073        fi # end check javac
27074      fi # end check java
27075    fi # end check boot jdk found
27076  fi
27077
27078
27079  if test "x$BOOT_JDK_FOUND" = xno; then
27080    # Now execute the test
27081
27082  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27083  BOOT_JDK_SUFFIX=""
27084  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27085  if test "x$ALL_JDKS_FOUND" != x; then
27086    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27087
27088  if test "x$BOOT_JDK_FOUND" = xno; then
27089    # Now execute the test
27090
27091        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27092        if test -d "$BOOT_JDK"; then
27093          BOOT_JDK_FOUND=maybe
27094          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27095$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27096        fi
27097
27098
27099    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27100    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27101      # Do we have a bin/java?
27102      if test ! -x "$BOOT_JDK/bin/java"; then
27103        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27105        BOOT_JDK_FOUND=no
27106      else
27107        # Do we have a bin/javac?
27108        if test ! -x "$BOOT_JDK/bin/javac"; then
27109          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27111          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27112$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27113          BOOT_JDK_FOUND=no
27114        else
27115          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27116          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27117
27118          # Extra M4 quote needed to protect [] in grep expression.
27119          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27120          if test "x$FOUND_CORRECT_VERSION" = x; then
27121            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27123            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27124$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27125            BOOT_JDK_FOUND=no
27126          else
27127            # We're done! :-)
27128            BOOT_JDK_FOUND=yes
27129
27130  # Only process if variable expands to non-empty
27131
27132  if test "x$BOOT_JDK" != x; then
27133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27134
27135  # Input might be given as Windows format, start by converting to
27136  # unix format.
27137  path="$BOOT_JDK"
27138  new_path=`$CYGPATH -u "$path"`
27139
27140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27143  # "foo.exe" is OK but "foo" is an error.
27144  #
27145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27146  # It is also a way to make sure we got the proper file name for the real test later on.
27147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27148  if test "x$test_shortpath" = x; then
27149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27150$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27151    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27152  fi
27153
27154  # Call helper function which possibly converts this using DOS-style short mode.
27155  # If so, the updated path is stored in $new_path.
27156
27157  input_path="$new_path"
27158  # Check if we need to convert this using DOS-style short mode. If the path
27159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27160  # take no chances and rewrite it.
27161  # Note: m4 eats our [], so we need to use [ and ] instead.
27162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27163  if test "x$has_forbidden_chars" != x; then
27164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27168      # Going to short mode and back again did indeed matter. Since short mode is
27169      # case insensitive, let's make it lowercase to improve readability.
27170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27171      # Now convert it back to Unix-style (cygpath)
27172      input_path=`$CYGPATH -u "$shortmode_path"`
27173      new_path="$input_path"
27174    fi
27175  fi
27176
27177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27178  if test "x$test_cygdrive_prefix" = x; then
27179    # As a simple fix, exclude /usr/bin since it's not a real path.
27180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27182      # a path prefixed by /cygdrive for fixpath to work.
27183      new_path="$CYGWIN_ROOT_PATH$input_path"
27184    fi
27185  fi
27186
27187
27188  if test "x$path" != "x$new_path"; then
27189    BOOT_JDK="$new_path"
27190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27192  fi
27193
27194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27195
27196  path="$BOOT_JDK"
27197  has_colon=`$ECHO $path | $GREP ^.:`
27198  new_path="$path"
27199  if test "x$has_colon" = x; then
27200    # Not in mixed or Windows style, start by that.
27201    new_path=`cmd //c echo $path`
27202  fi
27203
27204
27205  input_path="$new_path"
27206  # Check if we need to convert this using DOS-style short mode. If the path
27207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27208  # take no chances and rewrite it.
27209  # Note: m4 eats our [], so we need to use [ and ] instead.
27210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27211  if test "x$has_forbidden_chars" != x; then
27212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27214  fi
27215
27216
27217  windows_path="$new_path"
27218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27219    unix_path=`$CYGPATH -u "$windows_path"`
27220    new_path="$unix_path"
27221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27223    new_path="$unix_path"
27224  fi
27225
27226  if test "x$path" != "x$new_path"; then
27227    BOOT_JDK="$new_path"
27228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27230  fi
27231
27232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27234
27235    else
27236      # We're on a unix platform. Hooray! :)
27237      path="$BOOT_JDK"
27238      has_space=`$ECHO "$path" | $GREP " "`
27239      if test "x$has_space" != x; then
27240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27243      fi
27244
27245      # Use eval to expand a potential ~
27246      eval path="$path"
27247      if test ! -f "$path" && test ! -d "$path"; then
27248        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27249      fi
27250
27251      if test -d "$path"; then
27252        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27253      else
27254        dir="`$DIRNAME "$path"`"
27255        base="`$BASENAME "$path"`"
27256        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27257      fi
27258    fi
27259  fi
27260
27261            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27262$as_echo_n "checking for Boot JDK... " >&6; }
27263            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27264$as_echo "$BOOT_JDK" >&6; }
27265            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27266$as_echo_n "checking Boot JDK version... " >&6; }
27267            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27269$as_echo "$BOOT_JDK_VERSION" >&6; }
27270          fi # end check jdk version
27271        fi # end check javac
27272      fi # end check java
27273    fi # end check boot jdk found
27274  fi
27275
27276    done
27277  fi
27278
27279
27280    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27281    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27282      # Do we have a bin/java?
27283      if test ! -x "$BOOT_JDK/bin/java"; then
27284        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27286        BOOT_JDK_FOUND=no
27287      else
27288        # Do we have a bin/javac?
27289        if test ! -x "$BOOT_JDK/bin/javac"; then
27290          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27292          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27293$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27294          BOOT_JDK_FOUND=no
27295        else
27296          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27297          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27298
27299          # Extra M4 quote needed to protect [] in grep expression.
27300          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27301          if test "x$FOUND_CORRECT_VERSION" = x; then
27302            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27303$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27304            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27305$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27306            BOOT_JDK_FOUND=no
27307          else
27308            # We're done! :-)
27309            BOOT_JDK_FOUND=yes
27310
27311  # Only process if variable expands to non-empty
27312
27313  if test "x$BOOT_JDK" != x; then
27314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27315
27316  # Input might be given as Windows format, start by converting to
27317  # unix format.
27318  path="$BOOT_JDK"
27319  new_path=`$CYGPATH -u "$path"`
27320
27321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27324  # "foo.exe" is OK but "foo" is an error.
27325  #
27326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27327  # It is also a way to make sure we got the proper file name for the real test later on.
27328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27329  if test "x$test_shortpath" = x; then
27330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27331$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27332    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27333  fi
27334
27335  # Call helper function which possibly converts this using DOS-style short mode.
27336  # If so, the updated path is stored in $new_path.
27337
27338  input_path="$new_path"
27339  # Check if we need to convert this using DOS-style short mode. If the path
27340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27341  # take no chances and rewrite it.
27342  # Note: m4 eats our [], so we need to use [ and ] instead.
27343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27344  if test "x$has_forbidden_chars" != x; then
27345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27349      # Going to short mode and back again did indeed matter. Since short mode is
27350      # case insensitive, let's make it lowercase to improve readability.
27351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27352      # Now convert it back to Unix-style (cygpath)
27353      input_path=`$CYGPATH -u "$shortmode_path"`
27354      new_path="$input_path"
27355    fi
27356  fi
27357
27358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27359  if test "x$test_cygdrive_prefix" = x; then
27360    # As a simple fix, exclude /usr/bin since it's not a real path.
27361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27363      # a path prefixed by /cygdrive for fixpath to work.
27364      new_path="$CYGWIN_ROOT_PATH$input_path"
27365    fi
27366  fi
27367
27368
27369  if test "x$path" != "x$new_path"; then
27370    BOOT_JDK="$new_path"
27371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27373  fi
27374
27375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27376
27377  path="$BOOT_JDK"
27378  has_colon=`$ECHO $path | $GREP ^.:`
27379  new_path="$path"
27380  if test "x$has_colon" = x; then
27381    # Not in mixed or Windows style, start by that.
27382    new_path=`cmd //c echo $path`
27383  fi
27384
27385
27386  input_path="$new_path"
27387  # Check if we need to convert this using DOS-style short mode. If the path
27388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27389  # take no chances and rewrite it.
27390  # Note: m4 eats our [], so we need to use [ and ] instead.
27391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27392  if test "x$has_forbidden_chars" != x; then
27393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27395  fi
27396
27397
27398  windows_path="$new_path"
27399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27400    unix_path=`$CYGPATH -u "$windows_path"`
27401    new_path="$unix_path"
27402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27404    new_path="$unix_path"
27405  fi
27406
27407  if test "x$path" != "x$new_path"; then
27408    BOOT_JDK="$new_path"
27409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27410$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27411  fi
27412
27413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27415
27416    else
27417      # We're on a unix platform. Hooray! :)
27418      path="$BOOT_JDK"
27419      has_space=`$ECHO "$path" | $GREP " "`
27420      if test "x$has_space" != x; then
27421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27422$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27424      fi
27425
27426      # Use eval to expand a potential ~
27427      eval path="$path"
27428      if test ! -f "$path" && test ! -d "$path"; then
27429        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27430      fi
27431
27432      if test -d "$path"; then
27433        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27434      else
27435        dir="`$DIRNAME "$path"`"
27436        base="`$BASENAME "$path"`"
27437        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27438      fi
27439    fi
27440  fi
27441
27442            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27443$as_echo_n "checking for Boot JDK... " >&6; }
27444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27445$as_echo "$BOOT_JDK" >&6; }
27446            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27447$as_echo_n "checking Boot JDK version... " >&6; }
27448            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27449            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27450$as_echo "$BOOT_JDK_VERSION" >&6; }
27451          fi # end check jdk version
27452        fi # end check javac
27453      fi # end check java
27454    fi # end check boot jdk found
27455  fi
27456
27457  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27458
27459  if test "x$BOOT_JDK_FOUND" = xno; then
27460    # Now execute the test
27461
27462  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27463  BOOT_JDK_SUFFIX="/Contents/Home"
27464  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27465  if test "x$ALL_JDKS_FOUND" != x; then
27466    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27467
27468  if test "x$BOOT_JDK_FOUND" = xno; then
27469    # Now execute the test
27470
27471        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27472        if test -d "$BOOT_JDK"; then
27473          BOOT_JDK_FOUND=maybe
27474          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27475$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27476        fi
27477
27478
27479    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27480    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27481      # Do we have a bin/java?
27482      if test ! -x "$BOOT_JDK/bin/java"; then
27483        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27484$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27485        BOOT_JDK_FOUND=no
27486      else
27487        # Do we have a bin/javac?
27488        if test ! -x "$BOOT_JDK/bin/javac"; then
27489          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27491          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27492$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27493          BOOT_JDK_FOUND=no
27494        else
27495          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27496          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27497
27498          # Extra M4 quote needed to protect [] in grep expression.
27499          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27500          if test "x$FOUND_CORRECT_VERSION" = x; then
27501            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27502$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27503            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27504$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27505            BOOT_JDK_FOUND=no
27506          else
27507            # We're done! :-)
27508            BOOT_JDK_FOUND=yes
27509
27510  # Only process if variable expands to non-empty
27511
27512  if test "x$BOOT_JDK" != x; then
27513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27514
27515  # Input might be given as Windows format, start by converting to
27516  # unix format.
27517  path="$BOOT_JDK"
27518  new_path=`$CYGPATH -u "$path"`
27519
27520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27523  # "foo.exe" is OK but "foo" is an error.
27524  #
27525  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27526  # It is also a way to make sure we got the proper file name for the real test later on.
27527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27528  if test "x$test_shortpath" = x; then
27529    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27530$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27531    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27532  fi
27533
27534  # Call helper function which possibly converts this using DOS-style short mode.
27535  # If so, the updated path is stored in $new_path.
27536
27537  input_path="$new_path"
27538  # Check if we need to convert this using DOS-style short mode. If the path
27539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27540  # take no chances and rewrite it.
27541  # Note: m4 eats our [], so we need to use [ and ] instead.
27542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27543  if test "x$has_forbidden_chars" != x; then
27544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27548      # Going to short mode and back again did indeed matter. Since short mode is
27549      # case insensitive, let's make it lowercase to improve readability.
27550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27551      # Now convert it back to Unix-style (cygpath)
27552      input_path=`$CYGPATH -u "$shortmode_path"`
27553      new_path="$input_path"
27554    fi
27555  fi
27556
27557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27558  if test "x$test_cygdrive_prefix" = x; then
27559    # As a simple fix, exclude /usr/bin since it's not a real path.
27560    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27562      # a path prefixed by /cygdrive for fixpath to work.
27563      new_path="$CYGWIN_ROOT_PATH$input_path"
27564    fi
27565  fi
27566
27567
27568  if test "x$path" != "x$new_path"; then
27569    BOOT_JDK="$new_path"
27570    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27571$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27572  fi
27573
27574    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27575
27576  path="$BOOT_JDK"
27577  has_colon=`$ECHO $path | $GREP ^.:`
27578  new_path="$path"
27579  if test "x$has_colon" = x; then
27580    # Not in mixed or Windows style, start by that.
27581    new_path=`cmd //c echo $path`
27582  fi
27583
27584
27585  input_path="$new_path"
27586  # Check if we need to convert this using DOS-style short mode. If the path
27587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27588  # take no chances and rewrite it.
27589  # Note: m4 eats our [], so we need to use [ and ] instead.
27590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27591  if test "x$has_forbidden_chars" != x; then
27592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27594  fi
27595
27596
27597  windows_path="$new_path"
27598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27599    unix_path=`$CYGPATH -u "$windows_path"`
27600    new_path="$unix_path"
27601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27603    new_path="$unix_path"
27604  fi
27605
27606  if test "x$path" != "x$new_path"; then
27607    BOOT_JDK="$new_path"
27608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27610  fi
27611
27612  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27613  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27614
27615    else
27616      # We're on a unix platform. Hooray! :)
27617      path="$BOOT_JDK"
27618      has_space=`$ECHO "$path" | $GREP " "`
27619      if test "x$has_space" != x; then
27620        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27621$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27622        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27623      fi
27624
27625      # Use eval to expand a potential ~
27626      eval path="$path"
27627      if test ! -f "$path" && test ! -d "$path"; then
27628        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27629      fi
27630
27631      if test -d "$path"; then
27632        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27633      else
27634        dir="`$DIRNAME "$path"`"
27635        base="`$BASENAME "$path"`"
27636        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27637      fi
27638    fi
27639  fi
27640
27641            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27642$as_echo_n "checking for Boot JDK... " >&6; }
27643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27644$as_echo "$BOOT_JDK" >&6; }
27645            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27646$as_echo_n "checking Boot JDK version... " >&6; }
27647            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27649$as_echo "$BOOT_JDK_VERSION" >&6; }
27650          fi # end check jdk version
27651        fi # end check javac
27652      fi # end check java
27653    fi # end check boot jdk found
27654  fi
27655
27656    done
27657  fi
27658
27659
27660    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27661    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27662      # Do we have a bin/java?
27663      if test ! -x "$BOOT_JDK/bin/java"; then
27664        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27666        BOOT_JDK_FOUND=no
27667      else
27668        # Do we have a bin/javac?
27669        if test ! -x "$BOOT_JDK/bin/javac"; then
27670          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27672          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27673$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27674          BOOT_JDK_FOUND=no
27675        else
27676          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27677          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27678
27679          # Extra M4 quote needed to protect [] in grep expression.
27680          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27681          if test "x$FOUND_CORRECT_VERSION" = x; then
27682            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27684            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27685$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27686            BOOT_JDK_FOUND=no
27687          else
27688            # We're done! :-)
27689            BOOT_JDK_FOUND=yes
27690
27691  # Only process if variable expands to non-empty
27692
27693  if test "x$BOOT_JDK" != x; then
27694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27695
27696  # Input might be given as Windows format, start by converting to
27697  # unix format.
27698  path="$BOOT_JDK"
27699  new_path=`$CYGPATH -u "$path"`
27700
27701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27704  # "foo.exe" is OK but "foo" is an error.
27705  #
27706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27707  # It is also a way to make sure we got the proper file name for the real test later on.
27708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27709  if test "x$test_shortpath" = x; then
27710    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27711$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27712    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27713  fi
27714
27715  # Call helper function which possibly converts this using DOS-style short mode.
27716  # If so, the updated path is stored in $new_path.
27717
27718  input_path="$new_path"
27719  # Check if we need to convert this using DOS-style short mode. If the path
27720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27721  # take no chances and rewrite it.
27722  # Note: m4 eats our [], so we need to use [ and ] instead.
27723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27724  if test "x$has_forbidden_chars" != x; then
27725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27729      # Going to short mode and back again did indeed matter. Since short mode is
27730      # case insensitive, let's make it lowercase to improve readability.
27731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27732      # Now convert it back to Unix-style (cygpath)
27733      input_path=`$CYGPATH -u "$shortmode_path"`
27734      new_path="$input_path"
27735    fi
27736  fi
27737
27738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27739  if test "x$test_cygdrive_prefix" = x; then
27740    # As a simple fix, exclude /usr/bin since it's not a real path.
27741    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27743      # a path prefixed by /cygdrive for fixpath to work.
27744      new_path="$CYGWIN_ROOT_PATH$input_path"
27745    fi
27746  fi
27747
27748
27749  if test "x$path" != "x$new_path"; then
27750    BOOT_JDK="$new_path"
27751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27752$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27753  fi
27754
27755    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27756
27757  path="$BOOT_JDK"
27758  has_colon=`$ECHO $path | $GREP ^.:`
27759  new_path="$path"
27760  if test "x$has_colon" = x; then
27761    # Not in mixed or Windows style, start by that.
27762    new_path=`cmd //c echo $path`
27763  fi
27764
27765
27766  input_path="$new_path"
27767  # Check if we need to convert this using DOS-style short mode. If the path
27768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27769  # take no chances and rewrite it.
27770  # Note: m4 eats our [], so we need to use [ and ] instead.
27771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27772  if test "x$has_forbidden_chars" != x; then
27773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27775  fi
27776
27777
27778  windows_path="$new_path"
27779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27780    unix_path=`$CYGPATH -u "$windows_path"`
27781    new_path="$unix_path"
27782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27784    new_path="$unix_path"
27785  fi
27786
27787  if test "x$path" != "x$new_path"; then
27788    BOOT_JDK="$new_path"
27789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27790$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27791  fi
27792
27793  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27794  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27795
27796    else
27797      # We're on a unix platform. Hooray! :)
27798      path="$BOOT_JDK"
27799      has_space=`$ECHO "$path" | $GREP " "`
27800      if test "x$has_space" != x; then
27801        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27803        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27804      fi
27805
27806      # Use eval to expand a potential ~
27807      eval path="$path"
27808      if test ! -f "$path" && test ! -d "$path"; then
27809        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27810      fi
27811
27812      if test -d "$path"; then
27813        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27814      else
27815        dir="`$DIRNAME "$path"`"
27816        base="`$BASENAME "$path"`"
27817        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27818      fi
27819    fi
27820  fi
27821
27822            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27823$as_echo_n "checking for Boot JDK... " >&6; }
27824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27825$as_echo "$BOOT_JDK" >&6; }
27826            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27827$as_echo_n "checking Boot JDK version... " >&6; }
27828            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27830$as_echo "$BOOT_JDK_VERSION" >&6; }
27831          fi # end check jdk version
27832        fi # end check javac
27833      fi # end check java
27834    fi # end check boot jdk found
27835  fi
27836
27837
27838  if test "x$BOOT_JDK_FOUND" = xno; then
27839    # Now execute the test
27840
27841  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27842  BOOT_JDK_SUFFIX="/Contents/Home"
27843  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27844  if test "x$ALL_JDKS_FOUND" != x; then
27845    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27846
27847  if test "x$BOOT_JDK_FOUND" = xno; then
27848    # Now execute the test
27849
27850        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27851        if test -d "$BOOT_JDK"; then
27852          BOOT_JDK_FOUND=maybe
27853          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27854$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27855        fi
27856
27857
27858    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27859    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27860      # Do we have a bin/java?
27861      if test ! -x "$BOOT_JDK/bin/java"; then
27862        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27864        BOOT_JDK_FOUND=no
27865      else
27866        # Do we have a bin/javac?
27867        if test ! -x "$BOOT_JDK/bin/javac"; then
27868          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27870          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27871$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27872          BOOT_JDK_FOUND=no
27873        else
27874          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27875          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27876
27877          # Extra M4 quote needed to protect [] in grep expression.
27878          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27879          if test "x$FOUND_CORRECT_VERSION" = x; then
27880            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27881$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27882            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27883$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27884            BOOT_JDK_FOUND=no
27885          else
27886            # We're done! :-)
27887            BOOT_JDK_FOUND=yes
27888
27889  # Only process if variable expands to non-empty
27890
27891  if test "x$BOOT_JDK" != x; then
27892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27893
27894  # Input might be given as Windows format, start by converting to
27895  # unix format.
27896  path="$BOOT_JDK"
27897  new_path=`$CYGPATH -u "$path"`
27898
27899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27902  # "foo.exe" is OK but "foo" is an error.
27903  #
27904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27905  # It is also a way to make sure we got the proper file name for the real test later on.
27906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27907  if test "x$test_shortpath" = x; then
27908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27910    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27911  fi
27912
27913  # Call helper function which possibly converts this using DOS-style short mode.
27914  # If so, the updated path is stored in $new_path.
27915
27916  input_path="$new_path"
27917  # Check if we need to convert this using DOS-style short mode. If the path
27918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27919  # take no chances and rewrite it.
27920  # Note: m4 eats our [], so we need to use [ and ] instead.
27921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27922  if test "x$has_forbidden_chars" != x; then
27923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27927      # Going to short mode and back again did indeed matter. Since short mode is
27928      # case insensitive, let's make it lowercase to improve readability.
27929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27930      # Now convert it back to Unix-style (cygpath)
27931      input_path=`$CYGPATH -u "$shortmode_path"`
27932      new_path="$input_path"
27933    fi
27934  fi
27935
27936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27937  if test "x$test_cygdrive_prefix" = x; then
27938    # As a simple fix, exclude /usr/bin since it's not a real path.
27939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27941      # a path prefixed by /cygdrive for fixpath to work.
27942      new_path="$CYGWIN_ROOT_PATH$input_path"
27943    fi
27944  fi
27945
27946
27947  if test "x$path" != "x$new_path"; then
27948    BOOT_JDK="$new_path"
27949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27950$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27951  fi
27952
27953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27954
27955  path="$BOOT_JDK"
27956  has_colon=`$ECHO $path | $GREP ^.:`
27957  new_path="$path"
27958  if test "x$has_colon" = x; then
27959    # Not in mixed or Windows style, start by that.
27960    new_path=`cmd //c echo $path`
27961  fi
27962
27963
27964  input_path="$new_path"
27965  # Check if we need to convert this using DOS-style short mode. If the path
27966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27967  # take no chances and rewrite it.
27968  # Note: m4 eats our [], so we need to use [ and ] instead.
27969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27970  if test "x$has_forbidden_chars" != x; then
27971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27973  fi
27974
27975
27976  windows_path="$new_path"
27977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27978    unix_path=`$CYGPATH -u "$windows_path"`
27979    new_path="$unix_path"
27980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27982    new_path="$unix_path"
27983  fi
27984
27985  if test "x$path" != "x$new_path"; then
27986    BOOT_JDK="$new_path"
27987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27989  fi
27990
27991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27993
27994    else
27995      # We're on a unix platform. Hooray! :)
27996      path="$BOOT_JDK"
27997      has_space=`$ECHO "$path" | $GREP " "`
27998      if test "x$has_space" != x; then
27999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28002      fi
28003
28004      # Use eval to expand a potential ~
28005      eval path="$path"
28006      if test ! -f "$path" && test ! -d "$path"; then
28007        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28008      fi
28009
28010      if test -d "$path"; then
28011        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28012      else
28013        dir="`$DIRNAME "$path"`"
28014        base="`$BASENAME "$path"`"
28015        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28016      fi
28017    fi
28018  fi
28019
28020            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28021$as_echo_n "checking for Boot JDK... " >&6; }
28022            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28023$as_echo "$BOOT_JDK" >&6; }
28024            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28025$as_echo_n "checking Boot JDK version... " >&6; }
28026            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28027            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28028$as_echo "$BOOT_JDK_VERSION" >&6; }
28029          fi # end check jdk version
28030        fi # end check javac
28031      fi # end check java
28032    fi # end check boot jdk found
28033  fi
28034
28035    done
28036  fi
28037
28038
28039    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28040    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28041      # Do we have a bin/java?
28042      if test ! -x "$BOOT_JDK/bin/java"; then
28043        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28045        BOOT_JDK_FOUND=no
28046      else
28047        # Do we have a bin/javac?
28048        if test ! -x "$BOOT_JDK/bin/javac"; then
28049          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28051          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28052$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28053          BOOT_JDK_FOUND=no
28054        else
28055          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28056          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28057
28058          # Extra M4 quote needed to protect [] in grep expression.
28059          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28060          if test "x$FOUND_CORRECT_VERSION" = x; then
28061            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28063            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28064$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28065            BOOT_JDK_FOUND=no
28066          else
28067            # We're done! :-)
28068            BOOT_JDK_FOUND=yes
28069
28070  # Only process if variable expands to non-empty
28071
28072  if test "x$BOOT_JDK" != x; then
28073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28074
28075  # Input might be given as Windows format, start by converting to
28076  # unix format.
28077  path="$BOOT_JDK"
28078  new_path=`$CYGPATH -u "$path"`
28079
28080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28083  # "foo.exe" is OK but "foo" is an error.
28084  #
28085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28086  # It is also a way to make sure we got the proper file name for the real test later on.
28087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28088  if test "x$test_shortpath" = x; then
28089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28091    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28092  fi
28093
28094  # Call helper function which possibly converts this using DOS-style short mode.
28095  # If so, the updated path is stored in $new_path.
28096
28097  input_path="$new_path"
28098  # Check if we need to convert this using DOS-style short mode. If the path
28099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28100  # take no chances and rewrite it.
28101  # Note: m4 eats our [], so we need to use [ and ] instead.
28102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28103  if test "x$has_forbidden_chars" != x; then
28104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28108      # Going to short mode and back again did indeed matter. Since short mode is
28109      # case insensitive, let's make it lowercase to improve readability.
28110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28111      # Now convert it back to Unix-style (cygpath)
28112      input_path=`$CYGPATH -u "$shortmode_path"`
28113      new_path="$input_path"
28114    fi
28115  fi
28116
28117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28118  if test "x$test_cygdrive_prefix" = x; then
28119    # As a simple fix, exclude /usr/bin since it's not a real path.
28120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28122      # a path prefixed by /cygdrive for fixpath to work.
28123      new_path="$CYGWIN_ROOT_PATH$input_path"
28124    fi
28125  fi
28126
28127
28128  if test "x$path" != "x$new_path"; then
28129    BOOT_JDK="$new_path"
28130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28132  fi
28133
28134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28135
28136  path="$BOOT_JDK"
28137  has_colon=`$ECHO $path | $GREP ^.:`
28138  new_path="$path"
28139  if test "x$has_colon" = x; then
28140    # Not in mixed or Windows style, start by that.
28141    new_path=`cmd //c echo $path`
28142  fi
28143
28144
28145  input_path="$new_path"
28146  # Check if we need to convert this using DOS-style short mode. If the path
28147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28148  # take no chances and rewrite it.
28149  # Note: m4 eats our [], so we need to use [ and ] instead.
28150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28151  if test "x$has_forbidden_chars" != x; then
28152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28154  fi
28155
28156
28157  windows_path="$new_path"
28158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28159    unix_path=`$CYGPATH -u "$windows_path"`
28160    new_path="$unix_path"
28161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28163    new_path="$unix_path"
28164  fi
28165
28166  if test "x$path" != "x$new_path"; then
28167    BOOT_JDK="$new_path"
28168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28169$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28170  fi
28171
28172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28174
28175    else
28176      # We're on a unix platform. Hooray! :)
28177      path="$BOOT_JDK"
28178      has_space=`$ECHO "$path" | $GREP " "`
28179      if test "x$has_space" != x; then
28180        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28182        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28183      fi
28184
28185      # Use eval to expand a potential ~
28186      eval path="$path"
28187      if test ! -f "$path" && test ! -d "$path"; then
28188        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28189      fi
28190
28191      if test -d "$path"; then
28192        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28193      else
28194        dir="`$DIRNAME "$path"`"
28195        base="`$BASENAME "$path"`"
28196        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28197      fi
28198    fi
28199  fi
28200
28201            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28202$as_echo_n "checking for Boot JDK... " >&6; }
28203            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28204$as_echo "$BOOT_JDK" >&6; }
28205            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28206$as_echo_n "checking Boot JDK version... " >&6; }
28207            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28209$as_echo "$BOOT_JDK_VERSION" >&6; }
28210          fi # end check jdk version
28211        fi # end check javac
28212      fi # end check java
28213    fi # end check boot jdk found
28214  fi
28215
28216  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28217
28218  if test "x$BOOT_JDK_FOUND" = xno; then
28219    # Now execute the test
28220
28221  BOOT_JDK_PREFIX="/usr/lib/jvm"
28222  BOOT_JDK_SUFFIX=""
28223  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28224  if test "x$ALL_JDKS_FOUND" != x; then
28225    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28226
28227  if test "x$BOOT_JDK_FOUND" = xno; then
28228    # Now execute the test
28229
28230        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28231        if test -d "$BOOT_JDK"; then
28232          BOOT_JDK_FOUND=maybe
28233          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28234$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28235        fi
28236
28237
28238    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28239    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28240      # Do we have a bin/java?
28241      if test ! -x "$BOOT_JDK/bin/java"; then
28242        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28244        BOOT_JDK_FOUND=no
28245      else
28246        # Do we have a bin/javac?
28247        if test ! -x "$BOOT_JDK/bin/javac"; then
28248          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28250          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28251$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28252          BOOT_JDK_FOUND=no
28253        else
28254          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28255          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28256
28257          # Extra M4 quote needed to protect [] in grep expression.
28258          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28259          if test "x$FOUND_CORRECT_VERSION" = x; then
28260            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28262            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28263$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28264            BOOT_JDK_FOUND=no
28265          else
28266            # We're done! :-)
28267            BOOT_JDK_FOUND=yes
28268
28269  # Only process if variable expands to non-empty
28270
28271  if test "x$BOOT_JDK" != x; then
28272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28273
28274  # Input might be given as Windows format, start by converting to
28275  # unix format.
28276  path="$BOOT_JDK"
28277  new_path=`$CYGPATH -u "$path"`
28278
28279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28282  # "foo.exe" is OK but "foo" is an error.
28283  #
28284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28285  # It is also a way to make sure we got the proper file name for the real test later on.
28286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28287  if test "x$test_shortpath" = x; then
28288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28290    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28291  fi
28292
28293  # Call helper function which possibly converts this using DOS-style short mode.
28294  # If so, the updated path is stored in $new_path.
28295
28296  input_path="$new_path"
28297  # Check if we need to convert this using DOS-style short mode. If the path
28298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28299  # take no chances and rewrite it.
28300  # Note: m4 eats our [], so we need to use [ and ] instead.
28301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28302  if test "x$has_forbidden_chars" != x; then
28303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28307      # Going to short mode and back again did indeed matter. Since short mode is
28308      # case insensitive, let's make it lowercase to improve readability.
28309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28310      # Now convert it back to Unix-style (cygpath)
28311      input_path=`$CYGPATH -u "$shortmode_path"`
28312      new_path="$input_path"
28313    fi
28314  fi
28315
28316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28317  if test "x$test_cygdrive_prefix" = x; then
28318    # As a simple fix, exclude /usr/bin since it's not a real path.
28319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28321      # a path prefixed by /cygdrive for fixpath to work.
28322      new_path="$CYGWIN_ROOT_PATH$input_path"
28323    fi
28324  fi
28325
28326
28327  if test "x$path" != "x$new_path"; then
28328    BOOT_JDK="$new_path"
28329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28331  fi
28332
28333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28334
28335  path="$BOOT_JDK"
28336  has_colon=`$ECHO $path | $GREP ^.:`
28337  new_path="$path"
28338  if test "x$has_colon" = x; then
28339    # Not in mixed or Windows style, start by that.
28340    new_path=`cmd //c echo $path`
28341  fi
28342
28343
28344  input_path="$new_path"
28345  # Check if we need to convert this using DOS-style short mode. If the path
28346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28347  # take no chances and rewrite it.
28348  # Note: m4 eats our [], so we need to use [ and ] instead.
28349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28350  if test "x$has_forbidden_chars" != x; then
28351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28353  fi
28354
28355
28356  windows_path="$new_path"
28357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28358    unix_path=`$CYGPATH -u "$windows_path"`
28359    new_path="$unix_path"
28360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28362    new_path="$unix_path"
28363  fi
28364
28365  if test "x$path" != "x$new_path"; then
28366    BOOT_JDK="$new_path"
28367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28368$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28369  fi
28370
28371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28373
28374    else
28375      # We're on a unix platform. Hooray! :)
28376      path="$BOOT_JDK"
28377      has_space=`$ECHO "$path" | $GREP " "`
28378      if test "x$has_space" != x; then
28379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28381        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28382      fi
28383
28384      # Use eval to expand a potential ~
28385      eval path="$path"
28386      if test ! -f "$path" && test ! -d "$path"; then
28387        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28388      fi
28389
28390      if test -d "$path"; then
28391        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28392      else
28393        dir="`$DIRNAME "$path"`"
28394        base="`$BASENAME "$path"`"
28395        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28396      fi
28397    fi
28398  fi
28399
28400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28401$as_echo_n "checking for Boot JDK... " >&6; }
28402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28403$as_echo "$BOOT_JDK" >&6; }
28404            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28405$as_echo_n "checking Boot JDK version... " >&6; }
28406            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28408$as_echo "$BOOT_JDK_VERSION" >&6; }
28409          fi # end check jdk version
28410        fi # end check javac
28411      fi # end check java
28412    fi # end check boot jdk found
28413  fi
28414
28415    done
28416  fi
28417
28418
28419    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28420    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28421      # Do we have a bin/java?
28422      if test ! -x "$BOOT_JDK/bin/java"; then
28423        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28425        BOOT_JDK_FOUND=no
28426      else
28427        # Do we have a bin/javac?
28428        if test ! -x "$BOOT_JDK/bin/javac"; then
28429          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28430$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28431          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28432$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28433          BOOT_JDK_FOUND=no
28434        else
28435          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28436          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28437
28438          # Extra M4 quote needed to protect [] in grep expression.
28439          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28440          if test "x$FOUND_CORRECT_VERSION" = x; then
28441            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28442$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28443            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28444$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28445            BOOT_JDK_FOUND=no
28446          else
28447            # We're done! :-)
28448            BOOT_JDK_FOUND=yes
28449
28450  # Only process if variable expands to non-empty
28451
28452  if test "x$BOOT_JDK" != x; then
28453    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28454
28455  # Input might be given as Windows format, start by converting to
28456  # unix format.
28457  path="$BOOT_JDK"
28458  new_path=`$CYGPATH -u "$path"`
28459
28460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28463  # "foo.exe" is OK but "foo" is an error.
28464  #
28465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28466  # It is also a way to make sure we got the proper file name for the real test later on.
28467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28468  if test "x$test_shortpath" = x; then
28469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28471    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28472  fi
28473
28474  # Call helper function which possibly converts this using DOS-style short mode.
28475  # If so, the updated path is stored in $new_path.
28476
28477  input_path="$new_path"
28478  # Check if we need to convert this using DOS-style short mode. If the path
28479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28480  # take no chances and rewrite it.
28481  # Note: m4 eats our [], so we need to use [ and ] instead.
28482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28483  if test "x$has_forbidden_chars" != x; then
28484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28488      # Going to short mode and back again did indeed matter. Since short mode is
28489      # case insensitive, let's make it lowercase to improve readability.
28490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28491      # Now convert it back to Unix-style (cygpath)
28492      input_path=`$CYGPATH -u "$shortmode_path"`
28493      new_path="$input_path"
28494    fi
28495  fi
28496
28497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28498  if test "x$test_cygdrive_prefix" = x; then
28499    # As a simple fix, exclude /usr/bin since it's not a real path.
28500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28502      # a path prefixed by /cygdrive for fixpath to work.
28503      new_path="$CYGWIN_ROOT_PATH$input_path"
28504    fi
28505  fi
28506
28507
28508  if test "x$path" != "x$new_path"; then
28509    BOOT_JDK="$new_path"
28510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28511$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28512  fi
28513
28514    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28515
28516  path="$BOOT_JDK"
28517  has_colon=`$ECHO $path | $GREP ^.:`
28518  new_path="$path"
28519  if test "x$has_colon" = x; then
28520    # Not in mixed or Windows style, start by that.
28521    new_path=`cmd //c echo $path`
28522  fi
28523
28524
28525  input_path="$new_path"
28526  # Check if we need to convert this using DOS-style short mode. If the path
28527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28528  # take no chances and rewrite it.
28529  # Note: m4 eats our [], so we need to use [ and ] instead.
28530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28531  if test "x$has_forbidden_chars" != x; then
28532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28534  fi
28535
28536
28537  windows_path="$new_path"
28538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28539    unix_path=`$CYGPATH -u "$windows_path"`
28540    new_path="$unix_path"
28541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28543    new_path="$unix_path"
28544  fi
28545
28546  if test "x$path" != "x$new_path"; then
28547    BOOT_JDK="$new_path"
28548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28549$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28550  fi
28551
28552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28554
28555    else
28556      # We're on a unix platform. Hooray! :)
28557      path="$BOOT_JDK"
28558      has_space=`$ECHO "$path" | $GREP " "`
28559      if test "x$has_space" != x; then
28560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28562        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28563      fi
28564
28565      # Use eval to expand a potential ~
28566      eval path="$path"
28567      if test ! -f "$path" && test ! -d "$path"; then
28568        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28569      fi
28570
28571      if test -d "$path"; then
28572        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28573      else
28574        dir="`$DIRNAME "$path"`"
28575        base="`$BASENAME "$path"`"
28576        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28577      fi
28578    fi
28579  fi
28580
28581            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28582$as_echo_n "checking for Boot JDK... " >&6; }
28583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28584$as_echo "$BOOT_JDK" >&6; }
28585            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28586$as_echo_n "checking Boot JDK version... " >&6; }
28587            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28588            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28589$as_echo "$BOOT_JDK_VERSION" >&6; }
28590          fi # end check jdk version
28591        fi # end check javac
28592      fi # end check java
28593    fi # end check boot jdk found
28594  fi
28595
28596  fi
28597
28598
28599    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28600    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28601      # Do we have a bin/java?
28602      if test ! -x "$BOOT_JDK/bin/java"; then
28603        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28605        BOOT_JDK_FOUND=no
28606      else
28607        # Do we have a bin/javac?
28608        if test ! -x "$BOOT_JDK/bin/javac"; then
28609          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28611          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28612$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28613          BOOT_JDK_FOUND=no
28614        else
28615          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28616          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28617
28618          # Extra M4 quote needed to protect [] in grep expression.
28619          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28620          if test "x$FOUND_CORRECT_VERSION" = x; then
28621            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28623            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28624$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28625            BOOT_JDK_FOUND=no
28626          else
28627            # We're done! :-)
28628            BOOT_JDK_FOUND=yes
28629
28630  # Only process if variable expands to non-empty
28631
28632  if test "x$BOOT_JDK" != x; then
28633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28634
28635  # Input might be given as Windows format, start by converting to
28636  # unix format.
28637  path="$BOOT_JDK"
28638  new_path=`$CYGPATH -u "$path"`
28639
28640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28643  # "foo.exe" is OK but "foo" is an error.
28644  #
28645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28646  # It is also a way to make sure we got the proper file name for the real test later on.
28647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28648  if test "x$test_shortpath" = x; then
28649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28651    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28652  fi
28653
28654  # Call helper function which possibly converts this using DOS-style short mode.
28655  # If so, the updated path is stored in $new_path.
28656
28657  input_path="$new_path"
28658  # Check if we need to convert this using DOS-style short mode. If the path
28659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28660  # take no chances and rewrite it.
28661  # Note: m4 eats our [], so we need to use [ and ] instead.
28662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28663  if test "x$has_forbidden_chars" != x; then
28664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28668      # Going to short mode and back again did indeed matter. Since short mode is
28669      # case insensitive, let's make it lowercase to improve readability.
28670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28671      # Now convert it back to Unix-style (cygpath)
28672      input_path=`$CYGPATH -u "$shortmode_path"`
28673      new_path="$input_path"
28674    fi
28675  fi
28676
28677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28678  if test "x$test_cygdrive_prefix" = x; then
28679    # As a simple fix, exclude /usr/bin since it's not a real path.
28680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28682      # a path prefixed by /cygdrive for fixpath to work.
28683      new_path="$CYGWIN_ROOT_PATH$input_path"
28684    fi
28685  fi
28686
28687
28688  if test "x$path" != "x$new_path"; then
28689    BOOT_JDK="$new_path"
28690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28691$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28692  fi
28693
28694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28695
28696  path="$BOOT_JDK"
28697  has_colon=`$ECHO $path | $GREP ^.:`
28698  new_path="$path"
28699  if test "x$has_colon" = x; then
28700    # Not in mixed or Windows style, start by that.
28701    new_path=`cmd //c echo $path`
28702  fi
28703
28704
28705  input_path="$new_path"
28706  # Check if we need to convert this using DOS-style short mode. If the path
28707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28708  # take no chances and rewrite it.
28709  # Note: m4 eats our [], so we need to use [ and ] instead.
28710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28711  if test "x$has_forbidden_chars" != x; then
28712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28714  fi
28715
28716
28717  windows_path="$new_path"
28718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28719    unix_path=`$CYGPATH -u "$windows_path"`
28720    new_path="$unix_path"
28721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28723    new_path="$unix_path"
28724  fi
28725
28726  if test "x$path" != "x$new_path"; then
28727    BOOT_JDK="$new_path"
28728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28729$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28730  fi
28731
28732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28734
28735    else
28736      # We're on a unix platform. Hooray! :)
28737      path="$BOOT_JDK"
28738      has_space=`$ECHO "$path" | $GREP " "`
28739      if test "x$has_space" != x; then
28740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28741$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28742        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28743      fi
28744
28745      # Use eval to expand a potential ~
28746      eval path="$path"
28747      if test ! -f "$path" && test ! -d "$path"; then
28748        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28749      fi
28750
28751      if test -d "$path"; then
28752        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28753      else
28754        dir="`$DIRNAME "$path"`"
28755        base="`$BASENAME "$path"`"
28756        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28757      fi
28758    fi
28759  fi
28760
28761            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28762$as_echo_n "checking for Boot JDK... " >&6; }
28763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28764$as_echo "$BOOT_JDK" >&6; }
28765            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28766$as_echo_n "checking Boot JDK version... " >&6; }
28767            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28769$as_echo "$BOOT_JDK_VERSION" >&6; }
28770          fi # end check jdk version
28771        fi # end check javac
28772      fi # end check java
28773    fi # end check boot jdk found
28774  fi
28775
28776
28777  # If we haven't found anything yet, we've truly lost. Give up.
28778  if test "x$BOOT_JDK_FOUND" = xno; then
28779
28780  # Print a helpful message on how to acquire the necessary build dependency.
28781  # openjdk is the help tag: freetype, cups, alsa etc
28782  MISSING_DEPENDENCY=openjdk
28783
28784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28785    cygwin_help $MISSING_DEPENDENCY
28786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28787    msys_help $MISSING_DEPENDENCY
28788  else
28789    PKGHANDLER_COMMAND=
28790
28791    case $PKGHANDLER in
28792      apt-get)
28793        apt_help     $MISSING_DEPENDENCY ;;
28794      yum)
28795        yum_help     $MISSING_DEPENDENCY ;;
28796      port)
28797        port_help    $MISSING_DEPENDENCY ;;
28798      pkgutil)
28799        pkgutil_help $MISSING_DEPENDENCY ;;
28800      pkgadd)
28801        pkgadd_help  $MISSING_DEPENDENCY ;;
28802    esac
28803
28804    if test "x$PKGHANDLER_COMMAND" != x; then
28805      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28806    fi
28807  fi
28808
28809    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28810$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28811    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28812$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28813    as_fn_error $? "Cannot continue" "$LINENO" 5
28814  fi
28815
28816
28817
28818  # Setup tools from the Boot JDK.
28819
28820  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28821
28822  # Publish this variable in the help.
28823
28824
28825  if [ -z "${JAVA+x}" ]; then
28826    # The variable is not set by user, try to locate tool using the code snippet
28827
28828      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28829$as_echo_n "checking for java in Boot JDK... " >&6; }
28830      JAVA=$BOOT_JDK/bin/java
28831      if test ! -x $JAVA; then
28832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28833$as_echo "not found" >&6; }
28834        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28835$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28836        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28837      fi
28838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28839$as_echo "ok" >&6; }
28840
28841
28842  else
28843    # The variable is set, but is it from the command line or the environment?
28844
28845    # Try to remove the string !JAVA! from our list.
28846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28848      # If it failed, the variable was not from the command line. Ignore it,
28849      # but warn the user (except for BASH, which is always set by the calling BASH).
28850      if test "xJAVA" != xBASH; then
28851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28852$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28853      fi
28854      # Try to locate tool using the code snippet
28855
28856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28857$as_echo_n "checking for java in Boot JDK... " >&6; }
28858      JAVA=$BOOT_JDK/bin/java
28859      if test ! -x $JAVA; then
28860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28861$as_echo "not found" >&6; }
28862        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28863$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28864        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28865      fi
28866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28867$as_echo "ok" >&6; }
28868
28869
28870    else
28871      # If it succeeded, then it was overridden by the user. We will use it
28872      # for the tool.
28873
28874      # First remove it from the list of overridden variables, so we can test
28875      # for unknown variables in the end.
28876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28877
28878      # Check if we try to supply an empty value
28879      if test "x$JAVA" = x; then
28880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28881$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28883$as_echo_n "checking for JAVA... " >&6; }
28884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28885$as_echo "disabled" >&6; }
28886      else
28887        # Check if the provided tool contains a complete path.
28888        tool_specified="$JAVA"
28889        tool_basename="${tool_specified##*/}"
28890        if test "x$tool_basename" = "x$tool_specified"; then
28891          # A command without a complete path is provided, search $PATH.
28892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28893$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28894          # Extract the first word of "$tool_basename", so it can be a program name with args.
28895set dummy $tool_basename; ac_word=$2
28896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28897$as_echo_n "checking for $ac_word... " >&6; }
28898if ${ac_cv_path_JAVA+:} false; then :
28899  $as_echo_n "(cached) " >&6
28900else
28901  case $JAVA in
28902  [\\/]* | ?:[\\/]*)
28903  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28904  ;;
28905  *)
28906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28907for as_dir in $PATH
28908do
28909  IFS=$as_save_IFS
28910  test -z "$as_dir" && as_dir=.
28911    for ac_exec_ext in '' $ac_executable_extensions; do
28912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28913    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28915    break 2
28916  fi
28917done
28918  done
28919IFS=$as_save_IFS
28920
28921  ;;
28922esac
28923fi
28924JAVA=$ac_cv_path_JAVA
28925if test -n "$JAVA"; then
28926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28927$as_echo "$JAVA" >&6; }
28928else
28929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28930$as_echo "no" >&6; }
28931fi
28932
28933
28934          if test "x$JAVA" = x; then
28935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28936          fi
28937        else
28938          # Otherwise we believe it is a complete path. Use it as it is.
28939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28940$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28942$as_echo_n "checking for JAVA... " >&6; }
28943          if test ! -x "$tool_specified"; then
28944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28945$as_echo "not found" >&6; }
28946            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28947          fi
28948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28949$as_echo "$tool_specified" >&6; }
28950        fi
28951      fi
28952    fi
28953
28954  fi
28955
28956
28957
28958  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28959
28960  # Publish this variable in the help.
28961
28962
28963  if [ -z "${JAVAC+x}" ]; then
28964    # The variable is not set by user, try to locate tool using the code snippet
28965
28966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28967$as_echo_n "checking for javac in Boot JDK... " >&6; }
28968      JAVAC=$BOOT_JDK/bin/javac
28969      if test ! -x $JAVAC; then
28970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28971$as_echo "not found" >&6; }
28972        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28973$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28974        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28975      fi
28976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28977$as_echo "ok" >&6; }
28978
28979
28980  else
28981    # The variable is set, but is it from the command line or the environment?
28982
28983    # Try to remove the string !JAVAC! from our list.
28984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28986      # If it failed, the variable was not from the command line. Ignore it,
28987      # but warn the user (except for BASH, which is always set by the calling BASH).
28988      if test "xJAVAC" != xBASH; then
28989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28990$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28991      fi
28992      # Try to locate tool using the code snippet
28993
28994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28995$as_echo_n "checking for javac in Boot JDK... " >&6; }
28996      JAVAC=$BOOT_JDK/bin/javac
28997      if test ! -x $JAVAC; then
28998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28999$as_echo "not found" >&6; }
29000        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29001$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29002        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29003      fi
29004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29005$as_echo "ok" >&6; }
29006
29007
29008    else
29009      # If it succeeded, then it was overridden by the user. We will use it
29010      # for the tool.
29011
29012      # First remove it from the list of overridden variables, so we can test
29013      # for unknown variables in the end.
29014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29015
29016      # Check if we try to supply an empty value
29017      if test "x$JAVAC" = x; then
29018        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29019$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29021$as_echo_n "checking for JAVAC... " >&6; }
29022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29023$as_echo "disabled" >&6; }
29024      else
29025        # Check if the provided tool contains a complete path.
29026        tool_specified="$JAVAC"
29027        tool_basename="${tool_specified##*/}"
29028        if test "x$tool_basename" = "x$tool_specified"; then
29029          # A command without a complete path is provided, search $PATH.
29030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29031$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29032          # Extract the first word of "$tool_basename", so it can be a program name with args.
29033set dummy $tool_basename; ac_word=$2
29034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29035$as_echo_n "checking for $ac_word... " >&6; }
29036if ${ac_cv_path_JAVAC+:} false; then :
29037  $as_echo_n "(cached) " >&6
29038else
29039  case $JAVAC in
29040  [\\/]* | ?:[\\/]*)
29041  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29042  ;;
29043  *)
29044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29045for as_dir in $PATH
29046do
29047  IFS=$as_save_IFS
29048  test -z "$as_dir" && as_dir=.
29049    for ac_exec_ext in '' $ac_executable_extensions; do
29050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29051    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29053    break 2
29054  fi
29055done
29056  done
29057IFS=$as_save_IFS
29058
29059  ;;
29060esac
29061fi
29062JAVAC=$ac_cv_path_JAVAC
29063if test -n "$JAVAC"; then
29064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29065$as_echo "$JAVAC" >&6; }
29066else
29067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29068$as_echo "no" >&6; }
29069fi
29070
29071
29072          if test "x$JAVAC" = x; then
29073            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29074          fi
29075        else
29076          # Otherwise we believe it is a complete path. Use it as it is.
29077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29078$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29079          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29080$as_echo_n "checking for JAVAC... " >&6; }
29081          if test ! -x "$tool_specified"; then
29082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29083$as_echo "not found" >&6; }
29084            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29085          fi
29086          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29087$as_echo "$tool_specified" >&6; }
29088        fi
29089      fi
29090    fi
29091
29092  fi
29093
29094
29095
29096  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29097
29098  # Publish this variable in the help.
29099
29100
29101  if [ -z "${JAVAH+x}" ]; then
29102    # The variable is not set by user, try to locate tool using the code snippet
29103
29104      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29105$as_echo_n "checking for javah in Boot JDK... " >&6; }
29106      JAVAH=$BOOT_JDK/bin/javah
29107      if test ! -x $JAVAH; then
29108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29109$as_echo "not found" >&6; }
29110        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29111$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29112        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29113      fi
29114      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29115$as_echo "ok" >&6; }
29116
29117
29118  else
29119    # The variable is set, but is it from the command line or the environment?
29120
29121    # Try to remove the string !JAVAH! from our list.
29122    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29123    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29124      # If it failed, the variable was not from the command line. Ignore it,
29125      # but warn the user (except for BASH, which is always set by the calling BASH).
29126      if test "xJAVAH" != xBASH; then
29127        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29128$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29129      fi
29130      # Try to locate tool using the code snippet
29131
29132      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29133$as_echo_n "checking for javah in Boot JDK... " >&6; }
29134      JAVAH=$BOOT_JDK/bin/javah
29135      if test ! -x $JAVAH; then
29136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29137$as_echo "not found" >&6; }
29138        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29139$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29140        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29141      fi
29142      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29143$as_echo "ok" >&6; }
29144
29145
29146    else
29147      # If it succeeded, then it was overridden by the user. We will use it
29148      # for the tool.
29149
29150      # First remove it from the list of overridden variables, so we can test
29151      # for unknown variables in the end.
29152      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29153
29154      # Check if we try to supply an empty value
29155      if test "x$JAVAH" = x; then
29156        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29157$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29159$as_echo_n "checking for JAVAH... " >&6; }
29160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29161$as_echo "disabled" >&6; }
29162      else
29163        # Check if the provided tool contains a complete path.
29164        tool_specified="$JAVAH"
29165        tool_basename="${tool_specified##*/}"
29166        if test "x$tool_basename" = "x$tool_specified"; then
29167          # A command without a complete path is provided, search $PATH.
29168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29169$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29170          # Extract the first word of "$tool_basename", so it can be a program name with args.
29171set dummy $tool_basename; ac_word=$2
29172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29173$as_echo_n "checking for $ac_word... " >&6; }
29174if ${ac_cv_path_JAVAH+:} false; then :
29175  $as_echo_n "(cached) " >&6
29176else
29177  case $JAVAH in
29178  [\\/]* | ?:[\\/]*)
29179  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29180  ;;
29181  *)
29182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29183for as_dir in $PATH
29184do
29185  IFS=$as_save_IFS
29186  test -z "$as_dir" && as_dir=.
29187    for ac_exec_ext in '' $ac_executable_extensions; do
29188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29189    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29191    break 2
29192  fi
29193done
29194  done
29195IFS=$as_save_IFS
29196
29197  ;;
29198esac
29199fi
29200JAVAH=$ac_cv_path_JAVAH
29201if test -n "$JAVAH"; then
29202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29203$as_echo "$JAVAH" >&6; }
29204else
29205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29206$as_echo "no" >&6; }
29207fi
29208
29209
29210          if test "x$JAVAH" = x; then
29211            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29212          fi
29213        else
29214          # Otherwise we believe it is a complete path. Use it as it is.
29215          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29216$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29217          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29218$as_echo_n "checking for JAVAH... " >&6; }
29219          if test ! -x "$tool_specified"; then
29220            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29221$as_echo "not found" >&6; }
29222            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29223          fi
29224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29225$as_echo "$tool_specified" >&6; }
29226        fi
29227      fi
29228    fi
29229
29230  fi
29231
29232
29233
29234  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29235
29236  # Publish this variable in the help.
29237
29238
29239  if [ -z "${JAR+x}" ]; then
29240    # The variable is not set by user, try to locate tool using the code snippet
29241
29242      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29243$as_echo_n "checking for jar in Boot JDK... " >&6; }
29244      JAR=$BOOT_JDK/bin/jar
29245      if test ! -x $JAR; then
29246        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29247$as_echo "not found" >&6; }
29248        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29249$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29250        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29251      fi
29252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29253$as_echo "ok" >&6; }
29254
29255
29256  else
29257    # The variable is set, but is it from the command line or the environment?
29258
29259    # Try to remove the string !JAR! from our list.
29260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29262      # If it failed, the variable was not from the command line. Ignore it,
29263      # but warn the user (except for BASH, which is always set by the calling BASH).
29264      if test "xJAR" != xBASH; then
29265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29266$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29267      fi
29268      # Try to locate tool using the code snippet
29269
29270      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29271$as_echo_n "checking for jar in Boot JDK... " >&6; }
29272      JAR=$BOOT_JDK/bin/jar
29273      if test ! -x $JAR; then
29274        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29275$as_echo "not found" >&6; }
29276        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29277$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29278        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29279      fi
29280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29281$as_echo "ok" >&6; }
29282
29283
29284    else
29285      # If it succeeded, then it was overridden by the user. We will use it
29286      # for the tool.
29287
29288      # First remove it from the list of overridden variables, so we can test
29289      # for unknown variables in the end.
29290      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29291
29292      # Check if we try to supply an empty value
29293      if test "x$JAR" = x; then
29294        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29295$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29297$as_echo_n "checking for JAR... " >&6; }
29298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29299$as_echo "disabled" >&6; }
29300      else
29301        # Check if the provided tool contains a complete path.
29302        tool_specified="$JAR"
29303        tool_basename="${tool_specified##*/}"
29304        if test "x$tool_basename" = "x$tool_specified"; then
29305          # A command without a complete path is provided, search $PATH.
29306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29307$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29308          # Extract the first word of "$tool_basename", so it can be a program name with args.
29309set dummy $tool_basename; ac_word=$2
29310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29311$as_echo_n "checking for $ac_word... " >&6; }
29312if ${ac_cv_path_JAR+:} false; then :
29313  $as_echo_n "(cached) " >&6
29314else
29315  case $JAR in
29316  [\\/]* | ?:[\\/]*)
29317  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29318  ;;
29319  *)
29320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29321for as_dir in $PATH
29322do
29323  IFS=$as_save_IFS
29324  test -z "$as_dir" && as_dir=.
29325    for ac_exec_ext in '' $ac_executable_extensions; do
29326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29327    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29329    break 2
29330  fi
29331done
29332  done
29333IFS=$as_save_IFS
29334
29335  ;;
29336esac
29337fi
29338JAR=$ac_cv_path_JAR
29339if test -n "$JAR"; then
29340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29341$as_echo "$JAR" >&6; }
29342else
29343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29344$as_echo "no" >&6; }
29345fi
29346
29347
29348          if test "x$JAR" = x; then
29349            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29350          fi
29351        else
29352          # Otherwise we believe it is a complete path. Use it as it is.
29353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29354$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29356$as_echo_n "checking for JAR... " >&6; }
29357          if test ! -x "$tool_specified"; then
29358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29359$as_echo "not found" >&6; }
29360            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29361          fi
29362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29363$as_echo "$tool_specified" >&6; }
29364        fi
29365      fi
29366    fi
29367
29368  fi
29369
29370
29371
29372  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29373
29374  # Publish this variable in the help.
29375
29376
29377  if [ -z "${JARSIGNER+x}" ]; then
29378    # The variable is not set by user, try to locate tool using the code snippet
29379
29380      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29381$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29382      JARSIGNER=$BOOT_JDK/bin/jarsigner
29383      if test ! -x $JARSIGNER; then
29384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29385$as_echo "not found" >&6; }
29386        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29387$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29388        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29389      fi
29390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29391$as_echo "ok" >&6; }
29392
29393
29394  else
29395    # The variable is set, but is it from the command line or the environment?
29396
29397    # Try to remove the string !JARSIGNER! from our list.
29398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29400      # If it failed, the variable was not from the command line. Ignore it,
29401      # but warn the user (except for BASH, which is always set by the calling BASH).
29402      if test "xJARSIGNER" != xBASH; then
29403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29404$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29405      fi
29406      # Try to locate tool using the code snippet
29407
29408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29409$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29410      JARSIGNER=$BOOT_JDK/bin/jarsigner
29411      if test ! -x $JARSIGNER; then
29412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29413$as_echo "not found" >&6; }
29414        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29415$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29416        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29417      fi
29418      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29419$as_echo "ok" >&6; }
29420
29421
29422    else
29423      # If it succeeded, then it was overridden by the user. We will use it
29424      # for the tool.
29425
29426      # First remove it from the list of overridden variables, so we can test
29427      # for unknown variables in the end.
29428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29429
29430      # Check if we try to supply an empty value
29431      if test "x$JARSIGNER" = x; then
29432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29433$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29435$as_echo_n "checking for JARSIGNER... " >&6; }
29436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29437$as_echo "disabled" >&6; }
29438      else
29439        # Check if the provided tool contains a complete path.
29440        tool_specified="$JARSIGNER"
29441        tool_basename="${tool_specified##*/}"
29442        if test "x$tool_basename" = "x$tool_specified"; then
29443          # A command without a complete path is provided, search $PATH.
29444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29445$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29446          # Extract the first word of "$tool_basename", so it can be a program name with args.
29447set dummy $tool_basename; ac_word=$2
29448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29449$as_echo_n "checking for $ac_word... " >&6; }
29450if ${ac_cv_path_JARSIGNER+:} false; then :
29451  $as_echo_n "(cached) " >&6
29452else
29453  case $JARSIGNER in
29454  [\\/]* | ?:[\\/]*)
29455  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29456  ;;
29457  *)
29458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29459for as_dir in $PATH
29460do
29461  IFS=$as_save_IFS
29462  test -z "$as_dir" && as_dir=.
29463    for ac_exec_ext in '' $ac_executable_extensions; do
29464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29465    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29467    break 2
29468  fi
29469done
29470  done
29471IFS=$as_save_IFS
29472
29473  ;;
29474esac
29475fi
29476JARSIGNER=$ac_cv_path_JARSIGNER
29477if test -n "$JARSIGNER"; then
29478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29479$as_echo "$JARSIGNER" >&6; }
29480else
29481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29482$as_echo "no" >&6; }
29483fi
29484
29485
29486          if test "x$JARSIGNER" = x; then
29487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29488          fi
29489        else
29490          # Otherwise we believe it is a complete path. Use it as it is.
29491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29492$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29494$as_echo_n "checking for JARSIGNER... " >&6; }
29495          if test ! -x "$tool_specified"; then
29496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29497$as_echo "not found" >&6; }
29498            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29499          fi
29500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29501$as_echo "$tool_specified" >&6; }
29502        fi
29503      fi
29504    fi
29505
29506  fi
29507
29508
29509
29510  # Finally, set some other options...
29511
29512  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29513  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29514
29515
29516
29517  # Check if the boot jdk is 32 or 64 bit
29518  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29519    BOOT_JDK_BITS="64"
29520  else
29521    BOOT_JDK_BITS="32"
29522  fi
29523  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29524$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29526$as_echo "$BOOT_JDK_BITS" >&6; }
29527
29528
29529
29530###############################################################################
29531#
29532# Configure the sources to use. We can add or override individual directories.
29533#
29534###############################################################################
29535
29536
29537  # Where are the sources.
29538  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29539  CORBA_TOPDIR="$SRC_ROOT/corba"
29540  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29541  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29542  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29543  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29544  JDK_TOPDIR="$SRC_ROOT/jdk"
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554  # This feature is no longer supported.
29555
29556
29557
29558# Check whether --with-add-source-root was given.
29559if test "${with_add_source_root+set}" = set; then :
29560  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
29561$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29562fi
29563
29564
29565
29566
29567# Check whether --with-override-source-root was given.
29568if test "${with_override_source_root+set}" = set; then :
29569  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
29570$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29571fi
29572
29573
29574
29575
29576# Check whether --with-adds-and-overrides was given.
29577if test "${with_adds_and_overrides+set}" = set; then :
29578  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
29579$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29580fi
29581
29582
29583
29584
29585# Check whether --with-override-langtools was given.
29586if test "${with_override_langtools+set}" = set; then :
29587  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29588$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29589fi
29590
29591
29592
29593
29594# Check whether --with-override-corba was given.
29595if test "${with_override_corba+set}" = set; then :
29596  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29597$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29598fi
29599
29600
29601
29602
29603# Check whether --with-override-jaxp was given.
29604if test "${with_override_jaxp+set}" = set; then :
29605  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29606$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29607fi
29608
29609
29610
29611
29612# Check whether --with-override-jaxws was given.
29613if test "${with_override_jaxws+set}" = set; then :
29614  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29615$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29616fi
29617
29618
29619
29620
29621# Check whether --with-override-hotspot was given.
29622if test "${with_override_hotspot+set}" = set; then :
29623  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29624$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29625fi
29626
29627
29628
29629
29630# Check whether --with-override-nashorn was given.
29631if test "${with_override_nashorn+set}" = set; then :
29632  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29633$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29634fi
29635
29636
29637
29638
29639# Check whether --with-override-jdk was given.
29640if test "${with_override_jdk+set}" = set; then :
29641  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29642$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29643fi
29644
29645
29646
29647
29648  BUILD_OUTPUT="$OUTPUT_ROOT"
29649
29650
29651  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29652  BUILD_HOTSPOT=true
29653
29654
29655
29656# Check whether --with-import-hotspot was given.
29657if test "${with_import_hotspot+set}" = set; then :
29658  withval=$with_import_hotspot;
29659fi
29660
29661  if test "x$with_import_hotspot" != x; then
29662    CURDIR="$PWD"
29663    cd "$with_import_hotspot"
29664    HOTSPOT_DIST="`pwd`"
29665    cd "$CURDIR"
29666    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29667      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29668    fi
29669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29670$as_echo_n "checking if hotspot should be imported... " >&6; }
29671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29672$as_echo "yes from $HOTSPOT_DIST" >&6; }
29673    BUILD_HOTSPOT=false
29674  fi
29675
29676  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29677
29678
29679###############################################################################
29680#
29681# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29682# native code.
29683#
29684###############################################################################
29685
29686# See if we are doing a complete static build or not
29687
29688  # Check whether --enable-static-build was given.
29689if test "${enable_static_build+set}" = set; then :
29690  enableval=$enable_static_build;
29691fi
29692
29693  STATIC_BUILD=false
29694  if test "x$enable_static_build" = "xyes"; then
29695    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29696$as_echo_n "checking if static build is enabled... " >&6; }
29697    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29698$as_echo "yes" >&6; }
29699    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29700      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29701    fi
29702    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29703    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29704    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29705    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29706    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29707    STATIC_BUILD=true
29708  elif test "x$enable_static_build" = "xno"; then
29709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29710$as_echo_n "checking if static build is enabled... " >&6; }
29711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29712$as_echo "no" >&6; }
29713  elif test "x$enable_static_build" != "x"; then
29714    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29715  fi
29716
29717
29718
29719
29720# First determine the toolchain type (compiler family)
29721
29722
29723# Check whether --with-toolchain-type was given.
29724if test "${with_toolchain_type+set}" = set; then :
29725  withval=$with_toolchain_type;
29726fi
29727
29728
29729  # Use indirect variable referencing
29730  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29731  VALID_TOOLCHAINS=${!toolchain_var_name}
29732
29733  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29734    if test -n "$XCODEBUILD"; then
29735      # On Mac OS X, default toolchain to clang after Xcode 5
29736      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29737      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29738      if test $? -ne 0; then
29739        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29740      fi
29741      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29742          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29743          $CUT -f 1 -d .`
29744      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29745$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29746      if test $XCODE_MAJOR_VERSION -ge 5; then
29747          DEFAULT_TOOLCHAIN="clang"
29748      else
29749          DEFAULT_TOOLCHAIN="gcc"
29750      fi
29751    else
29752      # If Xcode is not installed, but the command line tools are
29753      # then we can't run xcodebuild. On these systems we should
29754      # default to clang
29755      DEFAULT_TOOLCHAIN="clang"
29756    fi
29757  else
29758    # First toolchain type in the list is the default
29759    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29760  fi
29761
29762  if test "x$with_toolchain_type" = xlist; then
29763    # List all toolchains
29764    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29765$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29766    for toolchain in $VALID_TOOLCHAINS; do
29767      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29768      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29769      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29770    done
29771
29772    exit 0
29773  elif test "x$with_toolchain_type" != x; then
29774    # User override; check that it is valid
29775    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29776      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29777$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29778      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29779$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29780      as_fn_error $? "Cannot continue." "$LINENO" 5
29781    fi
29782    TOOLCHAIN_TYPE=$with_toolchain_type
29783  else
29784    # No flag given, use default
29785    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29786  fi
29787
29788
29789  TOOLCHAIN_CC_BINARY_clang="clang"
29790  TOOLCHAIN_CC_BINARY_gcc="gcc"
29791  TOOLCHAIN_CC_BINARY_microsoft="cl"
29792  TOOLCHAIN_CC_BINARY_solstudio="cc"
29793  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29794
29795  TOOLCHAIN_CXX_BINARY_clang="clang++"
29796  TOOLCHAIN_CXX_BINARY_gcc="g++"
29797  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29798  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29799  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29800
29801  # Use indirect variable referencing
29802  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29803  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29804  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29805  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29806  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29807  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29808
29809
29810  # Define filename patterns
29811  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29812    LIBRARY_PREFIX=
29813    SHARED_LIBRARY_SUFFIX='.dll'
29814    STATIC_LIBRARY_SUFFIX='.lib'
29815    SHARED_LIBRARY='$1.dll'
29816    STATIC_LIBRARY='$1.lib'
29817    OBJ_SUFFIX='.obj'
29818    EXE_SUFFIX='.exe'
29819  else
29820    LIBRARY_PREFIX=lib
29821    SHARED_LIBRARY_SUFFIX='.so'
29822    STATIC_LIBRARY_SUFFIX='.a'
29823    SHARED_LIBRARY='lib$1.so'
29824    STATIC_LIBRARY='lib$1.a'
29825    OBJ_SUFFIX='.o'
29826    EXE_SUFFIX=''
29827    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29828      # For full static builds, we're overloading the SHARED_LIBRARY
29829      # variables in order to limit the amount of changes required.
29830      # It would be better to remove SHARED and just use LIBRARY and
29831      # LIBRARY_SUFFIX for libraries that can be built either
29832      # shared or static and use STATIC_* for libraries that are
29833      # always built statically.
29834      if test "x$STATIC_BUILD" = xtrue; then
29835        SHARED_LIBRARY='lib$1.a'
29836        SHARED_LIBRARY_SUFFIX='.a'
29837      else
29838        SHARED_LIBRARY='lib$1.dylib'
29839        SHARED_LIBRARY_SUFFIX='.dylib'
29840      fi
29841    fi
29842  fi
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29854    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29855$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29856  else
29857    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29858$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29859  fi
29860
29861
29862# User supplied flags should be used when configure detects compilers
29863
29864  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29865    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29866$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29867  fi
29868
29869  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29870    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29871$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29872  fi
29873
29874  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29875    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29876$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29877  fi
29878
29879
29880# Check whether --with-extra-cflags was given.
29881if test "${with_extra_cflags+set}" = set; then :
29882  withval=$with_extra_cflags;
29883fi
29884
29885
29886
29887# Check whether --with-extra-cxxflags was given.
29888if test "${with_extra_cxxflags+set}" = set; then :
29889  withval=$with_extra_cxxflags;
29890fi
29891
29892
29893
29894# Check whether --with-extra-ldflags was given.
29895if test "${with_extra_ldflags+set}" = set; then :
29896  withval=$with_extra_ldflags;
29897fi
29898
29899
29900  EXTRA_CFLAGS="$with_extra_cflags"
29901  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29902  EXTRA_LDFLAGS="$with_extra_ldflags"
29903
29904  # Hotspot needs these set in their legacy form
29905  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29906  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29907  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29908
29909
29910
29911
29912
29913  # The global CFLAGS and LDLAGS variables are used by configure tests and
29914  # should include the extra parameters
29915  CFLAGS="$EXTRA_CFLAGS"
29916  CXXFLAGS="$EXTRA_CXXFLAGS"
29917  LDFLAGS="$EXTRA_LDFLAGS"
29918  CPPFLAGS=""
29919
29920# The sysroot cflags are needed for configure to be able to run the compilers
29921
29922  if test "x$SYSROOT" != "x"; then
29923    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29924      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29925        # Solaris Studio does not have a concept of sysroot. Instead we must
29926        # make sure the default include and lib dirs are appended to each
29927        # compile and link command line.
29928        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29929        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29930            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29931            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29932      fi
29933    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29934      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29935      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29936    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29937      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29938      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29939    fi
29940    # Propagate the sysroot args to hotspot
29941    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29942    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29943    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29944    # The global CFLAGS and LDFLAGS variables need these for configure to function
29945    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29946    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29947    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29948    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29949  fi
29950
29951  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29952    # We also need -iframework<path>/System/Library/Frameworks
29953    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29954    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29955    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29956    # set this here so it doesn't have to be peppered throughout the forest
29957    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29958    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29959  fi
29960
29961
29962
29963
29964
29965# Then detect the actual binaries needed
29966
29967  # FIXME: Is this needed?
29968  ac_ext=cpp
29969ac_cpp='$CXXCPP $CPPFLAGS'
29970ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29971ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29972ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29973
29974
29975  # Store the CFLAGS etc passed to the configure script.
29976  ORG_CFLAGS="$CFLAGS"
29977  ORG_CXXFLAGS="$CXXFLAGS"
29978
29979  # autoconf magic only relies on PATH, so update it if tools dir is specified
29980  OLD_PATH="$PATH"
29981
29982  # On Windows, we need to detect the visual studio installation first.
29983  # This will change the PATH, but we need to keep that new PATH even
29984  # after toolchain detection is done, since the compiler (on x86) uses
29985  # it for DLL resolution in runtime.
29986  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29987      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29988
29989  # Store path to cygwin link.exe to help excluding it when searching for
29990  # VS linker. This must be done before changing the PATH when looking for VS.
29991  # Extract the first word of "link", so it can be a program name with args.
29992set dummy link; ac_word=$2
29993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29994$as_echo_n "checking for $ac_word... " >&6; }
29995if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29996  $as_echo_n "(cached) " >&6
29997else
29998  case $CYGWIN_LINK in
29999  [\\/]* | ?:[\\/]*)
30000  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
30001  ;;
30002  *)
30003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30004for as_dir in $PATH
30005do
30006  IFS=$as_save_IFS
30007  test -z "$as_dir" && as_dir=.
30008    for ac_exec_ext in '' $ac_executable_extensions; do
30009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30010    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30012    break 2
30013  fi
30014done
30015  done
30016IFS=$as_save_IFS
30017
30018  ;;
30019esac
30020fi
30021CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30022if test -n "$CYGWIN_LINK"; then
30023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30024$as_echo "$CYGWIN_LINK" >&6; }
30025else
30026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30027$as_echo "no" >&6; }
30028fi
30029
30030
30031  if test "x$CYGWIN_LINK" != x; then
30032    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30033$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30034    "$CYGWIN_LINK" --version > /dev/null
30035    if test $? -eq 0 ; then
30036      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30037$as_echo "yes" >&6; }
30038    else
30039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30040$as_echo "no" >&6; }
30041      # This might be the VS linker. Don't exclude it later on.
30042      CYGWIN_LINK=""
30043    fi
30044  fi
30045
30046  # First-hand choice is to locate and run the vsvars bat file.
30047
30048
30049# Check whether --with-toolchain-version was given.
30050if test "${with_toolchain_version+set}" = set; then :
30051  withval=$with_toolchain_version;
30052fi
30053
30054
30055  if test "x$with_toolchain_version" = xlist; then
30056    # List all toolchains
30057    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30058$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30059    for version in $VALID_VS_VERSIONS; do
30060      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30061      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30062    done
30063
30064    exit 0
30065  elif test "x$DEVKIT_VS_VERSION" != x; then
30066    VS_VERSION=$DEVKIT_VS_VERSION
30067    TOOLCHAIN_VERSION=$VS_VERSION
30068    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30069    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30070    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30071    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30072    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30073    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30074
30075    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30076    # can still be exported as INCLUDE for compiler invocations without
30077    # SYSROOT_CFLAGS
30078    OLDIFS="$IFS"
30079    IFS=";"
30080    for i in $DEVKIT_VS_INCLUDE; do
30081      ipath=$i
30082
30083  unix_path="$ipath"
30084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30085    windows_path=`$CYGPATH -m "$unix_path"`
30086    ipath="$windows_path"
30087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30088    windows_path=`cmd //c echo $unix_path`
30089    ipath="$windows_path"
30090  fi
30091
30092      VS_INCLUDE="$VS_INCLUDE;$ipath"
30093    done
30094    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30095    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30096    for i in $DEVKIT_VS_LIB; do
30097      libpath=$i
30098
30099  unix_path="$libpath"
30100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30101    windows_path=`$CYGPATH -m "$unix_path"`
30102    libpath="$windows_path"
30103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30104    windows_path=`cmd //c echo $unix_path`
30105    libpath="$windows_path"
30106  fi
30107
30108      VS_LIB="$VS_LIB;$libpath"
30109    done
30110    IFS="$OLDIFS"
30111
30112    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30113$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30114
30115  elif test "x$with_toolchain_version" != x; then
30116    # User override; check that it is valid
30117    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30118      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30119$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30120      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30121$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30122      as_fn_error $? "Cannot continue." "$LINENO" 5
30123    fi
30124    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30125  else
30126    # No flag given, use default
30127    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30128  fi
30129
30130  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30131
30132  VS_VERSION="$VS_VERSION"
30133  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30134  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30135  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30136  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30137
30138  # When using --with-tools-dir, assume it points to the correct and default
30139  # version of Visual Studio or that --with-toolchain-version was also set.
30140  if test "x$with_tools_dir" != x; then
30141
30142  if test "x$VS_ENV_CMD" = x; then
30143    VS_VERSION="${VS_VERSION}"
30144    VS_BASE="$with_tools_dir/../.."
30145    METHOD="--with-tools-dir"
30146
30147    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30148      VCVARSFILE="vc/bin/vcvars32.bat"
30149    else
30150      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30151    fi
30152
30153
30154  windows_path="$VS_BASE"
30155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30156    unix_path=`$CYGPATH -u "$windows_path"`
30157    VS_BASE="$unix_path"
30158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30160    VS_BASE="$unix_path"
30161  fi
30162
30163    if test -d "$VS_BASE"; then
30164      if test -f "$VS_BASE/$VCVARSFILE"; then
30165        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30166$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30167        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30168        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30169        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30170        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30171      else
30172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30173$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30174        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30175$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30176      fi
30177    fi
30178  fi
30179
30180
30181  if test "x$VS_ENV_CMD" = x; then
30182    VS_VERSION="${VS_VERSION}"
30183    VS_BASE="$with_tools_dir/../../.."
30184    METHOD="--with-tools-dir"
30185
30186    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30187      VCVARSFILE="vc/bin/vcvars32.bat"
30188    else
30189      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30190    fi
30191
30192
30193  windows_path="$VS_BASE"
30194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30195    unix_path=`$CYGPATH -u "$windows_path"`
30196    VS_BASE="$unix_path"
30197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30199    VS_BASE="$unix_path"
30200  fi
30201
30202    if test -d "$VS_BASE"; then
30203      if test -f "$VS_BASE/$VCVARSFILE"; then
30204        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30205$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30206        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30207        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30208        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30209        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30210      else
30211        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30212$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30214$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30215      fi
30216    fi
30217  fi
30218
30219    if test "x$VS_ENV_CMD" = x; then
30220      # Having specified an argument which is incorrect will produce an instant failure;
30221      # we should not go on looking
30222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30223$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30224      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30225$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30226      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30227$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30228      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30229    fi
30230  fi
30231
30232  VS_ENV_CMD=""
30233  VS_ENV_ARGS=""
30234
30235  if test "x$VS_COMNTOOLS" != x; then
30236
30237  if test "x$VS_ENV_CMD" = x; then
30238    VS_VERSION="${VS_VERSION}"
30239    VS_BASE="$VS_COMNTOOLS/../.."
30240    METHOD="$VS_COMNTOOLS_VAR variable"
30241
30242    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30243      VCVARSFILE="vc/bin/vcvars32.bat"
30244    else
30245      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30246    fi
30247
30248
30249  windows_path="$VS_BASE"
30250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30251    unix_path=`$CYGPATH -u "$windows_path"`
30252    VS_BASE="$unix_path"
30253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30255    VS_BASE="$unix_path"
30256  fi
30257
30258    if test -d "$VS_BASE"; then
30259      if test -f "$VS_BASE/$VCVARSFILE"; then
30260        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30261$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30262        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30263        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30264        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30265        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30266      else
30267        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30268$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30269        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30270$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30271      fi
30272    fi
30273  fi
30274
30275  fi
30276  if test "x$PROGRAMFILES" != x; then
30277
30278  if test "x$VS_ENV_CMD" = x; then
30279    VS_VERSION="${VS_VERSION}"
30280    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30281    METHOD="well-known name"
30282
30283    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30284      VCVARSFILE="vc/bin/vcvars32.bat"
30285    else
30286      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30287    fi
30288
30289
30290  windows_path="$VS_BASE"
30291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30292    unix_path=`$CYGPATH -u "$windows_path"`
30293    VS_BASE="$unix_path"
30294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30296    VS_BASE="$unix_path"
30297  fi
30298
30299    if test -d "$VS_BASE"; then
30300      if test -f "$VS_BASE/$VCVARSFILE"; then
30301        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30302$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30303        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30304        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30305        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30306        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30307      else
30308        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30309$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30310        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30311$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30312      fi
30313    fi
30314  fi
30315
30316  fi
30317  # Work around the insanely named ProgramFiles(x86) env variable
30318  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30319  if test "x$PROGRAMFILES_X86" != x; then
30320
30321  if test "x$VS_ENV_CMD" = x; then
30322    VS_VERSION="${VS_VERSION}"
30323    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30324    METHOD="well-known name"
30325
30326    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30327      VCVARSFILE="vc/bin/vcvars32.bat"
30328    else
30329      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30330    fi
30331
30332
30333  windows_path="$VS_BASE"
30334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30335    unix_path=`$CYGPATH -u "$windows_path"`
30336    VS_BASE="$unix_path"
30337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30339    VS_BASE="$unix_path"
30340  fi
30341
30342    if test -d "$VS_BASE"; then
30343      if test -f "$VS_BASE/$VCVARSFILE"; then
30344        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30345$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30346        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30347        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30348        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30349        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30350      else
30351        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30352$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30353        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30354$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30355      fi
30356    fi
30357  fi
30358
30359  fi
30360
30361  if test "x$VS_ENV_CMD" = x; then
30362    VS_VERSION="${VS_VERSION}"
30363    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30364    METHOD="well-known name"
30365
30366    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30367      VCVARSFILE="vc/bin/vcvars32.bat"
30368    else
30369      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30370    fi
30371
30372
30373  windows_path="$VS_BASE"
30374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30375    unix_path=`$CYGPATH -u "$windows_path"`
30376    VS_BASE="$unix_path"
30377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30379    VS_BASE="$unix_path"
30380  fi
30381
30382    if test -d "$VS_BASE"; then
30383      if test -f "$VS_BASE/$VCVARSFILE"; then
30384        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30385$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30386        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30387        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30388        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30389        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30390      else
30391        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30392$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30393        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30394$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30395      fi
30396    fi
30397  fi
30398
30399
30400  if test "x$VS_ENV_CMD" = x; then
30401    VS_VERSION="${VS_VERSION}"
30402    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30403    METHOD="well-known name"
30404
30405    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30406      VCVARSFILE="vc/bin/vcvars32.bat"
30407    else
30408      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30409    fi
30410
30411
30412  windows_path="$VS_BASE"
30413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30414    unix_path=`$CYGPATH -u "$windows_path"`
30415    VS_BASE="$unix_path"
30416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30418    VS_BASE="$unix_path"
30419  fi
30420
30421    if test -d "$VS_BASE"; then
30422      if test -f "$VS_BASE/$VCVARSFILE"; then
30423        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30424$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30425        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30426        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30427        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30428        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30429      else
30430        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30431$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30432        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30433$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30434      fi
30435    fi
30436  fi
30437
30438
30439  if test "x$SDK_INSTALL_DIR" != x; then
30440    if test "x$ProgramW6432" != x; then
30441
30442  if test "x$VS_ENV_CMD" = x; then
30443    VS_VERSION="${VS_VERSION}"
30444    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30445    METHOD="well-known name"
30446
30447  windows_path="$WIN_SDK_BASE"
30448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30449    unix_path=`$CYGPATH -u "$windows_path"`
30450    WIN_SDK_BASE="$unix_path"
30451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30453    WIN_SDK_BASE="$unix_path"
30454  fi
30455
30456    if test -d "$WIN_SDK_BASE"; then
30457      # There have been cases of partial or broken SDK installations. A missing
30458      # lib dir is not going to work.
30459      if test ! -d "$WIN_SDK_BASE/lib"; then
30460        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30461$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30462        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30463$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30464      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30465        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30466$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30467        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30468        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30469          VS_ENV_ARGS="/x86"
30470        else
30471          VS_ENV_ARGS="/x64"
30472        fi
30473        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30474        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30475        # TODO: improve detection for other versions of SDK
30476        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30477      else
30478        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30479$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30480        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30481$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30482      fi
30483    fi
30484  fi
30485
30486    fi
30487    if test "x$PROGRAMW6432" != x; then
30488
30489  if test "x$VS_ENV_CMD" = x; then
30490    VS_VERSION="${VS_VERSION}"
30491    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30492    METHOD="well-known name"
30493
30494  windows_path="$WIN_SDK_BASE"
30495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30496    unix_path=`$CYGPATH -u "$windows_path"`
30497    WIN_SDK_BASE="$unix_path"
30498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30500    WIN_SDK_BASE="$unix_path"
30501  fi
30502
30503    if test -d "$WIN_SDK_BASE"; then
30504      # There have been cases of partial or broken SDK installations. A missing
30505      # lib dir is not going to work.
30506      if test ! -d "$WIN_SDK_BASE/lib"; then
30507        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30508$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30509        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30510$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30511      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30512        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30513$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30514        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30515        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30516          VS_ENV_ARGS="/x86"
30517        else
30518          VS_ENV_ARGS="/x64"
30519        fi
30520        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30521        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30522        # TODO: improve detection for other versions of SDK
30523        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30524      else
30525        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30526$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30527        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30528$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30529      fi
30530    fi
30531  fi
30532
30533    fi
30534    if test "x$PROGRAMFILES" != x; then
30535
30536  if test "x$VS_ENV_CMD" = x; then
30537    VS_VERSION="${VS_VERSION}"
30538    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30539    METHOD="well-known name"
30540
30541  windows_path="$WIN_SDK_BASE"
30542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30543    unix_path=`$CYGPATH -u "$windows_path"`
30544    WIN_SDK_BASE="$unix_path"
30545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30547    WIN_SDK_BASE="$unix_path"
30548  fi
30549
30550    if test -d "$WIN_SDK_BASE"; then
30551      # There have been cases of partial or broken SDK installations. A missing
30552      # lib dir is not going to work.
30553      if test ! -d "$WIN_SDK_BASE/lib"; then
30554        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30555$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30556        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30557$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30558      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30559        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30560$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30561        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30562        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30563          VS_ENV_ARGS="/x86"
30564        else
30565          VS_ENV_ARGS="/x64"
30566        fi
30567        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30568        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30569        # TODO: improve detection for other versions of SDK
30570        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30571      else
30572        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30573$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30574        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30575$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30576      fi
30577    fi
30578  fi
30579
30580    fi
30581
30582  if test "x$VS_ENV_CMD" = x; then
30583    VS_VERSION="${VS_VERSION}"
30584    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30585    METHOD="well-known name"
30586
30587  windows_path="$WIN_SDK_BASE"
30588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30589    unix_path=`$CYGPATH -u "$windows_path"`
30590    WIN_SDK_BASE="$unix_path"
30591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30593    WIN_SDK_BASE="$unix_path"
30594  fi
30595
30596    if test -d "$WIN_SDK_BASE"; then
30597      # There have been cases of partial or broken SDK installations. A missing
30598      # lib dir is not going to work.
30599      if test ! -d "$WIN_SDK_BASE/lib"; then
30600        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30601$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30602        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30603$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30604      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30605        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30606$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30607        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30608        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30609          VS_ENV_ARGS="/x86"
30610        else
30611          VS_ENV_ARGS="/x64"
30612        fi
30613        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30614        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30615        # TODO: improve detection for other versions of SDK
30616        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30617      else
30618        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30619$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30620        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30621$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30622      fi
30623    fi
30624  fi
30625
30626
30627  if test "x$VS_ENV_CMD" = x; then
30628    VS_VERSION="${VS_VERSION}"
30629    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30630    METHOD="well-known name"
30631
30632  windows_path="$WIN_SDK_BASE"
30633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30634    unix_path=`$CYGPATH -u "$windows_path"`
30635    WIN_SDK_BASE="$unix_path"
30636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30638    WIN_SDK_BASE="$unix_path"
30639  fi
30640
30641    if test -d "$WIN_SDK_BASE"; then
30642      # There have been cases of partial or broken SDK installations. A missing
30643      # lib dir is not going to work.
30644      if test ! -d "$WIN_SDK_BASE/lib"; then
30645        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30646$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30647        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30648$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30649      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30650        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30651$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30652        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30653        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30654          VS_ENV_ARGS="/x86"
30655        else
30656          VS_ENV_ARGS="/x64"
30657        fi
30658        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30659        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30660        # TODO: improve detection for other versions of SDK
30661        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30662      else
30663        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30664$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30665        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30666$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30667      fi
30668    fi
30669  fi
30670
30671  fi
30672
30673    if test "x$VS_ENV_CMD" != x; then
30674      TOOLCHAIN_VERSION=$VS_VERSION
30675      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30676      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30677      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30678      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30679      # The rest of the variables are already evaled while probing
30680      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30681$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30682      break
30683    fi
30684  done
30685
30686
30687  # If we have a devkit, skip all of the below.
30688  if test "x$DEVKIT_VS_VERSION" = x; then
30689    if test "x$VS_ENV_CMD" != x; then
30690      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30691
30692  # Only process if variable expands to non-empty
30693
30694  if test "x$VS_ENV_CMD" != x; then
30695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30696
30697  # First separate the path from the arguments. This will split at the first
30698  # space.
30699  complete="$VS_ENV_CMD"
30700  path="${complete%% *}"
30701  tmp="$complete EOL"
30702  arguments="${tmp#* }"
30703
30704  # Input might be given as Windows format, start by converting to
30705  # unix format.
30706  new_path=`$CYGPATH -u "$path"`
30707
30708  # Now try to locate executable using which
30709  new_path=`$WHICH "$new_path" 2> /dev/null`
30710  # bat and cmd files are not always considered executable in cygwin causing which
30711  # to not find them
30712  if test "x$new_path" = x \
30713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30715    new_path=`$CYGPATH -u "$path"`
30716  fi
30717  if test "x$new_path" = x; then
30718    # Oops. Which didn't find the executable.
30719    # The splitting of arguments from the executable at a space might have been incorrect,
30720    # since paths with space are more likely in Windows. Give it another try with the whole
30721    # argument.
30722    path="$complete"
30723    arguments="EOL"
30724    new_path=`$CYGPATH -u "$path"`
30725    new_path=`$WHICH "$new_path" 2> /dev/null`
30726    # bat and cmd files are not always considered executable in cygwin causing which
30727    # to not find them
30728    if test "x$new_path" = x \
30729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30731      new_path=`$CYGPATH -u "$path"`
30732    fi
30733    if test "x$new_path" = x; then
30734      # It's still not found. Now this is an unrecoverable error.
30735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30736$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30737      has_space=`$ECHO "$complete" | $GREP " "`
30738      if test "x$has_space" != x; then
30739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30741      fi
30742      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30743    fi
30744  fi
30745
30746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30749  # "foo.exe" is OK but "foo" is an error.
30750  #
30751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30752  # It is also a way to make sure we got the proper file name for the real test later on.
30753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30754  if test "x$test_shortpath" = x; then
30755    # Short path failed, file does not exist as specified.
30756    # Try adding .exe or .cmd
30757    if test -f "${new_path}.exe"; then
30758      input_to_shortpath="${new_path}.exe"
30759    elif test -f "${new_path}.cmd"; then
30760      input_to_shortpath="${new_path}.cmd"
30761    else
30762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30763$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30766      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30767    fi
30768  else
30769    input_to_shortpath="$new_path"
30770  fi
30771
30772  # Call helper function which possibly converts this using DOS-style short mode.
30773  # If so, the updated path is stored in $new_path.
30774  new_path="$input_to_shortpath"
30775
30776  input_path="$input_to_shortpath"
30777  # Check if we need to convert this using DOS-style short mode. If the path
30778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30779  # take no chances and rewrite it.
30780  # Note: m4 eats our [], so we need to use [ and ] instead.
30781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30782  if test "x$has_forbidden_chars" != x; then
30783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30787      # Going to short mode and back again did indeed matter. Since short mode is
30788      # case insensitive, let's make it lowercase to improve readability.
30789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30790      # Now convert it back to Unix-style (cygpath)
30791      input_path=`$CYGPATH -u "$shortmode_path"`
30792      new_path="$input_path"
30793    fi
30794  fi
30795
30796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30797  if test "x$test_cygdrive_prefix" = x; then
30798    # As a simple fix, exclude /usr/bin since it's not a real path.
30799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30801      # a path prefixed by /cygdrive for fixpath to work.
30802      new_path="$CYGWIN_ROOT_PATH$input_path"
30803    fi
30804  fi
30805
30806  # remove trailing .exe if any
30807  new_path="${new_path/%.exe/}"
30808
30809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30810
30811  # First separate the path from the arguments. This will split at the first
30812  # space.
30813  complete="$VS_ENV_CMD"
30814  path="${complete%% *}"
30815  tmp="$complete EOL"
30816  arguments="${tmp#* }"
30817
30818  # Input might be given as Windows format, start by converting to
30819  # unix format.
30820  new_path="$path"
30821
30822  windows_path="$new_path"
30823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30824    unix_path=`$CYGPATH -u "$windows_path"`
30825    new_path="$unix_path"
30826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30828    new_path="$unix_path"
30829  fi
30830
30831
30832  # Now try to locate executable using which
30833  new_path=`$WHICH "$new_path" 2> /dev/null`
30834
30835  if test "x$new_path" = x; then
30836    # Oops. Which didn't find the executable.
30837    # The splitting of arguments from the executable at a space might have been incorrect,
30838    # since paths with space are more likely in Windows. Give it another try with the whole
30839    # argument.
30840    path="$complete"
30841    arguments="EOL"
30842    new_path="$path"
30843
30844  windows_path="$new_path"
30845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30846    unix_path=`$CYGPATH -u "$windows_path"`
30847    new_path="$unix_path"
30848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30850    new_path="$unix_path"
30851  fi
30852
30853
30854    new_path=`$WHICH "$new_path" 2> /dev/null`
30855    # bat and cmd files are not always considered executable in MSYS causing which
30856    # to not find them
30857    if test "x$new_path" = x \
30858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30860      new_path="$path"
30861
30862  windows_path="$new_path"
30863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30864    unix_path=`$CYGPATH -u "$windows_path"`
30865    new_path="$unix_path"
30866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30868    new_path="$unix_path"
30869  fi
30870
30871    fi
30872
30873    if test "x$new_path" = x; then
30874      # It's still not found. Now this is an unrecoverable error.
30875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30876$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30877      has_space=`$ECHO "$complete" | $GREP " "`
30878      if test "x$has_space" != x; then
30879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30881      fi
30882      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30883    fi
30884  fi
30885
30886  # Now new_path has a complete unix path to the binary
30887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30888    # Keep paths in /bin as-is, but remove trailing .exe if any
30889    new_path="${new_path/%.exe/}"
30890    # Do not save /bin paths to all_fixpath_prefixes!
30891  else
30892    # Not in mixed or Windows style, start by that.
30893    new_path=`cmd //c echo $new_path`
30894
30895  input_path="$new_path"
30896  # Check if we need to convert this using DOS-style short mode. If the path
30897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30898  # take no chances and rewrite it.
30899  # Note: m4 eats our [], so we need to use [ and ] instead.
30900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30901  if test "x$has_forbidden_chars" != x; then
30902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30904  fi
30905
30906    # Output is in $new_path
30907
30908  windows_path="$new_path"
30909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30910    unix_path=`$CYGPATH -u "$windows_path"`
30911    new_path="$unix_path"
30912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30914    new_path="$unix_path"
30915  fi
30916
30917    # remove trailing .exe if any
30918    new_path="${new_path/%.exe/}"
30919
30920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30922  fi
30923
30924    else
30925      # We're on a unix platform. Hooray! :)
30926      # First separate the path from the arguments. This will split at the first
30927      # space.
30928      complete="$VS_ENV_CMD"
30929      path="${complete%% *}"
30930      tmp="$complete EOL"
30931      arguments="${tmp#* }"
30932
30933      # Cannot rely on the command "which" here since it doesn't always work.
30934      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30935      if test -z "$is_absolute_path"; then
30936        # Path to executable is not absolute. Find it.
30937        IFS_save="$IFS"
30938        IFS=:
30939        for p in $PATH; do
30940          if test -f "$p/$path" && test -x "$p/$path"; then
30941            new_path="$p/$path"
30942            break
30943          fi
30944        done
30945        IFS="$IFS_save"
30946      else
30947        # This is an absolute path, we can use it without further modifications.
30948        new_path="$path"
30949      fi
30950
30951      if test "x$new_path" = x; then
30952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30953$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30954        has_space=`$ECHO "$complete" | $GREP " "`
30955        if test "x$has_space" != x; then
30956          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30957$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30958        fi
30959        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30960      fi
30961    fi
30962
30963    # Now join together the path and the arguments once again
30964    if test "x$arguments" != xEOL; then
30965      new_complete="$new_path ${arguments% *}"
30966    else
30967      new_complete="$new_path"
30968    fi
30969
30970    if test "x$complete" != "x$new_complete"; then
30971      VS_ENV_CMD="$new_complete"
30972      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30973$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30974    fi
30975  fi
30976
30977
30978      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30979      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30980$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30981
30982      # We need to create a couple of temporary files.
30983      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30984      $MKDIR -p $VS_ENV_TMP_DIR
30985
30986      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30987      # Instead create a shell script which will set the relevant variables when run.
30988      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30989
30990  unix_path="$WINPATH_VS_ENV_CMD"
30991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30992    windows_path=`$CYGPATH -m "$unix_path"`
30993    WINPATH_VS_ENV_CMD="$windows_path"
30994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30995    windows_path=`cmd //c echo $unix_path`
30996    WINPATH_VS_ENV_CMD="$windows_path"
30997  fi
30998
30999      WINPATH_BASH="$BASH"
31000
31001  unix_path="$WINPATH_BASH"
31002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31003    windows_path=`$CYGPATH -m "$unix_path"`
31004    WINPATH_BASH="$windows_path"
31005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31006    windows_path=`cmd //c echo $unix_path`
31007    WINPATH_BASH="$windows_path"
31008  fi
31009
31010
31011      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31012      # script (executable by bash) that will setup the important variables.
31013      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31014      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31015      # This will end up something like:
31016      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31017      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31018      # These will end up something like:
31019      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31020      # The trailing space for everyone except PATH is no typo, but is needed due
31021      # to trailing \ in the Windows paths. These will be stripped later.
31022      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31023          >> $EXTRACT_VC_ENV_BAT_FILE
31024      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31025          >> $EXTRACT_VC_ENV_BAT_FILE
31026      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31027          >> $EXTRACT_VC_ENV_BAT_FILE
31028      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31029          >> $EXTRACT_VC_ENV_BAT_FILE
31030      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31031          >> $EXTRACT_VC_ENV_BAT_FILE
31032      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31033          >> $EXTRACT_VC_ENV_BAT_FILE
31034
31035      # Now execute the newly created bat file.
31036      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31037      # Change directory so we don't need to mess with Windows paths in redirects.
31038      cd $VS_ENV_TMP_DIR
31039      cmd /c extract-vs-env.bat | $CAT
31040      cd $CURDIR
31041
31042      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31043        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31044$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31045        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31046$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31047        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31048$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31049        as_fn_error $? "Cannot continue" "$LINENO" 5
31050      fi
31051
31052      # Now set all paths and other env variables. This will allow the rest of
31053      # the configure script to find and run the compiler in the proper way.
31054      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31055$as_echo "$as_me: Setting extracted environment variables" >&6;}
31056      . $VS_ENV_TMP_DIR/set-vs-env.sh
31057      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31058      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31059    else
31060      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31061      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31062$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31063    fi
31064  fi
31065
31066  # At this point, we should have correct variables in the environment, or we can't continue.
31067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31068$as_echo_n "checking for Visual Studio variables... " >&6; }
31069
31070  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31071      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31072    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31074$as_echo "present but broken" >&6; }
31075      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31076    else
31077      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31078$as_echo "ok" >&6; }
31079      # Remove any trailing "\" ";" and " " from the variables.
31080      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31081      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31082      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31083      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31084      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31085      # Remove any paths containing # (typically F#) as that messes up make. This
31086      # is needed if visual studio was installed with F# support.
31087      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31088
31089
31090
31091
31092
31093      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31094      OLDIFS="$IFS"
31095      IFS=";"
31096      for i in $VS_INCLUDE; do
31097        ipath=$i
31098        # Only process non-empty elements
31099        if test "x$ipath" != x; then
31100          IFS="$OLDIFS"
31101          # Check that directory exists before calling fixup_path
31102          testpath=$ipath
31103
31104  windows_path="$testpath"
31105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31106    unix_path=`$CYGPATH -u "$windows_path"`
31107    testpath="$unix_path"
31108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31110    testpath="$unix_path"
31111  fi
31112
31113          if test -d "$testpath"; then
31114
31115  # Only process if variable expands to non-empty
31116
31117  if test "x$ipath" != x; then
31118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31119
31120  # Input might be given as Windows format, start by converting to
31121  # unix format.
31122  path="$ipath"
31123  new_path=`$CYGPATH -u "$path"`
31124
31125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31128  # "foo.exe" is OK but "foo" is an error.
31129  #
31130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31131  # It is also a way to make sure we got the proper file name for the real test later on.
31132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31133  if test "x$test_shortpath" = x; then
31134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31135$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31136    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31137  fi
31138
31139  # Call helper function which possibly converts this using DOS-style short mode.
31140  # If so, the updated path is stored in $new_path.
31141
31142  input_path="$new_path"
31143  # Check if we need to convert this using DOS-style short mode. If the path
31144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31145  # take no chances and rewrite it.
31146  # Note: m4 eats our [], so we need to use [ and ] instead.
31147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31148  if test "x$has_forbidden_chars" != x; then
31149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31153      # Going to short mode and back again did indeed matter. Since short mode is
31154      # case insensitive, let's make it lowercase to improve readability.
31155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31156      # Now convert it back to Unix-style (cygpath)
31157      input_path=`$CYGPATH -u "$shortmode_path"`
31158      new_path="$input_path"
31159    fi
31160  fi
31161
31162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31163  if test "x$test_cygdrive_prefix" = x; then
31164    # As a simple fix, exclude /usr/bin since it's not a real path.
31165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31167      # a path prefixed by /cygdrive for fixpath to work.
31168      new_path="$CYGWIN_ROOT_PATH$input_path"
31169    fi
31170  fi
31171
31172
31173  if test "x$path" != "x$new_path"; then
31174    ipath="$new_path"
31175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31176$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31177  fi
31178
31179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31180
31181  path="$ipath"
31182  has_colon=`$ECHO $path | $GREP ^.:`
31183  new_path="$path"
31184  if test "x$has_colon" = x; then
31185    # Not in mixed or Windows style, start by that.
31186    new_path=`cmd //c echo $path`
31187  fi
31188
31189
31190  input_path="$new_path"
31191  # Check if we need to convert this using DOS-style short mode. If the path
31192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31193  # take no chances and rewrite it.
31194  # Note: m4 eats our [], so we need to use [ and ] instead.
31195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31196  if test "x$has_forbidden_chars" != x; then
31197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31199  fi
31200
31201
31202  windows_path="$new_path"
31203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31204    unix_path=`$CYGPATH -u "$windows_path"`
31205    new_path="$unix_path"
31206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31208    new_path="$unix_path"
31209  fi
31210
31211  if test "x$path" != "x$new_path"; then
31212    ipath="$new_path"
31213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31214$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31215  fi
31216
31217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31219
31220    else
31221      # We're on a unix platform. Hooray! :)
31222      path="$ipath"
31223      has_space=`$ECHO "$path" | $GREP " "`
31224      if test "x$has_space" != x; then
31225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31226$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31227        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31228      fi
31229
31230      # Use eval to expand a potential ~
31231      eval path="$path"
31232      if test ! -f "$path" && test ! -d "$path"; then
31233        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31234      fi
31235
31236      if test -d "$path"; then
31237        ipath="`cd "$path"; $THEPWDCMD -L`"
31238      else
31239        dir="`$DIRNAME "$path"`"
31240        base="`$BASENAME "$path"`"
31241        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31242      fi
31243    fi
31244  fi
31245
31246            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31247          fi
31248          IFS=";"
31249        fi
31250      done
31251      # Convert VS_LIB into SYSROOT_LDFLAGS
31252      for i in $VS_LIB; do
31253        libpath=$i
31254        # Only process non-empty elements
31255        if test "x$libpath" != x; then
31256          IFS="$OLDIFS"
31257          # Check that directory exists before calling fixup_path
31258          testpath=$libpath
31259
31260  windows_path="$testpath"
31261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31262    unix_path=`$CYGPATH -u "$windows_path"`
31263    testpath="$unix_path"
31264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31266    testpath="$unix_path"
31267  fi
31268
31269          if test -d "$testpath"; then
31270
31271  # Only process if variable expands to non-empty
31272
31273  if test "x$libpath" != x; then
31274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31275
31276  # Input might be given as Windows format, start by converting to
31277  # unix format.
31278  path="$libpath"
31279  new_path=`$CYGPATH -u "$path"`
31280
31281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31284  # "foo.exe" is OK but "foo" is an error.
31285  #
31286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31287  # It is also a way to make sure we got the proper file name for the real test later on.
31288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31289  if test "x$test_shortpath" = x; then
31290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31291$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31292    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31293  fi
31294
31295  # Call helper function which possibly converts this using DOS-style short mode.
31296  # If so, the updated path is stored in $new_path.
31297
31298  input_path="$new_path"
31299  # Check if we need to convert this using DOS-style short mode. If the path
31300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31301  # take no chances and rewrite it.
31302  # Note: m4 eats our [], so we need to use [ and ] instead.
31303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31304  if test "x$has_forbidden_chars" != x; then
31305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31309      # Going to short mode and back again did indeed matter. Since short mode is
31310      # case insensitive, let's make it lowercase to improve readability.
31311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31312      # Now convert it back to Unix-style (cygpath)
31313      input_path=`$CYGPATH -u "$shortmode_path"`
31314      new_path="$input_path"
31315    fi
31316  fi
31317
31318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31319  if test "x$test_cygdrive_prefix" = x; then
31320    # As a simple fix, exclude /usr/bin since it's not a real path.
31321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31323      # a path prefixed by /cygdrive for fixpath to work.
31324      new_path="$CYGWIN_ROOT_PATH$input_path"
31325    fi
31326  fi
31327
31328
31329  if test "x$path" != "x$new_path"; then
31330    libpath="$new_path"
31331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31332$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31333  fi
31334
31335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31336
31337  path="$libpath"
31338  has_colon=`$ECHO $path | $GREP ^.:`
31339  new_path="$path"
31340  if test "x$has_colon" = x; then
31341    # Not in mixed or Windows style, start by that.
31342    new_path=`cmd //c echo $path`
31343  fi
31344
31345
31346  input_path="$new_path"
31347  # Check if we need to convert this using DOS-style short mode. If the path
31348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31349  # take no chances and rewrite it.
31350  # Note: m4 eats our [], so we need to use [ and ] instead.
31351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31352  if test "x$has_forbidden_chars" != x; then
31353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31355  fi
31356
31357
31358  windows_path="$new_path"
31359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31360    unix_path=`$CYGPATH -u "$windows_path"`
31361    new_path="$unix_path"
31362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31364    new_path="$unix_path"
31365  fi
31366
31367  if test "x$path" != "x$new_path"; then
31368    libpath="$new_path"
31369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31370$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31371  fi
31372
31373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31375
31376    else
31377      # We're on a unix platform. Hooray! :)
31378      path="$libpath"
31379      has_space=`$ECHO "$path" | $GREP " "`
31380      if test "x$has_space" != x; then
31381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31382$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31384      fi
31385
31386      # Use eval to expand a potential ~
31387      eval path="$path"
31388      if test ! -f "$path" && test ! -d "$path"; then
31389        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31390      fi
31391
31392      if test -d "$path"; then
31393        libpath="`cd "$path"; $THEPWDCMD -L`"
31394      else
31395        dir="`$DIRNAME "$path"`"
31396        base="`$BASENAME "$path"`"
31397        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31398      fi
31399    fi
31400  fi
31401
31402            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31403          fi
31404          IFS=";"
31405        fi
31406      done
31407      IFS="$OLDIFS"
31408    fi
31409  else
31410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31411$as_echo "not found" >&6; }
31412
31413    if test "x$VS_ENV_CMD" = x; then
31414      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31415$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31416      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31417$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31418    else
31419      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31420$as_echo "$as_me: Running the extraction script failed." >&6;}
31421    fi
31422    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31423$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31424    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31425$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31426    as_fn_error $? "Cannot continue" "$LINENO" 5
31427  fi
31428
31429    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31430    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31431    PATH="$VS_PATH"
31432    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31433    export INCLUDE="$VS_INCLUDE"
31434    export LIB="$VS_LIB"
31435  fi
31436
31437  # For solaris we really need solaris tools, and not the GNU equivalent.
31438  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31439  # so add that to path before starting to probe.
31440  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31441  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31442    PATH="/usr/ccs/bin:$PATH"
31443  fi
31444
31445  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31446  # override all other locations.
31447  if test "x$TOOLCHAIN_PATH" != x; then
31448    PATH=$TOOLCHAIN_PATH:$PATH
31449  fi
31450
31451
31452  #
31453  # Setup the compilers (CC and CXX)
31454  #
31455
31456  COMPILER_NAME=C
31457  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31458
31459  if test "x$CC" != x; then
31460    # User has supplied compiler name already, always let that override.
31461    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31462$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31463    if test "x`basename $CC`" = "x$CC"; then
31464      # A command without a complete path is provided, search $PATH.
31465
31466      for ac_prog in $CC
31467do
31468  # Extract the first word of "$ac_prog", so it can be a program name with args.
31469set dummy $ac_prog; ac_word=$2
31470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31471$as_echo_n "checking for $ac_word... " >&6; }
31472if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31473  $as_echo_n "(cached) " >&6
31474else
31475  case $POTENTIAL_CC in
31476  [\\/]* | ?:[\\/]*)
31477  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31478  ;;
31479  *)
31480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31481for as_dir in $PATH
31482do
31483  IFS=$as_save_IFS
31484  test -z "$as_dir" && as_dir=.
31485    for ac_exec_ext in '' $ac_executable_extensions; do
31486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31487    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31489    break 2
31490  fi
31491done
31492  done
31493IFS=$as_save_IFS
31494
31495  ;;
31496esac
31497fi
31498POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31499if test -n "$POTENTIAL_CC"; then
31500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31501$as_echo "$POTENTIAL_CC" >&6; }
31502else
31503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31504$as_echo "no" >&6; }
31505fi
31506
31507
31508  test -n "$POTENTIAL_CC" && break
31509done
31510
31511      if test "x$POTENTIAL_CC" != x; then
31512        CC=$POTENTIAL_CC
31513      else
31514        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31515      fi
31516    else
31517      # Otherwise it might already be a complete path
31518      if test ! -x "$CC"; then
31519        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31520      fi
31521    fi
31522  else
31523    # No user supplied value. Locate compiler ourselves.
31524
31525    # If we are cross compiling, assume cross compilation tools follows the
31526    # cross compilation standard where they are prefixed with the autoconf
31527    # standard name for the target. For example the binary
31528    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31529    # If we are not cross compiling, then the default compiler name will be
31530    # used.
31531
31532    CC=
31533    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31534    # before checking the rest of the PATH.
31535    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31536    # step, this should not be necessary.
31537    if test -n "$TOOLCHAIN_PATH"; then
31538      PATH_save="$PATH"
31539      PATH="$TOOLCHAIN_PATH"
31540      for ac_prog in $SEARCH_LIST
31541do
31542  # Extract the first word of "$ac_prog", so it can be a program name with args.
31543set dummy $ac_prog; ac_word=$2
31544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31545$as_echo_n "checking for $ac_word... " >&6; }
31546if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31547  $as_echo_n "(cached) " >&6
31548else
31549  case $TOOLCHAIN_PATH_CC in
31550  [\\/]* | ?:[\\/]*)
31551  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31552  ;;
31553  *)
31554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31555for as_dir in $PATH
31556do
31557  IFS=$as_save_IFS
31558  test -z "$as_dir" && as_dir=.
31559    for ac_exec_ext in '' $ac_executable_extensions; do
31560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31561    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31563    break 2
31564  fi
31565done
31566  done
31567IFS=$as_save_IFS
31568
31569  ;;
31570esac
31571fi
31572TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31573if test -n "$TOOLCHAIN_PATH_CC"; then
31574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31575$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31576else
31577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31578$as_echo "no" >&6; }
31579fi
31580
31581
31582  test -n "$TOOLCHAIN_PATH_CC" && break
31583done
31584
31585      CC=$TOOLCHAIN_PATH_CC
31586      PATH="$PATH_save"
31587    fi
31588
31589    # AC_PATH_PROGS can't be run multiple times with the same variable,
31590    # so create a new name for this run.
31591    if test "x$CC" = x; then
31592      for ac_prog in $SEARCH_LIST
31593do
31594  # Extract the first word of "$ac_prog", so it can be a program name with args.
31595set dummy $ac_prog; ac_word=$2
31596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31597$as_echo_n "checking for $ac_word... " >&6; }
31598if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31599  $as_echo_n "(cached) " >&6
31600else
31601  case $POTENTIAL_CC in
31602  [\\/]* | ?:[\\/]*)
31603  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31604  ;;
31605  *)
31606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31607for as_dir in $PATH
31608do
31609  IFS=$as_save_IFS
31610  test -z "$as_dir" && as_dir=.
31611    for ac_exec_ext in '' $ac_executable_extensions; do
31612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31613    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31615    break 2
31616  fi
31617done
31618  done
31619IFS=$as_save_IFS
31620
31621  ;;
31622esac
31623fi
31624POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31625if test -n "$POTENTIAL_CC"; then
31626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31627$as_echo "$POTENTIAL_CC" >&6; }
31628else
31629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31630$as_echo "no" >&6; }
31631fi
31632
31633
31634  test -n "$POTENTIAL_CC" && break
31635done
31636
31637      CC=$POTENTIAL_CC
31638    fi
31639
31640    if test "x$CC" = x; then
31641
31642  # Print a helpful message on how to acquire the necessary build dependency.
31643  # devkit is the help tag: freetype, cups, alsa etc
31644  MISSING_DEPENDENCY=devkit
31645
31646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31647    cygwin_help $MISSING_DEPENDENCY
31648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31649    msys_help $MISSING_DEPENDENCY
31650  else
31651    PKGHANDLER_COMMAND=
31652
31653    case $PKGHANDLER in
31654      apt-get)
31655        apt_help     $MISSING_DEPENDENCY ;;
31656      yum)
31657        yum_help     $MISSING_DEPENDENCY ;;
31658      port)
31659        port_help    $MISSING_DEPENDENCY ;;
31660      pkgutil)
31661        pkgutil_help $MISSING_DEPENDENCY ;;
31662      pkgadd)
31663        pkgadd_help  $MISSING_DEPENDENCY ;;
31664    esac
31665
31666    if test "x$PKGHANDLER_COMMAND" != x; then
31667      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31668    fi
31669  fi
31670
31671      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31672    fi
31673  fi
31674
31675  # Now we have a compiler binary in CC. Make sure it's okay.
31676
31677  # Only process if variable expands to non-empty
31678
31679  if test "x$CC" != x; then
31680    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31681
31682  # First separate the path from the arguments. This will split at the first
31683  # space.
31684  complete="$CC"
31685  path="${complete%% *}"
31686  tmp="$complete EOL"
31687  arguments="${tmp#* }"
31688
31689  # Input might be given as Windows format, start by converting to
31690  # unix format.
31691  new_path=`$CYGPATH -u "$path"`
31692
31693  # Now try to locate executable using which
31694  new_path=`$WHICH "$new_path" 2> /dev/null`
31695  # bat and cmd files are not always considered executable in cygwin causing which
31696  # to not find them
31697  if test "x$new_path" = x \
31698      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31699      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31700    new_path=`$CYGPATH -u "$path"`
31701  fi
31702  if test "x$new_path" = x; then
31703    # Oops. Which didn't find the executable.
31704    # The splitting of arguments from the executable at a space might have been incorrect,
31705    # since paths with space are more likely in Windows. Give it another try with the whole
31706    # argument.
31707    path="$complete"
31708    arguments="EOL"
31709    new_path=`$CYGPATH -u "$path"`
31710    new_path=`$WHICH "$new_path" 2> /dev/null`
31711    # bat and cmd files are not always considered executable in cygwin causing which
31712    # to not find them
31713    if test "x$new_path" = x \
31714        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31715        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31716      new_path=`$CYGPATH -u "$path"`
31717    fi
31718    if test "x$new_path" = x; then
31719      # It's still not found. Now this is an unrecoverable error.
31720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31721$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31722      has_space=`$ECHO "$complete" | $GREP " "`
31723      if test "x$has_space" != x; then
31724        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31725$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31726      fi
31727      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31728    fi
31729  fi
31730
31731  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31732  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31733  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31734  # "foo.exe" is OK but "foo" is an error.
31735  #
31736  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31737  # It is also a way to make sure we got the proper file name for the real test later on.
31738  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31739  if test "x$test_shortpath" = x; then
31740    # Short path failed, file does not exist as specified.
31741    # Try adding .exe or .cmd
31742    if test -f "${new_path}.exe"; then
31743      input_to_shortpath="${new_path}.exe"
31744    elif test -f "${new_path}.cmd"; then
31745      input_to_shortpath="${new_path}.cmd"
31746    else
31747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31748$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31749      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31750$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31751      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31752    fi
31753  else
31754    input_to_shortpath="$new_path"
31755  fi
31756
31757  # Call helper function which possibly converts this using DOS-style short mode.
31758  # If so, the updated path is stored in $new_path.
31759  new_path="$input_to_shortpath"
31760
31761  input_path="$input_to_shortpath"
31762  # Check if we need to convert this using DOS-style short mode. If the path
31763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31764  # take no chances and rewrite it.
31765  # Note: m4 eats our [], so we need to use [ and ] instead.
31766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31767  if test "x$has_forbidden_chars" != x; then
31768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31769    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31770    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31771    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31772      # Going to short mode and back again did indeed matter. Since short mode is
31773      # case insensitive, let's make it lowercase to improve readability.
31774      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31775      # Now convert it back to Unix-style (cygpath)
31776      input_path=`$CYGPATH -u "$shortmode_path"`
31777      new_path="$input_path"
31778    fi
31779  fi
31780
31781  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31782  if test "x$test_cygdrive_prefix" = x; then
31783    # As a simple fix, exclude /usr/bin since it's not a real path.
31784    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31785      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31786      # a path prefixed by /cygdrive for fixpath to work.
31787      new_path="$CYGWIN_ROOT_PATH$input_path"
31788    fi
31789  fi
31790
31791  # remove trailing .exe if any
31792  new_path="${new_path/%.exe/}"
31793
31794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31795
31796  # First separate the path from the arguments. This will split at the first
31797  # space.
31798  complete="$CC"
31799  path="${complete%% *}"
31800  tmp="$complete EOL"
31801  arguments="${tmp#* }"
31802
31803  # Input might be given as Windows format, start by converting to
31804  # unix format.
31805  new_path="$path"
31806
31807  windows_path="$new_path"
31808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31809    unix_path=`$CYGPATH -u "$windows_path"`
31810    new_path="$unix_path"
31811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31813    new_path="$unix_path"
31814  fi
31815
31816
31817  # Now try to locate executable using which
31818  new_path=`$WHICH "$new_path" 2> /dev/null`
31819
31820  if test "x$new_path" = x; then
31821    # Oops. Which didn't find the executable.
31822    # The splitting of arguments from the executable at a space might have been incorrect,
31823    # since paths with space are more likely in Windows. Give it another try with the whole
31824    # argument.
31825    path="$complete"
31826    arguments="EOL"
31827    new_path="$path"
31828
31829  windows_path="$new_path"
31830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31831    unix_path=`$CYGPATH -u "$windows_path"`
31832    new_path="$unix_path"
31833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31835    new_path="$unix_path"
31836  fi
31837
31838
31839    new_path=`$WHICH "$new_path" 2> /dev/null`
31840    # bat and cmd files are not always considered executable in MSYS causing which
31841    # to not find them
31842    if test "x$new_path" = x \
31843        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31844        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31845      new_path="$path"
31846
31847  windows_path="$new_path"
31848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31849    unix_path=`$CYGPATH -u "$windows_path"`
31850    new_path="$unix_path"
31851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31853    new_path="$unix_path"
31854  fi
31855
31856    fi
31857
31858    if test "x$new_path" = x; then
31859      # It's still not found. Now this is an unrecoverable error.
31860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31861$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31862      has_space=`$ECHO "$complete" | $GREP " "`
31863      if test "x$has_space" != x; then
31864        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31865$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31866      fi
31867      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31868    fi
31869  fi
31870
31871  # Now new_path has a complete unix path to the binary
31872  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31873    # Keep paths in /bin as-is, but remove trailing .exe if any
31874    new_path="${new_path/%.exe/}"
31875    # Do not save /bin paths to all_fixpath_prefixes!
31876  else
31877    # Not in mixed or Windows style, start by that.
31878    new_path=`cmd //c echo $new_path`
31879
31880  input_path="$new_path"
31881  # Check if we need to convert this using DOS-style short mode. If the path
31882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31883  # take no chances and rewrite it.
31884  # Note: m4 eats our [], so we need to use [ and ] instead.
31885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31886  if test "x$has_forbidden_chars" != x; then
31887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31889  fi
31890
31891    # Output is in $new_path
31892
31893  windows_path="$new_path"
31894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31895    unix_path=`$CYGPATH -u "$windows_path"`
31896    new_path="$unix_path"
31897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31899    new_path="$unix_path"
31900  fi
31901
31902    # remove trailing .exe if any
31903    new_path="${new_path/%.exe/}"
31904
31905    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31906    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31907  fi
31908
31909    else
31910      # We're on a unix platform. Hooray! :)
31911      # First separate the path from the arguments. This will split at the first
31912      # space.
31913      complete="$CC"
31914      path="${complete%% *}"
31915      tmp="$complete EOL"
31916      arguments="${tmp#* }"
31917
31918      # Cannot rely on the command "which" here since it doesn't always work.
31919      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31920      if test -z "$is_absolute_path"; then
31921        # Path to executable is not absolute. Find it.
31922        IFS_save="$IFS"
31923        IFS=:
31924        for p in $PATH; do
31925          if test -f "$p/$path" && test -x "$p/$path"; then
31926            new_path="$p/$path"
31927            break
31928          fi
31929        done
31930        IFS="$IFS_save"
31931      else
31932        # This is an absolute path, we can use it without further modifications.
31933        new_path="$path"
31934      fi
31935
31936      if test "x$new_path" = x; then
31937        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31938$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31939        has_space=`$ECHO "$complete" | $GREP " "`
31940        if test "x$has_space" != x; then
31941          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31942$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31943        fi
31944        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31945      fi
31946    fi
31947
31948    # Now join together the path and the arguments once again
31949    if test "x$arguments" != xEOL; then
31950      new_complete="$new_path ${arguments% *}"
31951    else
31952      new_complete="$new_path"
31953    fi
31954
31955    if test "x$complete" != "x$new_complete"; then
31956      CC="$new_complete"
31957      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31958$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31959    fi
31960  fi
31961
31962  TEST_COMPILER="$CC"
31963  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31964  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31965  if test "x$OPENJDK_BUILD_OS" != xaix; then
31966    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31968$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31969
31970  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31971    # Follow a chain of symbolic links. Use readlink
31972    # where it exists, else fall back to horribly
31973    # complicated shell code.
31974    if test "x$READLINK_TESTED" != yes; then
31975      # On MacOSX there is a readlink tool with a different
31976      # purpose than the GNU readlink tool. Check the found readlink.
31977      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31978      if test "x$ISGNU" = x; then
31979        # A readlink that we do not know how to use.
31980        # Are there other non-GNU readlinks out there?
31981        READLINK_TESTED=yes
31982        READLINK=
31983      fi
31984    fi
31985
31986    if test "x$READLINK" != x; then
31987      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31988    else
31989      # Save the current directory for restoring afterwards
31990      STARTDIR=$PWD
31991      COUNTER=0
31992      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31993      sym_link_file=`$BASENAME $TEST_COMPILER`
31994      cd $sym_link_dir
31995      # Use -P flag to resolve symlinks in directories.
31996      cd `$THEPWDCMD -P`
31997      sym_link_dir=`$THEPWDCMD -P`
31998      # Resolve file symlinks
31999      while test $COUNTER -lt 20; do
32000        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32001        if test "x$ISLINK" == x; then
32002          # This is not a symbolic link! We are done!
32003          break
32004        fi
32005        # Again resolve directory symlinks since the target of the just found
32006        # link could be in a different directory
32007        cd `$DIRNAME $ISLINK`
32008        sym_link_dir=`$THEPWDCMD -P`
32009        sym_link_file=`$BASENAME $ISLINK`
32010        let COUNTER=COUNTER+1
32011      done
32012      cd $STARTDIR
32013      TEST_COMPILER=$sym_link_dir/$sym_link_file
32014    fi
32015  fi
32016
32017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
32018$as_echo "$TEST_COMPILER" >&6; }
32019  fi
32020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
32021$as_echo_n "checking if CC is disguised ccache... " >&6; }
32022
32023  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
32024  if test "x$COMPILER_BASENAME" = "xccache"; then
32025    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
32026$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
32027    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
32028    # We want to control ccache invocation ourselves, so ignore this cc and try
32029    # searching again.
32030
32031    # Remove the path to the fake ccache cc from the PATH
32032    RETRY_COMPILER_SAVED_PATH="$PATH"
32033    COMPILER_DIRNAME=`$DIRNAME $CC`
32034    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
32035
32036    # Try again looking for our compiler
32037    if test -n "$ac_tool_prefix"; then
32038  for ac_prog in $TOOLCHAIN_CC_BINARY
32039  do
32040    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32041set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32043$as_echo_n "checking for $ac_word... " >&6; }
32044if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
32045  $as_echo_n "(cached) " >&6
32046else
32047  if test -n "$PROPER_COMPILER_CC"; then
32048  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
32049else
32050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32051for as_dir in $PATH
32052do
32053  IFS=$as_save_IFS
32054  test -z "$as_dir" && as_dir=.
32055    for ac_exec_ext in '' $ac_executable_extensions; do
32056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32057    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
32058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32059    break 2
32060  fi
32061done
32062  done
32063IFS=$as_save_IFS
32064
32065fi
32066fi
32067PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
32068if test -n "$PROPER_COMPILER_CC"; then
32069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32070$as_echo "$PROPER_COMPILER_CC" >&6; }
32071else
32072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32073$as_echo "no" >&6; }
32074fi
32075
32076
32077    test -n "$PROPER_COMPILER_CC" && break
32078  done
32079fi
32080if test -z "$PROPER_COMPILER_CC"; then
32081  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
32082  for ac_prog in $TOOLCHAIN_CC_BINARY
32083do
32084  # Extract the first word of "$ac_prog", so it can be a program name with args.
32085set dummy $ac_prog; ac_word=$2
32086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32087$as_echo_n "checking for $ac_word... " >&6; }
32088if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
32089  $as_echo_n "(cached) " >&6
32090else
32091  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32092  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
32093else
32094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32095for as_dir in $PATH
32096do
32097  IFS=$as_save_IFS
32098  test -z "$as_dir" && as_dir=.
32099    for ac_exec_ext in '' $ac_executable_extensions; do
32100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32101    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
32102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32103    break 2
32104  fi
32105done
32106  done
32107IFS=$as_save_IFS
32108
32109fi
32110fi
32111ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
32112if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
32114$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
32115else
32116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32117$as_echo "no" >&6; }
32118fi
32119
32120
32121  test -n "$ac_ct_PROPER_COMPILER_CC" && break
32122done
32123
32124  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
32125    PROPER_COMPILER_CC=""
32126  else
32127    case $cross_compiling:$ac_tool_warned in
32128yes:)
32129{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32130$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32131ac_tool_warned=yes ;;
32132esac
32133    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
32134  fi
32135fi
32136
32137
32138  # Only process if variable expands to non-empty
32139
32140  if test "x$PROPER_COMPILER_CC" != x; then
32141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32142
32143  # First separate the path from the arguments. This will split at the first
32144  # space.
32145  complete="$PROPER_COMPILER_CC"
32146  path="${complete%% *}"
32147  tmp="$complete EOL"
32148  arguments="${tmp#* }"
32149
32150  # Input might be given as Windows format, start by converting to
32151  # unix format.
32152  new_path=`$CYGPATH -u "$path"`
32153
32154  # Now try to locate executable using which
32155  new_path=`$WHICH "$new_path" 2> /dev/null`
32156  # bat and cmd files are not always considered executable in cygwin causing which
32157  # to not find them
32158  if test "x$new_path" = x \
32159      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32160      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32161    new_path=`$CYGPATH -u "$path"`
32162  fi
32163  if test "x$new_path" = x; then
32164    # Oops. Which didn't find the executable.
32165    # The splitting of arguments from the executable at a space might have been incorrect,
32166    # since paths with space are more likely in Windows. Give it another try with the whole
32167    # argument.
32168    path="$complete"
32169    arguments="EOL"
32170    new_path=`$CYGPATH -u "$path"`
32171    new_path=`$WHICH "$new_path" 2> /dev/null`
32172    # bat and cmd files are not always considered executable in cygwin causing which
32173    # to not find them
32174    if test "x$new_path" = x \
32175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32177      new_path=`$CYGPATH -u "$path"`
32178    fi
32179    if test "x$new_path" = x; then
32180      # It's still not found. Now this is an unrecoverable error.
32181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32182$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32183      has_space=`$ECHO "$complete" | $GREP " "`
32184      if test "x$has_space" != x; then
32185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32187      fi
32188      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32189    fi
32190  fi
32191
32192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32195  # "foo.exe" is OK but "foo" is an error.
32196  #
32197  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32198  # It is also a way to make sure we got the proper file name for the real test later on.
32199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32200  if test "x$test_shortpath" = x; then
32201    # Short path failed, file does not exist as specified.
32202    # Try adding .exe or .cmd
32203    if test -f "${new_path}.exe"; then
32204      input_to_shortpath="${new_path}.exe"
32205    elif test -f "${new_path}.cmd"; then
32206      input_to_shortpath="${new_path}.cmd"
32207    else
32208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
32209$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
32210      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32211$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32212      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32213    fi
32214  else
32215    input_to_shortpath="$new_path"
32216  fi
32217
32218  # Call helper function which possibly converts this using DOS-style short mode.
32219  # If so, the updated path is stored in $new_path.
32220  new_path="$input_to_shortpath"
32221
32222  input_path="$input_to_shortpath"
32223  # Check if we need to convert this using DOS-style short mode. If the path
32224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32225  # take no chances and rewrite it.
32226  # Note: m4 eats our [], so we need to use [ and ] instead.
32227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32228  if test "x$has_forbidden_chars" != x; then
32229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32233      # Going to short mode and back again did indeed matter. Since short mode is
32234      # case insensitive, let's make it lowercase to improve readability.
32235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32236      # Now convert it back to Unix-style (cygpath)
32237      input_path=`$CYGPATH -u "$shortmode_path"`
32238      new_path="$input_path"
32239    fi
32240  fi
32241
32242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32243  if test "x$test_cygdrive_prefix" = x; then
32244    # As a simple fix, exclude /usr/bin since it's not a real path.
32245    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32247      # a path prefixed by /cygdrive for fixpath to work.
32248      new_path="$CYGWIN_ROOT_PATH$input_path"
32249    fi
32250  fi
32251
32252  # remove trailing .exe if any
32253  new_path="${new_path/%.exe/}"
32254
32255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32256
32257  # First separate the path from the arguments. This will split at the first
32258  # space.
32259  complete="$PROPER_COMPILER_CC"
32260  path="${complete%% *}"
32261  tmp="$complete EOL"
32262  arguments="${tmp#* }"
32263
32264  # Input might be given as Windows format, start by converting to
32265  # unix format.
32266  new_path="$path"
32267
32268  windows_path="$new_path"
32269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32270    unix_path=`$CYGPATH -u "$windows_path"`
32271    new_path="$unix_path"
32272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32274    new_path="$unix_path"
32275  fi
32276
32277
32278  # Now try to locate executable using which
32279  new_path=`$WHICH "$new_path" 2> /dev/null`
32280
32281  if test "x$new_path" = x; then
32282    # Oops. Which didn't find the executable.
32283    # The splitting of arguments from the executable at a space might have been incorrect,
32284    # since paths with space are more likely in Windows. Give it another try with the whole
32285    # argument.
32286    path="$complete"
32287    arguments="EOL"
32288    new_path="$path"
32289
32290  windows_path="$new_path"
32291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32292    unix_path=`$CYGPATH -u "$windows_path"`
32293    new_path="$unix_path"
32294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32296    new_path="$unix_path"
32297  fi
32298
32299
32300    new_path=`$WHICH "$new_path" 2> /dev/null`
32301    # bat and cmd files are not always considered executable in MSYS causing which
32302    # to not find them
32303    if test "x$new_path" = x \
32304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32306      new_path="$path"
32307
32308  windows_path="$new_path"
32309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32310    unix_path=`$CYGPATH -u "$windows_path"`
32311    new_path="$unix_path"
32312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32314    new_path="$unix_path"
32315  fi
32316
32317    fi
32318
32319    if test "x$new_path" = x; then
32320      # It's still not found. Now this is an unrecoverable error.
32321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32322$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32323      has_space=`$ECHO "$complete" | $GREP " "`
32324      if test "x$has_space" != x; then
32325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32327      fi
32328      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32329    fi
32330  fi
32331
32332  # Now new_path has a complete unix path to the binary
32333  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32334    # Keep paths in /bin as-is, but remove trailing .exe if any
32335    new_path="${new_path/%.exe/}"
32336    # Do not save /bin paths to all_fixpath_prefixes!
32337  else
32338    # Not in mixed or Windows style, start by that.
32339    new_path=`cmd //c echo $new_path`
32340
32341  input_path="$new_path"
32342  # Check if we need to convert this using DOS-style short mode. If the path
32343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32344  # take no chances and rewrite it.
32345  # Note: m4 eats our [], so we need to use [ and ] instead.
32346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32347  if test "x$has_forbidden_chars" != x; then
32348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32350  fi
32351
32352    # Output is in $new_path
32353
32354  windows_path="$new_path"
32355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32356    unix_path=`$CYGPATH -u "$windows_path"`
32357    new_path="$unix_path"
32358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32360    new_path="$unix_path"
32361  fi
32362
32363    # remove trailing .exe if any
32364    new_path="${new_path/%.exe/}"
32365
32366    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32367    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32368  fi
32369
32370    else
32371      # We're on a unix platform. Hooray! :)
32372      # First separate the path from the arguments. This will split at the first
32373      # space.
32374      complete="$PROPER_COMPILER_CC"
32375      path="${complete%% *}"
32376      tmp="$complete EOL"
32377      arguments="${tmp#* }"
32378
32379      # Cannot rely on the command "which" here since it doesn't always work.
32380      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32381      if test -z "$is_absolute_path"; then
32382        # Path to executable is not absolute. Find it.
32383        IFS_save="$IFS"
32384        IFS=:
32385        for p in $PATH; do
32386          if test -f "$p/$path" && test -x "$p/$path"; then
32387            new_path="$p/$path"
32388            break
32389          fi
32390        done
32391        IFS="$IFS_save"
32392      else
32393        # This is an absolute path, we can use it without further modifications.
32394        new_path="$path"
32395      fi
32396
32397      if test "x$new_path" = x; then
32398        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32399$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32400        has_space=`$ECHO "$complete" | $GREP " "`
32401        if test "x$has_space" != x; then
32402          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32403$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32404        fi
32405        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32406      fi
32407    fi
32408
32409    # Now join together the path and the arguments once again
32410    if test "x$arguments" != xEOL; then
32411      new_complete="$new_path ${arguments% *}"
32412    else
32413      new_complete="$new_path"
32414    fi
32415
32416    if test "x$complete" != "x$new_complete"; then
32417      PROPER_COMPILER_CC="$new_complete"
32418      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32419$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32420    fi
32421  fi
32422
32423    PATH="$RETRY_COMPILER_SAVED_PATH"
32424
32425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32426$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32427
32428  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32429    # Follow a chain of symbolic links. Use readlink
32430    # where it exists, else fall back to horribly
32431    # complicated shell code.
32432    if test "x$READLINK_TESTED" != yes; then
32433      # On MacOSX there is a readlink tool with a different
32434      # purpose than the GNU readlink tool. Check the found readlink.
32435      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32436      if test "x$ISGNU" = x; then
32437        # A readlink that we do not know how to use.
32438        # Are there other non-GNU readlinks out there?
32439        READLINK_TESTED=yes
32440        READLINK=
32441      fi
32442    fi
32443
32444    if test "x$READLINK" != x; then
32445      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32446    else
32447      # Save the current directory for restoring afterwards
32448      STARTDIR=$PWD
32449      COUNTER=0
32450      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32451      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32452      cd $sym_link_dir
32453      # Use -P flag to resolve symlinks in directories.
32454      cd `$THEPWDCMD -P`
32455      sym_link_dir=`$THEPWDCMD -P`
32456      # Resolve file symlinks
32457      while test $COUNTER -lt 20; do
32458        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32459        if test "x$ISLINK" == x; then
32460          # This is not a symbolic link! We are done!
32461          break
32462        fi
32463        # Again resolve directory symlinks since the target of the just found
32464        # link could be in a different directory
32465        cd `$DIRNAME $ISLINK`
32466        sym_link_dir=`$THEPWDCMD -P`
32467        sym_link_file=`$BASENAME $ISLINK`
32468        let COUNTER=COUNTER+1
32469      done
32470      cd $STARTDIR
32471      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32472    fi
32473  fi
32474
32475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32476$as_echo "$PROPER_COMPILER_CC" >&6; }
32477    CC="$PROPER_COMPILER_CC"
32478  else
32479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32480$as_echo "no, keeping CC" >&6; }
32481  fi
32482
32483
32484  COMPILER=$CC
32485  COMPILER_NAME=$COMPILER_NAME
32486
32487  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32488    # cc -V output typically looks like
32489    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32490    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32491    # Check that this is likely to be the Solaris Studio cc.
32492    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32493    if test $? -ne 0; then
32494      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32495      { $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
32496$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32497      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32498$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32499      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32500$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32501      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32502    fi
32503    # Remove usage instructions (if present), and
32504    # collapse compiler output into a single line
32505    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32506        $SED -e 's/ *[Uu]sage:.*//'`
32507    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32508        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32509  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32510    # xlc -qversion output typically looks like
32511    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32512    #     Version: 11.01.0000.0015
32513    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32514    # Check that this is likely to be the IBM XL C compiler.
32515    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32516    if test $? -ne 0; then
32517      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32518      { $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
32519$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32520      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32521$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32522      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32523$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32524      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32525    fi
32526    # Collapse compiler output into a single line
32527    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32528    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32529        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32530  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32531    # There is no specific version flag, but all output starts with a version string.
32532    # First line typically looks something like:
32533    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32534    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32535    # Check that this is likely to be Microsoft CL.EXE.
32536    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32537    if test $? -ne 0; then
32538      { $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
32539$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32540      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32541$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32542      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32543    fi
32544    # Collapse compiler output into a single line
32545    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32546    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32547        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32548  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32549    # gcc --version output typically looks like
32550    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32551    #     Copyright (C) 2013 Free Software Foundation, Inc.
32552    #     This is free software; see the source for copying conditions.  There is NO
32553    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32554    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32555    # Check that this is likely to be GCC.
32556    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32557    if test $? -ne 0; then
32558      { $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
32559$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32560      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32561$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32562      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32563    fi
32564    # Remove Copyright and legalese from version string, and
32565    # collapse into a single line
32566    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32567        $SED -e 's/ *Copyright .*//'`
32568    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32569        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32570  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32571    # clang --version output typically looks like
32572    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32573    #    clang version 3.3 (tags/RELEASE_33/final)
32574    # or
32575    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32576    #    Target: x86_64-pc-linux-gnu
32577    #    Thread model: posix
32578    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32579    # Check that this is likely to be clang
32580    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32581    if test $? -ne 0; then
32582      { $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
32583$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32584      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32585$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32586      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32587    fi
32588    # Collapse compiler output into a single line
32589    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32590    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32591        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32592  else
32593      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32594  fi
32595  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32596  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32597  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32598  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32599
32600  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32601$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32602
32603
32604  # Now that we have resolved CC ourself, let autoconf have its go at it
32605  ac_ext=c
32606ac_cpp='$CPP $CPPFLAGS'
32607ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32608ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32609ac_compiler_gnu=$ac_cv_c_compiler_gnu
32610if test -n "$ac_tool_prefix"; then
32611  for ac_prog in $CC
32612  do
32613    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32614set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32616$as_echo_n "checking for $ac_word... " >&6; }
32617if ${ac_cv_prog_CC+:} false; then :
32618  $as_echo_n "(cached) " >&6
32619else
32620  if test -n "$CC"; then
32621  ac_cv_prog_CC="$CC" # Let the user override the test.
32622else
32623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32624for as_dir in $PATH
32625do
32626  IFS=$as_save_IFS
32627  test -z "$as_dir" && as_dir=.
32628    for ac_exec_ext in '' $ac_executable_extensions; do
32629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32630    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32632    break 2
32633  fi
32634done
32635  done
32636IFS=$as_save_IFS
32637
32638fi
32639fi
32640CC=$ac_cv_prog_CC
32641if test -n "$CC"; then
32642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32643$as_echo "$CC" >&6; }
32644else
32645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32646$as_echo "no" >&6; }
32647fi
32648
32649
32650    test -n "$CC" && break
32651  done
32652fi
32653if test -z "$CC"; then
32654  ac_ct_CC=$CC
32655  for ac_prog in $CC
32656do
32657  # Extract the first word of "$ac_prog", so it can be a program name with args.
32658set dummy $ac_prog; ac_word=$2
32659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32660$as_echo_n "checking for $ac_word... " >&6; }
32661if ${ac_cv_prog_ac_ct_CC+:} false; then :
32662  $as_echo_n "(cached) " >&6
32663else
32664  if test -n "$ac_ct_CC"; then
32665  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32666else
32667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32668for as_dir in $PATH
32669do
32670  IFS=$as_save_IFS
32671  test -z "$as_dir" && as_dir=.
32672    for ac_exec_ext in '' $ac_executable_extensions; do
32673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32674    ac_cv_prog_ac_ct_CC="$ac_prog"
32675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32676    break 2
32677  fi
32678done
32679  done
32680IFS=$as_save_IFS
32681
32682fi
32683fi
32684ac_ct_CC=$ac_cv_prog_ac_ct_CC
32685if test -n "$ac_ct_CC"; then
32686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32687$as_echo "$ac_ct_CC" >&6; }
32688else
32689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32690$as_echo "no" >&6; }
32691fi
32692
32693
32694  test -n "$ac_ct_CC" && break
32695done
32696
32697  if test "x$ac_ct_CC" = x; then
32698    CC=""
32699  else
32700    case $cross_compiling:$ac_tool_warned in
32701yes:)
32702{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32703$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32704ac_tool_warned=yes ;;
32705esac
32706    CC=$ac_ct_CC
32707  fi
32708fi
32709
32710
32711test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32713as_fn_error $? "no acceptable C compiler found in \$PATH
32714See \`config.log' for more details" "$LINENO" 5; }
32715
32716# Provide some information about the compiler.
32717$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32718set X $ac_compile
32719ac_compiler=$2
32720for ac_option in --version -v -V -qversion; do
32721  { { ac_try="$ac_compiler $ac_option >&5"
32722case "(($ac_try" in
32723  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32724  *) ac_try_echo=$ac_try;;
32725esac
32726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32727$as_echo "$ac_try_echo"; } >&5
32728  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32729  ac_status=$?
32730  if test -s conftest.err; then
32731    sed '10a\
32732... rest of stderr output deleted ...
32733         10q' conftest.err >conftest.er1
32734    cat conftest.er1 >&5
32735  fi
32736  rm -f conftest.er1 conftest.err
32737  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32738  test $ac_status = 0; }
32739done
32740
32741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32742/* end confdefs.h.  */
32743
32744int
32745main ()
32746{
32747
32748  ;
32749  return 0;
32750}
32751_ACEOF
32752ac_clean_files_save=$ac_clean_files
32753ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32754# Try to create an executable without -o first, disregard a.out.
32755# It will help us diagnose broken compilers, and finding out an intuition
32756# of exeext.
32757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32758$as_echo_n "checking whether the C compiler works... " >&6; }
32759ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32760
32761# The possible output files:
32762ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32763
32764ac_rmfiles=
32765for ac_file in $ac_files
32766do
32767  case $ac_file in
32768    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32769    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32770  esac
32771done
32772rm -f $ac_rmfiles
32773
32774if { { ac_try="$ac_link_default"
32775case "(($ac_try" in
32776  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32777  *) ac_try_echo=$ac_try;;
32778esac
32779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32780$as_echo "$ac_try_echo"; } >&5
32781  (eval "$ac_link_default") 2>&5
32782  ac_status=$?
32783  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32784  test $ac_status = 0; }; then :
32785  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32786# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32787# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32788# so that the user can short-circuit this test for compilers unknown to
32789# Autoconf.
32790for ac_file in $ac_files ''
32791do
32792  test -f "$ac_file" || continue
32793  case $ac_file in
32794    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32795	;;
32796    [ab].out )
32797	# We found the default executable, but exeext='' is most
32798	# certainly right.
32799	break;;
32800    *.* )
32801	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32802	then :; else
32803	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32804	fi
32805	# We set ac_cv_exeext here because the later test for it is not
32806	# safe: cross compilers may not add the suffix if given an `-o'
32807	# argument, so we may need to know it at that point already.
32808	# Even if this section looks crufty: it has the advantage of
32809	# actually working.
32810	break;;
32811    * )
32812	break;;
32813  esac
32814done
32815test "$ac_cv_exeext" = no && ac_cv_exeext=
32816
32817else
32818  ac_file=''
32819fi
32820if test -z "$ac_file"; then :
32821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32822$as_echo "no" >&6; }
32823$as_echo "$as_me: failed program was:" >&5
32824sed 's/^/| /' conftest.$ac_ext >&5
32825
32826{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32828as_fn_error 77 "C compiler cannot create executables
32829See \`config.log' for more details" "$LINENO" 5; }
32830else
32831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32832$as_echo "yes" >&6; }
32833fi
32834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32835$as_echo_n "checking for C compiler default output file name... " >&6; }
32836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32837$as_echo "$ac_file" >&6; }
32838ac_exeext=$ac_cv_exeext
32839
32840rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32841ac_clean_files=$ac_clean_files_save
32842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32843$as_echo_n "checking for suffix of executables... " >&6; }
32844if { { ac_try="$ac_link"
32845case "(($ac_try" in
32846  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32847  *) ac_try_echo=$ac_try;;
32848esac
32849eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32850$as_echo "$ac_try_echo"; } >&5
32851  (eval "$ac_link") 2>&5
32852  ac_status=$?
32853  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32854  test $ac_status = 0; }; then :
32855  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32856# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32857# work properly (i.e., refer to `conftest.exe'), while it won't with
32858# `rm'.
32859for ac_file in conftest.exe conftest conftest.*; do
32860  test -f "$ac_file" || continue
32861  case $ac_file in
32862    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32863    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32864	  break;;
32865    * ) break;;
32866  esac
32867done
32868else
32869  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32871as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32872See \`config.log' for more details" "$LINENO" 5; }
32873fi
32874rm -f conftest conftest$ac_cv_exeext
32875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32876$as_echo "$ac_cv_exeext" >&6; }
32877
32878rm -f conftest.$ac_ext
32879EXEEXT=$ac_cv_exeext
32880ac_exeext=$EXEEXT
32881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32882/* end confdefs.h.  */
32883#include <stdio.h>
32884int
32885main ()
32886{
32887FILE *f = fopen ("conftest.out", "w");
32888 return ferror (f) || fclose (f) != 0;
32889
32890  ;
32891  return 0;
32892}
32893_ACEOF
32894ac_clean_files="$ac_clean_files conftest.out"
32895# Check that the compiler produces executables we can run.  If not, either
32896# the compiler is broken, or we cross compile.
32897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32898$as_echo_n "checking whether we are cross compiling... " >&6; }
32899if test "$cross_compiling" != yes; then
32900  { { ac_try="$ac_link"
32901case "(($ac_try" in
32902  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32903  *) ac_try_echo=$ac_try;;
32904esac
32905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32906$as_echo "$ac_try_echo"; } >&5
32907  (eval "$ac_link") 2>&5
32908  ac_status=$?
32909  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32910  test $ac_status = 0; }
32911  if { ac_try='./conftest$ac_cv_exeext'
32912  { { case "(($ac_try" in
32913  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32914  *) ac_try_echo=$ac_try;;
32915esac
32916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32917$as_echo "$ac_try_echo"; } >&5
32918  (eval "$ac_try") 2>&5
32919  ac_status=$?
32920  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32921  test $ac_status = 0; }; }; then
32922    cross_compiling=no
32923  else
32924    if test "$cross_compiling" = maybe; then
32925	cross_compiling=yes
32926    else
32927	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32929as_fn_error $? "cannot run C compiled programs.
32930If you meant to cross compile, use \`--host'.
32931See \`config.log' for more details" "$LINENO" 5; }
32932    fi
32933  fi
32934fi
32935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32936$as_echo "$cross_compiling" >&6; }
32937
32938rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32939ac_clean_files=$ac_clean_files_save
32940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32941$as_echo_n "checking for suffix of object files... " >&6; }
32942if ${ac_cv_objext+:} false; then :
32943  $as_echo_n "(cached) " >&6
32944else
32945  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32946/* end confdefs.h.  */
32947
32948int
32949main ()
32950{
32951
32952  ;
32953  return 0;
32954}
32955_ACEOF
32956rm -f conftest.o conftest.obj
32957if { { ac_try="$ac_compile"
32958case "(($ac_try" in
32959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32960  *) ac_try_echo=$ac_try;;
32961esac
32962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32963$as_echo "$ac_try_echo"; } >&5
32964  (eval "$ac_compile") 2>&5
32965  ac_status=$?
32966  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32967  test $ac_status = 0; }; then :
32968  for ac_file in conftest.o conftest.obj conftest.*; do
32969  test -f "$ac_file" || continue;
32970  case $ac_file in
32971    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32972    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32973       break;;
32974  esac
32975done
32976else
32977  $as_echo "$as_me: failed program was:" >&5
32978sed 's/^/| /' conftest.$ac_ext >&5
32979
32980{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32982as_fn_error $? "cannot compute suffix of object files: cannot compile
32983See \`config.log' for more details" "$LINENO" 5; }
32984fi
32985rm -f conftest.$ac_cv_objext conftest.$ac_ext
32986fi
32987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32988$as_echo "$ac_cv_objext" >&6; }
32989OBJEXT=$ac_cv_objext
32990ac_objext=$OBJEXT
32991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32992$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32993if ${ac_cv_c_compiler_gnu+:} false; then :
32994  $as_echo_n "(cached) " >&6
32995else
32996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32997/* end confdefs.h.  */
32998
32999int
33000main ()
33001{
33002#ifndef __GNUC__
33003       choke me
33004#endif
33005
33006  ;
33007  return 0;
33008}
33009_ACEOF
33010if ac_fn_c_try_compile "$LINENO"; then :
33011  ac_compiler_gnu=yes
33012else
33013  ac_compiler_gnu=no
33014fi
33015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33016ac_cv_c_compiler_gnu=$ac_compiler_gnu
33017
33018fi
33019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33020$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33021if test $ac_compiler_gnu = yes; then
33022  GCC=yes
33023else
33024  GCC=
33025fi
33026ac_test_CFLAGS=${CFLAGS+set}
33027ac_save_CFLAGS=$CFLAGS
33028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33029$as_echo_n "checking whether $CC accepts -g... " >&6; }
33030if ${ac_cv_prog_cc_g+:} false; then :
33031  $as_echo_n "(cached) " >&6
33032else
33033  ac_save_c_werror_flag=$ac_c_werror_flag
33034   ac_c_werror_flag=yes
33035   ac_cv_prog_cc_g=no
33036   CFLAGS="-g"
33037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33038/* end confdefs.h.  */
33039
33040int
33041main ()
33042{
33043
33044  ;
33045  return 0;
33046}
33047_ACEOF
33048if ac_fn_c_try_compile "$LINENO"; then :
33049  ac_cv_prog_cc_g=yes
33050else
33051  CFLAGS=""
33052      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33053/* end confdefs.h.  */
33054
33055int
33056main ()
33057{
33058
33059  ;
33060  return 0;
33061}
33062_ACEOF
33063if ac_fn_c_try_compile "$LINENO"; then :
33064
33065else
33066  ac_c_werror_flag=$ac_save_c_werror_flag
33067	 CFLAGS="-g"
33068	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33069/* end confdefs.h.  */
33070
33071int
33072main ()
33073{
33074
33075  ;
33076  return 0;
33077}
33078_ACEOF
33079if ac_fn_c_try_compile "$LINENO"; then :
33080  ac_cv_prog_cc_g=yes
33081fi
33082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33083fi
33084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33085fi
33086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33087   ac_c_werror_flag=$ac_save_c_werror_flag
33088fi
33089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33090$as_echo "$ac_cv_prog_cc_g" >&6; }
33091if test "$ac_test_CFLAGS" = set; then
33092  CFLAGS=$ac_save_CFLAGS
33093elif test $ac_cv_prog_cc_g = yes; then
33094  if test "$GCC" = yes; then
33095    CFLAGS="-g -O2"
33096  else
33097    CFLAGS="-g"
33098  fi
33099else
33100  if test "$GCC" = yes; then
33101    CFLAGS="-O2"
33102  else
33103    CFLAGS=
33104  fi
33105fi
33106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33107$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33108if ${ac_cv_prog_cc_c89+:} false; then :
33109  $as_echo_n "(cached) " >&6
33110else
33111  ac_cv_prog_cc_c89=no
33112ac_save_CC=$CC
33113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33114/* end confdefs.h.  */
33115#include <stdarg.h>
33116#include <stdio.h>
33117struct stat;
33118/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33119struct buf { int x; };
33120FILE * (*rcsopen) (struct buf *, struct stat *, int);
33121static char *e (p, i)
33122     char **p;
33123     int i;
33124{
33125  return p[i];
33126}
33127static char *f (char * (*g) (char **, int), char **p, ...)
33128{
33129  char *s;
33130  va_list v;
33131  va_start (v,p);
33132  s = g (p, va_arg (v,int));
33133  va_end (v);
33134  return s;
33135}
33136
33137/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33138   function prototypes and stuff, but not '\xHH' hex character constants.
33139   These don't provoke an error unfortunately, instead are silently treated
33140   as 'x'.  The following induces an error, until -std is added to get
33141   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33142   array size at least.  It's necessary to write '\x00'==0 to get something
33143   that's true only with -std.  */
33144int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33145
33146/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33147   inside strings and character constants.  */
33148#define FOO(x) 'x'
33149int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33150
33151int test (int i, double x);
33152struct s1 {int (*f) (int a);};
33153struct s2 {int (*f) (double a);};
33154int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33155int argc;
33156char **argv;
33157int
33158main ()
33159{
33160return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33161  ;
33162  return 0;
33163}
33164_ACEOF
33165for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33166	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33167do
33168  CC="$ac_save_CC $ac_arg"
33169  if ac_fn_c_try_compile "$LINENO"; then :
33170  ac_cv_prog_cc_c89=$ac_arg
33171fi
33172rm -f core conftest.err conftest.$ac_objext
33173  test "x$ac_cv_prog_cc_c89" != "xno" && break
33174done
33175rm -f conftest.$ac_ext
33176CC=$ac_save_CC
33177
33178fi
33179# AC_CACHE_VAL
33180case "x$ac_cv_prog_cc_c89" in
33181  x)
33182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33183$as_echo "none needed" >&6; } ;;
33184  xno)
33185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33186$as_echo "unsupported" >&6; } ;;
33187  *)
33188    CC="$CC $ac_cv_prog_cc_c89"
33189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33190$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33191esac
33192if test "x$ac_cv_prog_cc_c89" != xno; then :
33193
33194fi
33195
33196ac_ext=cpp
33197ac_cpp='$CXXCPP $CPPFLAGS'
33198ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33199ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33200ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33201
33202
33203
33204  COMPILER_NAME=C++
33205  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33206
33207  if test "x$CXX" != x; then
33208    # User has supplied compiler name already, always let that override.
33209    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33210$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33211    if test "x`basename $CXX`" = "x$CXX"; then
33212      # A command without a complete path is provided, search $PATH.
33213
33214      for ac_prog in $CXX
33215do
33216  # Extract the first word of "$ac_prog", so it can be a program name with args.
33217set dummy $ac_prog; ac_word=$2
33218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33219$as_echo_n "checking for $ac_word... " >&6; }
33220if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33221  $as_echo_n "(cached) " >&6
33222else
33223  case $POTENTIAL_CXX in
33224  [\\/]* | ?:[\\/]*)
33225  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33226  ;;
33227  *)
33228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33229for as_dir in $PATH
33230do
33231  IFS=$as_save_IFS
33232  test -z "$as_dir" && as_dir=.
33233    for ac_exec_ext in '' $ac_executable_extensions; do
33234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33235    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33237    break 2
33238  fi
33239done
33240  done
33241IFS=$as_save_IFS
33242
33243  ;;
33244esac
33245fi
33246POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33247if test -n "$POTENTIAL_CXX"; then
33248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33249$as_echo "$POTENTIAL_CXX" >&6; }
33250else
33251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33252$as_echo "no" >&6; }
33253fi
33254
33255
33256  test -n "$POTENTIAL_CXX" && break
33257done
33258
33259      if test "x$POTENTIAL_CXX" != x; then
33260        CXX=$POTENTIAL_CXX
33261      else
33262        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33263      fi
33264    else
33265      # Otherwise it might already be a complete path
33266      if test ! -x "$CXX"; then
33267        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33268      fi
33269    fi
33270  else
33271    # No user supplied value. Locate compiler ourselves.
33272
33273    # If we are cross compiling, assume cross compilation tools follows the
33274    # cross compilation standard where they are prefixed with the autoconf
33275    # standard name for the target. For example the binary
33276    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33277    # If we are not cross compiling, then the default compiler name will be
33278    # used.
33279
33280    CXX=
33281    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33282    # before checking the rest of the PATH.
33283    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33284    # step, this should not be necessary.
33285    if test -n "$TOOLCHAIN_PATH"; then
33286      PATH_save="$PATH"
33287      PATH="$TOOLCHAIN_PATH"
33288      for ac_prog in $SEARCH_LIST
33289do
33290  # Extract the first word of "$ac_prog", so it can be a program name with args.
33291set dummy $ac_prog; ac_word=$2
33292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33293$as_echo_n "checking for $ac_word... " >&6; }
33294if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33295  $as_echo_n "(cached) " >&6
33296else
33297  case $TOOLCHAIN_PATH_CXX in
33298  [\\/]* | ?:[\\/]*)
33299  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33300  ;;
33301  *)
33302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33303for as_dir in $PATH
33304do
33305  IFS=$as_save_IFS
33306  test -z "$as_dir" && as_dir=.
33307    for ac_exec_ext in '' $ac_executable_extensions; do
33308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33309    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33311    break 2
33312  fi
33313done
33314  done
33315IFS=$as_save_IFS
33316
33317  ;;
33318esac
33319fi
33320TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33321if test -n "$TOOLCHAIN_PATH_CXX"; then
33322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33323$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33324else
33325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33326$as_echo "no" >&6; }
33327fi
33328
33329
33330  test -n "$TOOLCHAIN_PATH_CXX" && break
33331done
33332
33333      CXX=$TOOLCHAIN_PATH_CXX
33334      PATH="$PATH_save"
33335    fi
33336
33337    # AC_PATH_PROGS can't be run multiple times with the same variable,
33338    # so create a new name for this run.
33339    if test "x$CXX" = x; then
33340      for ac_prog in $SEARCH_LIST
33341do
33342  # Extract the first word of "$ac_prog", so it can be a program name with args.
33343set dummy $ac_prog; ac_word=$2
33344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33345$as_echo_n "checking for $ac_word... " >&6; }
33346if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33347  $as_echo_n "(cached) " >&6
33348else
33349  case $POTENTIAL_CXX in
33350  [\\/]* | ?:[\\/]*)
33351  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33352  ;;
33353  *)
33354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33355for as_dir in $PATH
33356do
33357  IFS=$as_save_IFS
33358  test -z "$as_dir" && as_dir=.
33359    for ac_exec_ext in '' $ac_executable_extensions; do
33360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33361    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33363    break 2
33364  fi
33365done
33366  done
33367IFS=$as_save_IFS
33368
33369  ;;
33370esac
33371fi
33372POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33373if test -n "$POTENTIAL_CXX"; then
33374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33375$as_echo "$POTENTIAL_CXX" >&6; }
33376else
33377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33378$as_echo "no" >&6; }
33379fi
33380
33381
33382  test -n "$POTENTIAL_CXX" && break
33383done
33384
33385      CXX=$POTENTIAL_CXX
33386    fi
33387
33388    if test "x$CXX" = x; then
33389
33390  # Print a helpful message on how to acquire the necessary build dependency.
33391  # devkit is the help tag: freetype, cups, alsa etc
33392  MISSING_DEPENDENCY=devkit
33393
33394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33395    cygwin_help $MISSING_DEPENDENCY
33396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33397    msys_help $MISSING_DEPENDENCY
33398  else
33399    PKGHANDLER_COMMAND=
33400
33401    case $PKGHANDLER in
33402      apt-get)
33403        apt_help     $MISSING_DEPENDENCY ;;
33404      yum)
33405        yum_help     $MISSING_DEPENDENCY ;;
33406      port)
33407        port_help    $MISSING_DEPENDENCY ;;
33408      pkgutil)
33409        pkgutil_help $MISSING_DEPENDENCY ;;
33410      pkgadd)
33411        pkgadd_help  $MISSING_DEPENDENCY ;;
33412    esac
33413
33414    if test "x$PKGHANDLER_COMMAND" != x; then
33415      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33416    fi
33417  fi
33418
33419      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33420    fi
33421  fi
33422
33423  # Now we have a compiler binary in CXX. Make sure it's okay.
33424
33425  # Only process if variable expands to non-empty
33426
33427  if test "x$CXX" != x; then
33428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33429
33430  # First separate the path from the arguments. This will split at the first
33431  # space.
33432  complete="$CXX"
33433  path="${complete%% *}"
33434  tmp="$complete EOL"
33435  arguments="${tmp#* }"
33436
33437  # Input might be given as Windows format, start by converting to
33438  # unix format.
33439  new_path=`$CYGPATH -u "$path"`
33440
33441  # Now try to locate executable using which
33442  new_path=`$WHICH "$new_path" 2> /dev/null`
33443  # bat and cmd files are not always considered executable in cygwin causing which
33444  # to not find them
33445  if test "x$new_path" = x \
33446      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33447      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33448    new_path=`$CYGPATH -u "$path"`
33449  fi
33450  if test "x$new_path" = x; then
33451    # Oops. Which didn't find the executable.
33452    # The splitting of arguments from the executable at a space might have been incorrect,
33453    # since paths with space are more likely in Windows. Give it another try with the whole
33454    # argument.
33455    path="$complete"
33456    arguments="EOL"
33457    new_path=`$CYGPATH -u "$path"`
33458    new_path=`$WHICH "$new_path" 2> /dev/null`
33459    # bat and cmd files are not always considered executable in cygwin causing which
33460    # to not find them
33461    if test "x$new_path" = x \
33462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33464      new_path=`$CYGPATH -u "$path"`
33465    fi
33466    if test "x$new_path" = x; then
33467      # It's still not found. Now this is an unrecoverable error.
33468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33469$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33470      has_space=`$ECHO "$complete" | $GREP " "`
33471      if test "x$has_space" != x; then
33472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33474      fi
33475      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33476    fi
33477  fi
33478
33479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33482  # "foo.exe" is OK but "foo" is an error.
33483  #
33484  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33485  # It is also a way to make sure we got the proper file name for the real test later on.
33486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33487  if test "x$test_shortpath" = x; then
33488    # Short path failed, file does not exist as specified.
33489    # Try adding .exe or .cmd
33490    if test -f "${new_path}.exe"; then
33491      input_to_shortpath="${new_path}.exe"
33492    elif test -f "${new_path}.cmd"; then
33493      input_to_shortpath="${new_path}.cmd"
33494    else
33495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33496$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33499      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33500    fi
33501  else
33502    input_to_shortpath="$new_path"
33503  fi
33504
33505  # Call helper function which possibly converts this using DOS-style short mode.
33506  # If so, the updated path is stored in $new_path.
33507  new_path="$input_to_shortpath"
33508
33509  input_path="$input_to_shortpath"
33510  # Check if we need to convert this using DOS-style short mode. If the path
33511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33512  # take no chances and rewrite it.
33513  # Note: m4 eats our [], so we need to use [ and ] instead.
33514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33515  if test "x$has_forbidden_chars" != x; then
33516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33520      # Going to short mode and back again did indeed matter. Since short mode is
33521      # case insensitive, let's make it lowercase to improve readability.
33522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33523      # Now convert it back to Unix-style (cygpath)
33524      input_path=`$CYGPATH -u "$shortmode_path"`
33525      new_path="$input_path"
33526    fi
33527  fi
33528
33529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33530  if test "x$test_cygdrive_prefix" = x; then
33531    # As a simple fix, exclude /usr/bin since it's not a real path.
33532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33534      # a path prefixed by /cygdrive for fixpath to work.
33535      new_path="$CYGWIN_ROOT_PATH$input_path"
33536    fi
33537  fi
33538
33539  # remove trailing .exe if any
33540  new_path="${new_path/%.exe/}"
33541
33542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33543
33544  # First separate the path from the arguments. This will split at the first
33545  # space.
33546  complete="$CXX"
33547  path="${complete%% *}"
33548  tmp="$complete EOL"
33549  arguments="${tmp#* }"
33550
33551  # Input might be given as Windows format, start by converting to
33552  # unix format.
33553  new_path="$path"
33554
33555  windows_path="$new_path"
33556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33557    unix_path=`$CYGPATH -u "$windows_path"`
33558    new_path="$unix_path"
33559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33561    new_path="$unix_path"
33562  fi
33563
33564
33565  # Now try to locate executable using which
33566  new_path=`$WHICH "$new_path" 2> /dev/null`
33567
33568  if test "x$new_path" = x; then
33569    # Oops. Which didn't find the executable.
33570    # The splitting of arguments from the executable at a space might have been incorrect,
33571    # since paths with space are more likely in Windows. Give it another try with the whole
33572    # argument.
33573    path="$complete"
33574    arguments="EOL"
33575    new_path="$path"
33576
33577  windows_path="$new_path"
33578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33579    unix_path=`$CYGPATH -u "$windows_path"`
33580    new_path="$unix_path"
33581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33583    new_path="$unix_path"
33584  fi
33585
33586
33587    new_path=`$WHICH "$new_path" 2> /dev/null`
33588    # bat and cmd files are not always considered executable in MSYS causing which
33589    # to not find them
33590    if test "x$new_path" = x \
33591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33593      new_path="$path"
33594
33595  windows_path="$new_path"
33596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33597    unix_path=`$CYGPATH -u "$windows_path"`
33598    new_path="$unix_path"
33599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33601    new_path="$unix_path"
33602  fi
33603
33604    fi
33605
33606    if test "x$new_path" = x; then
33607      # It's still not found. Now this is an unrecoverable error.
33608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33609$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33610      has_space=`$ECHO "$complete" | $GREP " "`
33611      if test "x$has_space" != x; then
33612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33614      fi
33615      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33616    fi
33617  fi
33618
33619  # Now new_path has a complete unix path to the binary
33620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33621    # Keep paths in /bin as-is, but remove trailing .exe if any
33622    new_path="${new_path/%.exe/}"
33623    # Do not save /bin paths to all_fixpath_prefixes!
33624  else
33625    # Not in mixed or Windows style, start by that.
33626    new_path=`cmd //c echo $new_path`
33627
33628  input_path="$new_path"
33629  # Check if we need to convert this using DOS-style short mode. If the path
33630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33631  # take no chances and rewrite it.
33632  # Note: m4 eats our [], so we need to use [ and ] instead.
33633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33634  if test "x$has_forbidden_chars" != x; then
33635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33637  fi
33638
33639    # Output is in $new_path
33640
33641  windows_path="$new_path"
33642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33643    unix_path=`$CYGPATH -u "$windows_path"`
33644    new_path="$unix_path"
33645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33647    new_path="$unix_path"
33648  fi
33649
33650    # remove trailing .exe if any
33651    new_path="${new_path/%.exe/}"
33652
33653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33655  fi
33656
33657    else
33658      # We're on a unix platform. Hooray! :)
33659      # First separate the path from the arguments. This will split at the first
33660      # space.
33661      complete="$CXX"
33662      path="${complete%% *}"
33663      tmp="$complete EOL"
33664      arguments="${tmp#* }"
33665
33666      # Cannot rely on the command "which" here since it doesn't always work.
33667      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33668      if test -z "$is_absolute_path"; then
33669        # Path to executable is not absolute. Find it.
33670        IFS_save="$IFS"
33671        IFS=:
33672        for p in $PATH; do
33673          if test -f "$p/$path" && test -x "$p/$path"; then
33674            new_path="$p/$path"
33675            break
33676          fi
33677        done
33678        IFS="$IFS_save"
33679      else
33680        # This is an absolute path, we can use it without further modifications.
33681        new_path="$path"
33682      fi
33683
33684      if test "x$new_path" = x; then
33685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33686$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33687        has_space=`$ECHO "$complete" | $GREP " "`
33688        if test "x$has_space" != x; then
33689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33691        fi
33692        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33693      fi
33694    fi
33695
33696    # Now join together the path and the arguments once again
33697    if test "x$arguments" != xEOL; then
33698      new_complete="$new_path ${arguments% *}"
33699    else
33700      new_complete="$new_path"
33701    fi
33702
33703    if test "x$complete" != "x$new_complete"; then
33704      CXX="$new_complete"
33705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33706$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33707    fi
33708  fi
33709
33710  TEST_COMPILER="$CXX"
33711  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33712  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33713  if test "x$OPENJDK_BUILD_OS" != xaix; then
33714    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33715    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33716$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33717
33718  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33719    # Follow a chain of symbolic links. Use readlink
33720    # where it exists, else fall back to horribly
33721    # complicated shell code.
33722    if test "x$READLINK_TESTED" != yes; then
33723      # On MacOSX there is a readlink tool with a different
33724      # purpose than the GNU readlink tool. Check the found readlink.
33725      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33726      if test "x$ISGNU" = x; then
33727        # A readlink that we do not know how to use.
33728        # Are there other non-GNU readlinks out there?
33729        READLINK_TESTED=yes
33730        READLINK=
33731      fi
33732    fi
33733
33734    if test "x$READLINK" != x; then
33735      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33736    else
33737      # Save the current directory for restoring afterwards
33738      STARTDIR=$PWD
33739      COUNTER=0
33740      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33741      sym_link_file=`$BASENAME $TEST_COMPILER`
33742      cd $sym_link_dir
33743      # Use -P flag to resolve symlinks in directories.
33744      cd `$THEPWDCMD -P`
33745      sym_link_dir=`$THEPWDCMD -P`
33746      # Resolve file symlinks
33747      while test $COUNTER -lt 20; do
33748        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33749        if test "x$ISLINK" == x; then
33750          # This is not a symbolic link! We are done!
33751          break
33752        fi
33753        # Again resolve directory symlinks since the target of the just found
33754        # link could be in a different directory
33755        cd `$DIRNAME $ISLINK`
33756        sym_link_dir=`$THEPWDCMD -P`
33757        sym_link_file=`$BASENAME $ISLINK`
33758        let COUNTER=COUNTER+1
33759      done
33760      cd $STARTDIR
33761      TEST_COMPILER=$sym_link_dir/$sym_link_file
33762    fi
33763  fi
33764
33765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33766$as_echo "$TEST_COMPILER" >&6; }
33767  fi
33768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33769$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33770
33771  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33772  if test "x$COMPILER_BASENAME" = "xccache"; then
33773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33774$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33775    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33776    # We want to control ccache invocation ourselves, so ignore this cc and try
33777    # searching again.
33778
33779    # Remove the path to the fake ccache cc from the PATH
33780    RETRY_COMPILER_SAVED_PATH="$PATH"
33781    COMPILER_DIRNAME=`$DIRNAME $CXX`
33782    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33783
33784    # Try again looking for our compiler
33785    if test -n "$ac_tool_prefix"; then
33786  for ac_prog in $TOOLCHAIN_CXX_BINARY
33787  do
33788    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33789set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33791$as_echo_n "checking for $ac_word... " >&6; }
33792if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33793  $as_echo_n "(cached) " >&6
33794else
33795  if test -n "$PROPER_COMPILER_CXX"; then
33796  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33797else
33798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33799for as_dir in $PATH
33800do
33801  IFS=$as_save_IFS
33802  test -z "$as_dir" && as_dir=.
33803    for ac_exec_ext in '' $ac_executable_extensions; do
33804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33805    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33807    break 2
33808  fi
33809done
33810  done
33811IFS=$as_save_IFS
33812
33813fi
33814fi
33815PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33816if test -n "$PROPER_COMPILER_CXX"; then
33817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33818$as_echo "$PROPER_COMPILER_CXX" >&6; }
33819else
33820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33821$as_echo "no" >&6; }
33822fi
33823
33824
33825    test -n "$PROPER_COMPILER_CXX" && break
33826  done
33827fi
33828if test -z "$PROPER_COMPILER_CXX"; then
33829  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33830  for ac_prog in $TOOLCHAIN_CXX_BINARY
33831do
33832  # Extract the first word of "$ac_prog", so it can be a program name with args.
33833set dummy $ac_prog; ac_word=$2
33834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33835$as_echo_n "checking for $ac_word... " >&6; }
33836if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33837  $as_echo_n "(cached) " >&6
33838else
33839  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33840  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33841else
33842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33843for as_dir in $PATH
33844do
33845  IFS=$as_save_IFS
33846  test -z "$as_dir" && as_dir=.
33847    for ac_exec_ext in '' $ac_executable_extensions; do
33848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33849    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33851    break 2
33852  fi
33853done
33854  done
33855IFS=$as_save_IFS
33856
33857fi
33858fi
33859ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33860if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33862$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33863else
33864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33865$as_echo "no" >&6; }
33866fi
33867
33868
33869  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33870done
33871
33872  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33873    PROPER_COMPILER_CXX=""
33874  else
33875    case $cross_compiling:$ac_tool_warned in
33876yes:)
33877{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33878$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33879ac_tool_warned=yes ;;
33880esac
33881    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33882  fi
33883fi
33884
33885
33886  # Only process if variable expands to non-empty
33887
33888  if test "x$PROPER_COMPILER_CXX" != x; then
33889    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33890
33891  # First separate the path from the arguments. This will split at the first
33892  # space.
33893  complete="$PROPER_COMPILER_CXX"
33894  path="${complete%% *}"
33895  tmp="$complete EOL"
33896  arguments="${tmp#* }"
33897
33898  # Input might be given as Windows format, start by converting to
33899  # unix format.
33900  new_path=`$CYGPATH -u "$path"`
33901
33902  # Now try to locate executable using which
33903  new_path=`$WHICH "$new_path" 2> /dev/null`
33904  # bat and cmd files are not always considered executable in cygwin causing which
33905  # to not find them
33906  if test "x$new_path" = x \
33907      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33908      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33909    new_path=`$CYGPATH -u "$path"`
33910  fi
33911  if test "x$new_path" = x; then
33912    # Oops. Which didn't find the executable.
33913    # The splitting of arguments from the executable at a space might have been incorrect,
33914    # since paths with space are more likely in Windows. Give it another try with the whole
33915    # argument.
33916    path="$complete"
33917    arguments="EOL"
33918    new_path=`$CYGPATH -u "$path"`
33919    new_path=`$WHICH "$new_path" 2> /dev/null`
33920    # bat and cmd files are not always considered executable in cygwin causing which
33921    # to not find them
33922    if test "x$new_path" = x \
33923        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33924        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33925      new_path=`$CYGPATH -u "$path"`
33926    fi
33927    if test "x$new_path" = x; then
33928      # It's still not found. Now this is an unrecoverable error.
33929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33930$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33931      has_space=`$ECHO "$complete" | $GREP " "`
33932      if test "x$has_space" != x; then
33933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33935      fi
33936      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33937    fi
33938  fi
33939
33940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33943  # "foo.exe" is OK but "foo" is an error.
33944  #
33945  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33946  # It is also a way to make sure we got the proper file name for the real test later on.
33947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33948  if test "x$test_shortpath" = x; then
33949    # Short path failed, file does not exist as specified.
33950    # Try adding .exe or .cmd
33951    if test -f "${new_path}.exe"; then
33952      input_to_shortpath="${new_path}.exe"
33953    elif test -f "${new_path}.cmd"; then
33954      input_to_shortpath="${new_path}.cmd"
33955    else
33956      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33957$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33958      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33959$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33960      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33961    fi
33962  else
33963    input_to_shortpath="$new_path"
33964  fi
33965
33966  # Call helper function which possibly converts this using DOS-style short mode.
33967  # If so, the updated path is stored in $new_path.
33968  new_path="$input_to_shortpath"
33969
33970  input_path="$input_to_shortpath"
33971  # Check if we need to convert this using DOS-style short mode. If the path
33972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33973  # take no chances and rewrite it.
33974  # Note: m4 eats our [], so we need to use [ and ] instead.
33975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33976  if test "x$has_forbidden_chars" != x; then
33977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33978    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33981      # Going to short mode and back again did indeed matter. Since short mode is
33982      # case insensitive, let's make it lowercase to improve readability.
33983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33984      # Now convert it back to Unix-style (cygpath)
33985      input_path=`$CYGPATH -u "$shortmode_path"`
33986      new_path="$input_path"
33987    fi
33988  fi
33989
33990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33991  if test "x$test_cygdrive_prefix" = x; then
33992    # As a simple fix, exclude /usr/bin since it's not a real path.
33993    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33995      # a path prefixed by /cygdrive for fixpath to work.
33996      new_path="$CYGWIN_ROOT_PATH$input_path"
33997    fi
33998  fi
33999
34000  # remove trailing .exe if any
34001  new_path="${new_path/%.exe/}"
34002
34003    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34004
34005  # First separate the path from the arguments. This will split at the first
34006  # space.
34007  complete="$PROPER_COMPILER_CXX"
34008  path="${complete%% *}"
34009  tmp="$complete EOL"
34010  arguments="${tmp#* }"
34011
34012  # Input might be given as Windows format, start by converting to
34013  # unix format.
34014  new_path="$path"
34015
34016  windows_path="$new_path"
34017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34018    unix_path=`$CYGPATH -u "$windows_path"`
34019    new_path="$unix_path"
34020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34022    new_path="$unix_path"
34023  fi
34024
34025
34026  # Now try to locate executable using which
34027  new_path=`$WHICH "$new_path" 2> /dev/null`
34028
34029  if test "x$new_path" = x; then
34030    # Oops. Which didn't find the executable.
34031    # The splitting of arguments from the executable at a space might have been incorrect,
34032    # since paths with space are more likely in Windows. Give it another try with the whole
34033    # argument.
34034    path="$complete"
34035    arguments="EOL"
34036    new_path="$path"
34037
34038  windows_path="$new_path"
34039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34040    unix_path=`$CYGPATH -u "$windows_path"`
34041    new_path="$unix_path"
34042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34044    new_path="$unix_path"
34045  fi
34046
34047
34048    new_path=`$WHICH "$new_path" 2> /dev/null`
34049    # bat and cmd files are not always considered executable in MSYS causing which
34050    # to not find them
34051    if test "x$new_path" = x \
34052        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34053        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34054      new_path="$path"
34055
34056  windows_path="$new_path"
34057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34058    unix_path=`$CYGPATH -u "$windows_path"`
34059    new_path="$unix_path"
34060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34062    new_path="$unix_path"
34063  fi
34064
34065    fi
34066
34067    if test "x$new_path" = x; then
34068      # It's still not found. Now this is an unrecoverable error.
34069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34070$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34071      has_space=`$ECHO "$complete" | $GREP " "`
34072      if test "x$has_space" != x; then
34073        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34074$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34075      fi
34076      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34077    fi
34078  fi
34079
34080  # Now new_path has a complete unix path to the binary
34081  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34082    # Keep paths in /bin as-is, but remove trailing .exe if any
34083    new_path="${new_path/%.exe/}"
34084    # Do not save /bin paths to all_fixpath_prefixes!
34085  else
34086    # Not in mixed or Windows style, start by that.
34087    new_path=`cmd //c echo $new_path`
34088
34089  input_path="$new_path"
34090  # Check if we need to convert this using DOS-style short mode. If the path
34091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34092  # take no chances and rewrite it.
34093  # Note: m4 eats our [], so we need to use [ and ] instead.
34094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34095  if test "x$has_forbidden_chars" != x; then
34096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34098  fi
34099
34100    # Output is in $new_path
34101
34102  windows_path="$new_path"
34103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34104    unix_path=`$CYGPATH -u "$windows_path"`
34105    new_path="$unix_path"
34106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34108    new_path="$unix_path"
34109  fi
34110
34111    # remove trailing .exe if any
34112    new_path="${new_path/%.exe/}"
34113
34114    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34115    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34116  fi
34117
34118    else
34119      # We're on a unix platform. Hooray! :)
34120      # First separate the path from the arguments. This will split at the first
34121      # space.
34122      complete="$PROPER_COMPILER_CXX"
34123      path="${complete%% *}"
34124      tmp="$complete EOL"
34125      arguments="${tmp#* }"
34126
34127      # Cannot rely on the command "which" here since it doesn't always work.
34128      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34129      if test -z "$is_absolute_path"; then
34130        # Path to executable is not absolute. Find it.
34131        IFS_save="$IFS"
34132        IFS=:
34133        for p in $PATH; do
34134          if test -f "$p/$path" && test -x "$p/$path"; then
34135            new_path="$p/$path"
34136            break
34137          fi
34138        done
34139        IFS="$IFS_save"
34140      else
34141        # This is an absolute path, we can use it without further modifications.
34142        new_path="$path"
34143      fi
34144
34145      if test "x$new_path" = x; then
34146        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34147$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34148        has_space=`$ECHO "$complete" | $GREP " "`
34149        if test "x$has_space" != x; then
34150          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34151$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34152        fi
34153        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34154      fi
34155    fi
34156
34157    # Now join together the path and the arguments once again
34158    if test "x$arguments" != xEOL; then
34159      new_complete="$new_path ${arguments% *}"
34160    else
34161      new_complete="$new_path"
34162    fi
34163
34164    if test "x$complete" != "x$new_complete"; then
34165      PROPER_COMPILER_CXX="$new_complete"
34166      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
34167$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
34168    fi
34169  fi
34170
34171    PATH="$RETRY_COMPILER_SAVED_PATH"
34172
34173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
34174$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
34175
34176  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34177    # Follow a chain of symbolic links. Use readlink
34178    # where it exists, else fall back to horribly
34179    # complicated shell code.
34180    if test "x$READLINK_TESTED" != yes; then
34181      # On MacOSX there is a readlink tool with a different
34182      # purpose than the GNU readlink tool. Check the found readlink.
34183      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34184      if test "x$ISGNU" = x; then
34185        # A readlink that we do not know how to use.
34186        # Are there other non-GNU readlinks out there?
34187        READLINK_TESTED=yes
34188        READLINK=
34189      fi
34190    fi
34191
34192    if test "x$READLINK" != x; then
34193      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
34194    else
34195      # Save the current directory for restoring afterwards
34196      STARTDIR=$PWD
34197      COUNTER=0
34198      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
34199      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
34200      cd $sym_link_dir
34201      # Use -P flag to resolve symlinks in directories.
34202      cd `$THEPWDCMD -P`
34203      sym_link_dir=`$THEPWDCMD -P`
34204      # Resolve file symlinks
34205      while test $COUNTER -lt 20; do
34206        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34207        if test "x$ISLINK" == x; then
34208          # This is not a symbolic link! We are done!
34209          break
34210        fi
34211        # Again resolve directory symlinks since the target of the just found
34212        # link could be in a different directory
34213        cd `$DIRNAME $ISLINK`
34214        sym_link_dir=`$THEPWDCMD -P`
34215        sym_link_file=`$BASENAME $ISLINK`
34216        let COUNTER=COUNTER+1
34217      done
34218      cd $STARTDIR
34219      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
34220    fi
34221  fi
34222
34223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
34224$as_echo "$PROPER_COMPILER_CXX" >&6; }
34225    CXX="$PROPER_COMPILER_CXX"
34226  else
34227    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
34228$as_echo "no, keeping CXX" >&6; }
34229  fi
34230
34231
34232  COMPILER=$CXX
34233  COMPILER_NAME=$COMPILER_NAME
34234
34235  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34236    # cc -V output typically looks like
34237    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34238    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34239    # Check that this is likely to be the Solaris Studio cc.
34240    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34241    if test $? -ne 0; then
34242      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34243      { $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
34244$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34245      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34246$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34247      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34248$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34249      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34250    fi
34251    # Remove usage instructions (if present), and
34252    # collapse compiler output into a single line
34253    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34254        $SED -e 's/ *[Uu]sage:.*//'`
34255    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34256        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34257  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34258    # xlc -qversion output typically looks like
34259    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34260    #     Version: 11.01.0000.0015
34261    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34262    # Check that this is likely to be the IBM XL C compiler.
34263    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34264    if test $? -ne 0; then
34265      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34266      { $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
34267$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34268      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34269$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34270      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34271$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34272      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34273    fi
34274    # Collapse compiler output into a single line
34275    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34276    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34277        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34278  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34279    # There is no specific version flag, but all output starts with a version string.
34280    # First line typically looks something like:
34281    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34282    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34283    # Check that this is likely to be Microsoft CL.EXE.
34284    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34285    if test $? -ne 0; then
34286      { $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
34287$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34288      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34289$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34290      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34291    fi
34292    # Collapse compiler output into a single line
34293    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34294    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34295        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34296  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34297    # gcc --version output typically looks like
34298    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34299    #     Copyright (C) 2013 Free Software Foundation, Inc.
34300    #     This is free software; see the source for copying conditions.  There is NO
34301    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34302    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34303    # Check that this is likely to be GCC.
34304    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34305    if test $? -ne 0; then
34306      { $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
34307$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34308      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34309$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34310      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34311    fi
34312    # Remove Copyright and legalese from version string, and
34313    # collapse into a single line
34314    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34315        $SED -e 's/ *Copyright .*//'`
34316    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34317        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34318  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34319    # clang --version output typically looks like
34320    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34321    #    clang version 3.3 (tags/RELEASE_33/final)
34322    # or
34323    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34324    #    Target: x86_64-pc-linux-gnu
34325    #    Thread model: posix
34326    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34327    # Check that this is likely to be clang
34328    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34329    if test $? -ne 0; then
34330      { $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
34331$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34332      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34333$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34334      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34335    fi
34336    # Collapse compiler output into a single line
34337    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34338    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34339        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34340  else
34341      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34342  fi
34343  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34344  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34345  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34346  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34347
34348  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34349$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34350
34351
34352  # Now that we have resolved CXX ourself, let autoconf have its go at it
34353  ac_ext=cpp
34354ac_cpp='$CXXCPP $CPPFLAGS'
34355ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34356ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34357ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34358if test -z "$CXX"; then
34359  if test -n "$CCC"; then
34360    CXX=$CCC
34361  else
34362    if test -n "$ac_tool_prefix"; then
34363  for ac_prog in $CXX
34364  do
34365    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34366set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34368$as_echo_n "checking for $ac_word... " >&6; }
34369if ${ac_cv_prog_CXX+:} false; then :
34370  $as_echo_n "(cached) " >&6
34371else
34372  if test -n "$CXX"; then
34373  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34374else
34375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34376for as_dir in $PATH
34377do
34378  IFS=$as_save_IFS
34379  test -z "$as_dir" && as_dir=.
34380    for ac_exec_ext in '' $ac_executable_extensions; do
34381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34382    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34384    break 2
34385  fi
34386done
34387  done
34388IFS=$as_save_IFS
34389
34390fi
34391fi
34392CXX=$ac_cv_prog_CXX
34393if test -n "$CXX"; then
34394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34395$as_echo "$CXX" >&6; }
34396else
34397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34398$as_echo "no" >&6; }
34399fi
34400
34401
34402    test -n "$CXX" && break
34403  done
34404fi
34405if test -z "$CXX"; then
34406  ac_ct_CXX=$CXX
34407  for ac_prog in $CXX
34408do
34409  # Extract the first word of "$ac_prog", so it can be a program name with args.
34410set dummy $ac_prog; ac_word=$2
34411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34412$as_echo_n "checking for $ac_word... " >&6; }
34413if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34414  $as_echo_n "(cached) " >&6
34415else
34416  if test -n "$ac_ct_CXX"; then
34417  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34418else
34419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34420for as_dir in $PATH
34421do
34422  IFS=$as_save_IFS
34423  test -z "$as_dir" && as_dir=.
34424    for ac_exec_ext in '' $ac_executable_extensions; do
34425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34426    ac_cv_prog_ac_ct_CXX="$ac_prog"
34427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34428    break 2
34429  fi
34430done
34431  done
34432IFS=$as_save_IFS
34433
34434fi
34435fi
34436ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34437if test -n "$ac_ct_CXX"; then
34438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34439$as_echo "$ac_ct_CXX" >&6; }
34440else
34441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34442$as_echo "no" >&6; }
34443fi
34444
34445
34446  test -n "$ac_ct_CXX" && break
34447done
34448
34449  if test "x$ac_ct_CXX" = x; then
34450    CXX="g++"
34451  else
34452    case $cross_compiling:$ac_tool_warned in
34453yes:)
34454{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34455$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34456ac_tool_warned=yes ;;
34457esac
34458    CXX=$ac_ct_CXX
34459  fi
34460fi
34461
34462  fi
34463fi
34464# Provide some information about the compiler.
34465$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34466set X $ac_compile
34467ac_compiler=$2
34468for ac_option in --version -v -V -qversion; do
34469  { { ac_try="$ac_compiler $ac_option >&5"
34470case "(($ac_try" in
34471  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34472  *) ac_try_echo=$ac_try;;
34473esac
34474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34475$as_echo "$ac_try_echo"; } >&5
34476  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34477  ac_status=$?
34478  if test -s conftest.err; then
34479    sed '10a\
34480... rest of stderr output deleted ...
34481         10q' conftest.err >conftest.er1
34482    cat conftest.er1 >&5
34483  fi
34484  rm -f conftest.er1 conftest.err
34485  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34486  test $ac_status = 0; }
34487done
34488
34489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34490$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34491if ${ac_cv_cxx_compiler_gnu+:} false; then :
34492  $as_echo_n "(cached) " >&6
34493else
34494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34495/* end confdefs.h.  */
34496
34497int
34498main ()
34499{
34500#ifndef __GNUC__
34501       choke me
34502#endif
34503
34504  ;
34505  return 0;
34506}
34507_ACEOF
34508if ac_fn_cxx_try_compile "$LINENO"; then :
34509  ac_compiler_gnu=yes
34510else
34511  ac_compiler_gnu=no
34512fi
34513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34514ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34515
34516fi
34517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34518$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34519if test $ac_compiler_gnu = yes; then
34520  GXX=yes
34521else
34522  GXX=
34523fi
34524ac_test_CXXFLAGS=${CXXFLAGS+set}
34525ac_save_CXXFLAGS=$CXXFLAGS
34526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34527$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34528if ${ac_cv_prog_cxx_g+:} false; then :
34529  $as_echo_n "(cached) " >&6
34530else
34531  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34532   ac_cxx_werror_flag=yes
34533   ac_cv_prog_cxx_g=no
34534   CXXFLAGS="-g"
34535   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34536/* end confdefs.h.  */
34537
34538int
34539main ()
34540{
34541
34542  ;
34543  return 0;
34544}
34545_ACEOF
34546if ac_fn_cxx_try_compile "$LINENO"; then :
34547  ac_cv_prog_cxx_g=yes
34548else
34549  CXXFLAGS=""
34550      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34551/* end confdefs.h.  */
34552
34553int
34554main ()
34555{
34556
34557  ;
34558  return 0;
34559}
34560_ACEOF
34561if ac_fn_cxx_try_compile "$LINENO"; then :
34562
34563else
34564  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34565	 CXXFLAGS="-g"
34566	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34567/* end confdefs.h.  */
34568
34569int
34570main ()
34571{
34572
34573  ;
34574  return 0;
34575}
34576_ACEOF
34577if ac_fn_cxx_try_compile "$LINENO"; then :
34578  ac_cv_prog_cxx_g=yes
34579fi
34580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34581fi
34582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34583fi
34584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34585   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34586fi
34587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34588$as_echo "$ac_cv_prog_cxx_g" >&6; }
34589if test "$ac_test_CXXFLAGS" = set; then
34590  CXXFLAGS=$ac_save_CXXFLAGS
34591elif test $ac_cv_prog_cxx_g = yes; then
34592  if test "$GXX" = yes; then
34593    CXXFLAGS="-g -O2"
34594  else
34595    CXXFLAGS="-g"
34596  fi
34597else
34598  if test "$GXX" = yes; then
34599    CXXFLAGS="-O2"
34600  else
34601    CXXFLAGS=
34602  fi
34603fi
34604ac_ext=cpp
34605ac_cpp='$CXXCPP $CPPFLAGS'
34606ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34607ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34608ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34609
34610
34611  #
34612  # Setup the preprocessor (CPP and CXXCPP)
34613  #
34614  ac_ext=c
34615ac_cpp='$CPP $CPPFLAGS'
34616ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34617ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34618ac_compiler_gnu=$ac_cv_c_compiler_gnu
34619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34620$as_echo_n "checking how to run the C preprocessor... " >&6; }
34621# On Suns, sometimes $CPP names a directory.
34622if test -n "$CPP" && test -d "$CPP"; then
34623  CPP=
34624fi
34625if test -z "$CPP"; then
34626  if ${ac_cv_prog_CPP+:} false; then :
34627  $as_echo_n "(cached) " >&6
34628else
34629      # Double quotes because CPP needs to be expanded
34630    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34631    do
34632      ac_preproc_ok=false
34633for ac_c_preproc_warn_flag in '' yes
34634do
34635  # Use a header file that comes with gcc, so configuring glibc
34636  # with a fresh cross-compiler works.
34637  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34638  # <limits.h> exists even on freestanding compilers.
34639  # On the NeXT, cc -E runs the code through the compiler's parser,
34640  # not just through cpp. "Syntax error" is here to catch this case.
34641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34642/* end confdefs.h.  */
34643#ifdef __STDC__
34644# include <limits.h>
34645#else
34646# include <assert.h>
34647#endif
34648		     Syntax error
34649_ACEOF
34650if ac_fn_c_try_cpp "$LINENO"; then :
34651
34652else
34653  # Broken: fails on valid input.
34654continue
34655fi
34656rm -f conftest.err conftest.i conftest.$ac_ext
34657
34658  # OK, works on sane cases.  Now check whether nonexistent headers
34659  # can be detected and how.
34660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34661/* end confdefs.h.  */
34662#include <ac_nonexistent.h>
34663_ACEOF
34664if ac_fn_c_try_cpp "$LINENO"; then :
34665  # Broken: success on invalid input.
34666continue
34667else
34668  # Passes both tests.
34669ac_preproc_ok=:
34670break
34671fi
34672rm -f conftest.err conftest.i conftest.$ac_ext
34673
34674done
34675# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34676rm -f conftest.i conftest.err conftest.$ac_ext
34677if $ac_preproc_ok; then :
34678  break
34679fi
34680
34681    done
34682    ac_cv_prog_CPP=$CPP
34683
34684fi
34685  CPP=$ac_cv_prog_CPP
34686else
34687  ac_cv_prog_CPP=$CPP
34688fi
34689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34690$as_echo "$CPP" >&6; }
34691ac_preproc_ok=false
34692for ac_c_preproc_warn_flag in '' yes
34693do
34694  # Use a header file that comes with gcc, so configuring glibc
34695  # with a fresh cross-compiler works.
34696  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34697  # <limits.h> exists even on freestanding compilers.
34698  # On the NeXT, cc -E runs the code through the compiler's parser,
34699  # not just through cpp. "Syntax error" is here to catch this case.
34700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34701/* end confdefs.h.  */
34702#ifdef __STDC__
34703# include <limits.h>
34704#else
34705# include <assert.h>
34706#endif
34707		     Syntax error
34708_ACEOF
34709if ac_fn_c_try_cpp "$LINENO"; then :
34710
34711else
34712  # Broken: fails on valid input.
34713continue
34714fi
34715rm -f conftest.err conftest.i conftest.$ac_ext
34716
34717  # OK, works on sane cases.  Now check whether nonexistent headers
34718  # can be detected and how.
34719  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34720/* end confdefs.h.  */
34721#include <ac_nonexistent.h>
34722_ACEOF
34723if ac_fn_c_try_cpp "$LINENO"; then :
34724  # Broken: success on invalid input.
34725continue
34726else
34727  # Passes both tests.
34728ac_preproc_ok=:
34729break
34730fi
34731rm -f conftest.err conftest.i conftest.$ac_ext
34732
34733done
34734# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34735rm -f conftest.i conftest.err conftest.$ac_ext
34736if $ac_preproc_ok; then :
34737
34738else
34739  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34741as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34742See \`config.log' for more details" "$LINENO" 5; }
34743fi
34744
34745ac_ext=cpp
34746ac_cpp='$CXXCPP $CPPFLAGS'
34747ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34748ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34749ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34750
34751
34752  # Only process if variable expands to non-empty
34753
34754  if test "x$CPP" != x; then
34755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34756
34757  # First separate the path from the arguments. This will split at the first
34758  # space.
34759  complete="$CPP"
34760  path="${complete%% *}"
34761  tmp="$complete EOL"
34762  arguments="${tmp#* }"
34763
34764  # Input might be given as Windows format, start by converting to
34765  # unix format.
34766  new_path=`$CYGPATH -u "$path"`
34767
34768  # Now try to locate executable using which
34769  new_path=`$WHICH "$new_path" 2> /dev/null`
34770  # bat and cmd files are not always considered executable in cygwin causing which
34771  # to not find them
34772  if test "x$new_path" = x \
34773      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34774      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34775    new_path=`$CYGPATH -u "$path"`
34776  fi
34777  if test "x$new_path" = x; then
34778    # Oops. Which didn't find the executable.
34779    # The splitting of arguments from the executable at a space might have been incorrect,
34780    # since paths with space are more likely in Windows. Give it another try with the whole
34781    # argument.
34782    path="$complete"
34783    arguments="EOL"
34784    new_path=`$CYGPATH -u "$path"`
34785    new_path=`$WHICH "$new_path" 2> /dev/null`
34786    # bat and cmd files are not always considered executable in cygwin causing which
34787    # to not find them
34788    if test "x$new_path" = x \
34789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34791      new_path=`$CYGPATH -u "$path"`
34792    fi
34793    if test "x$new_path" = x; then
34794      # It's still not found. Now this is an unrecoverable error.
34795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34796$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34797      has_space=`$ECHO "$complete" | $GREP " "`
34798      if test "x$has_space" != x; then
34799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34801      fi
34802      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34803    fi
34804  fi
34805
34806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34809  # "foo.exe" is OK but "foo" is an error.
34810  #
34811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34812  # It is also a way to make sure we got the proper file name for the real test later on.
34813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34814  if test "x$test_shortpath" = x; then
34815    # Short path failed, file does not exist as specified.
34816    # Try adding .exe or .cmd
34817    if test -f "${new_path}.exe"; then
34818      input_to_shortpath="${new_path}.exe"
34819    elif test -f "${new_path}.cmd"; then
34820      input_to_shortpath="${new_path}.cmd"
34821    else
34822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34823$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34826      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34827    fi
34828  else
34829    input_to_shortpath="$new_path"
34830  fi
34831
34832  # Call helper function which possibly converts this using DOS-style short mode.
34833  # If so, the updated path is stored in $new_path.
34834  new_path="$input_to_shortpath"
34835
34836  input_path="$input_to_shortpath"
34837  # Check if we need to convert this using DOS-style short mode. If the path
34838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34839  # take no chances and rewrite it.
34840  # Note: m4 eats our [], so we need to use [ and ] instead.
34841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34842  if test "x$has_forbidden_chars" != x; then
34843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34847      # Going to short mode and back again did indeed matter. Since short mode is
34848      # case insensitive, let's make it lowercase to improve readability.
34849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34850      # Now convert it back to Unix-style (cygpath)
34851      input_path=`$CYGPATH -u "$shortmode_path"`
34852      new_path="$input_path"
34853    fi
34854  fi
34855
34856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34857  if test "x$test_cygdrive_prefix" = x; then
34858    # As a simple fix, exclude /usr/bin since it's not a real path.
34859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34861      # a path prefixed by /cygdrive for fixpath to work.
34862      new_path="$CYGWIN_ROOT_PATH$input_path"
34863    fi
34864  fi
34865
34866  # remove trailing .exe if any
34867  new_path="${new_path/%.exe/}"
34868
34869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34870
34871  # First separate the path from the arguments. This will split at the first
34872  # space.
34873  complete="$CPP"
34874  path="${complete%% *}"
34875  tmp="$complete EOL"
34876  arguments="${tmp#* }"
34877
34878  # Input might be given as Windows format, start by converting to
34879  # unix format.
34880  new_path="$path"
34881
34882  windows_path="$new_path"
34883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34884    unix_path=`$CYGPATH -u "$windows_path"`
34885    new_path="$unix_path"
34886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34888    new_path="$unix_path"
34889  fi
34890
34891
34892  # Now try to locate executable using which
34893  new_path=`$WHICH "$new_path" 2> /dev/null`
34894
34895  if test "x$new_path" = x; then
34896    # Oops. Which didn't find the executable.
34897    # The splitting of arguments from the executable at a space might have been incorrect,
34898    # since paths with space are more likely in Windows. Give it another try with the whole
34899    # argument.
34900    path="$complete"
34901    arguments="EOL"
34902    new_path="$path"
34903
34904  windows_path="$new_path"
34905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34906    unix_path=`$CYGPATH -u "$windows_path"`
34907    new_path="$unix_path"
34908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34910    new_path="$unix_path"
34911  fi
34912
34913
34914    new_path=`$WHICH "$new_path" 2> /dev/null`
34915    # bat and cmd files are not always considered executable in MSYS causing which
34916    # to not find them
34917    if test "x$new_path" = x \
34918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34920      new_path="$path"
34921
34922  windows_path="$new_path"
34923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34924    unix_path=`$CYGPATH -u "$windows_path"`
34925    new_path="$unix_path"
34926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34928    new_path="$unix_path"
34929  fi
34930
34931    fi
34932
34933    if test "x$new_path" = x; then
34934      # It's still not found. Now this is an unrecoverable error.
34935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34936$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34937      has_space=`$ECHO "$complete" | $GREP " "`
34938      if test "x$has_space" != x; then
34939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34941      fi
34942      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34943    fi
34944  fi
34945
34946  # Now new_path has a complete unix path to the binary
34947  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34948    # Keep paths in /bin as-is, but remove trailing .exe if any
34949    new_path="${new_path/%.exe/}"
34950    # Do not save /bin paths to all_fixpath_prefixes!
34951  else
34952    # Not in mixed or Windows style, start by that.
34953    new_path=`cmd //c echo $new_path`
34954
34955  input_path="$new_path"
34956  # Check if we need to convert this using DOS-style short mode. If the path
34957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34958  # take no chances and rewrite it.
34959  # Note: m4 eats our [], so we need to use [ and ] instead.
34960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34961  if test "x$has_forbidden_chars" != x; then
34962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34964  fi
34965
34966    # Output is in $new_path
34967
34968  windows_path="$new_path"
34969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34970    unix_path=`$CYGPATH -u "$windows_path"`
34971    new_path="$unix_path"
34972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34974    new_path="$unix_path"
34975  fi
34976
34977    # remove trailing .exe if any
34978    new_path="${new_path/%.exe/}"
34979
34980    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34981    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34982  fi
34983
34984    else
34985      # We're on a unix platform. Hooray! :)
34986      # First separate the path from the arguments. This will split at the first
34987      # space.
34988      complete="$CPP"
34989      path="${complete%% *}"
34990      tmp="$complete EOL"
34991      arguments="${tmp#* }"
34992
34993      # Cannot rely on the command "which" here since it doesn't always work.
34994      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34995      if test -z "$is_absolute_path"; then
34996        # Path to executable is not absolute. Find it.
34997        IFS_save="$IFS"
34998        IFS=:
34999        for p in $PATH; do
35000          if test -f "$p/$path" && test -x "$p/$path"; then
35001            new_path="$p/$path"
35002            break
35003          fi
35004        done
35005        IFS="$IFS_save"
35006      else
35007        # This is an absolute path, we can use it without further modifications.
35008        new_path="$path"
35009      fi
35010
35011      if test "x$new_path" = x; then
35012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35013$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35014        has_space=`$ECHO "$complete" | $GREP " "`
35015        if test "x$has_space" != x; then
35016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35018        fi
35019        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35020      fi
35021    fi
35022
35023    # Now join together the path and the arguments once again
35024    if test "x$arguments" != xEOL; then
35025      new_complete="$new_path ${arguments% *}"
35026    else
35027      new_complete="$new_path"
35028    fi
35029
35030    if test "x$complete" != "x$new_complete"; then
35031      CPP="$new_complete"
35032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35033$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35034    fi
35035  fi
35036
35037  ac_ext=cpp
35038ac_cpp='$CXXCPP $CPPFLAGS'
35039ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35040ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35041ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35043$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35044if test -z "$CXXCPP"; then
35045  if ${ac_cv_prog_CXXCPP+:} false; then :
35046  $as_echo_n "(cached) " >&6
35047else
35048      # Double quotes because CXXCPP needs to be expanded
35049    for CXXCPP in "$CXX -E" "/lib/cpp"
35050    do
35051      ac_preproc_ok=false
35052for ac_cxx_preproc_warn_flag in '' yes
35053do
35054  # Use a header file that comes with gcc, so configuring glibc
35055  # with a fresh cross-compiler works.
35056  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35057  # <limits.h> exists even on freestanding compilers.
35058  # On the NeXT, cc -E runs the code through the compiler's parser,
35059  # not just through cpp. "Syntax error" is here to catch this case.
35060  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35061/* end confdefs.h.  */
35062#ifdef __STDC__
35063# include <limits.h>
35064#else
35065# include <assert.h>
35066#endif
35067		     Syntax error
35068_ACEOF
35069if ac_fn_cxx_try_cpp "$LINENO"; then :
35070
35071else
35072  # Broken: fails on valid input.
35073continue
35074fi
35075rm -f conftest.err conftest.i conftest.$ac_ext
35076
35077  # OK, works on sane cases.  Now check whether nonexistent headers
35078  # can be detected and how.
35079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35080/* end confdefs.h.  */
35081#include <ac_nonexistent.h>
35082_ACEOF
35083if ac_fn_cxx_try_cpp "$LINENO"; then :
35084  # Broken: success on invalid input.
35085continue
35086else
35087  # Passes both tests.
35088ac_preproc_ok=:
35089break
35090fi
35091rm -f conftest.err conftest.i conftest.$ac_ext
35092
35093done
35094# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35095rm -f conftest.i conftest.err conftest.$ac_ext
35096if $ac_preproc_ok; then :
35097  break
35098fi
35099
35100    done
35101    ac_cv_prog_CXXCPP=$CXXCPP
35102
35103fi
35104  CXXCPP=$ac_cv_prog_CXXCPP
35105else
35106  ac_cv_prog_CXXCPP=$CXXCPP
35107fi
35108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35109$as_echo "$CXXCPP" >&6; }
35110ac_preproc_ok=false
35111for ac_cxx_preproc_warn_flag in '' yes
35112do
35113  # Use a header file that comes with gcc, so configuring glibc
35114  # with a fresh cross-compiler works.
35115  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35116  # <limits.h> exists even on freestanding compilers.
35117  # On the NeXT, cc -E runs the code through the compiler's parser,
35118  # not just through cpp. "Syntax error" is here to catch this case.
35119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35120/* end confdefs.h.  */
35121#ifdef __STDC__
35122# include <limits.h>
35123#else
35124# include <assert.h>
35125#endif
35126		     Syntax error
35127_ACEOF
35128if ac_fn_cxx_try_cpp "$LINENO"; then :
35129
35130else
35131  # Broken: fails on valid input.
35132continue
35133fi
35134rm -f conftest.err conftest.i conftest.$ac_ext
35135
35136  # OK, works on sane cases.  Now check whether nonexistent headers
35137  # can be detected and how.
35138  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35139/* end confdefs.h.  */
35140#include <ac_nonexistent.h>
35141_ACEOF
35142if ac_fn_cxx_try_cpp "$LINENO"; then :
35143  # Broken: success on invalid input.
35144continue
35145else
35146  # Passes both tests.
35147ac_preproc_ok=:
35148break
35149fi
35150rm -f conftest.err conftest.i conftest.$ac_ext
35151
35152done
35153# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35154rm -f conftest.i conftest.err conftest.$ac_ext
35155if $ac_preproc_ok; then :
35156
35157else
35158  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35159$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35160as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35161See \`config.log' for more details" "$LINENO" 5; }
35162fi
35163
35164ac_ext=cpp
35165ac_cpp='$CXXCPP $CPPFLAGS'
35166ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35167ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35168ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35169
35170
35171  # Only process if variable expands to non-empty
35172
35173  if test "x$CXXCPP" != x; then
35174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35175
35176  # First separate the path from the arguments. This will split at the first
35177  # space.
35178  complete="$CXXCPP"
35179  path="${complete%% *}"
35180  tmp="$complete EOL"
35181  arguments="${tmp#* }"
35182
35183  # Input might be given as Windows format, start by converting to
35184  # unix format.
35185  new_path=`$CYGPATH -u "$path"`
35186
35187  # Now try to locate executable using which
35188  new_path=`$WHICH "$new_path" 2> /dev/null`
35189  # bat and cmd files are not always considered executable in cygwin causing which
35190  # to not find them
35191  if test "x$new_path" = x \
35192      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35193      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35194    new_path=`$CYGPATH -u "$path"`
35195  fi
35196  if test "x$new_path" = x; then
35197    # Oops. Which didn't find the executable.
35198    # The splitting of arguments from the executable at a space might have been incorrect,
35199    # since paths with space are more likely in Windows. Give it another try with the whole
35200    # argument.
35201    path="$complete"
35202    arguments="EOL"
35203    new_path=`$CYGPATH -u "$path"`
35204    new_path=`$WHICH "$new_path" 2> /dev/null`
35205    # bat and cmd files are not always considered executable in cygwin causing which
35206    # to not find them
35207    if test "x$new_path" = x \
35208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35210      new_path=`$CYGPATH -u "$path"`
35211    fi
35212    if test "x$new_path" = x; then
35213      # It's still not found. Now this is an unrecoverable error.
35214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35215$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35216      has_space=`$ECHO "$complete" | $GREP " "`
35217      if test "x$has_space" != x; then
35218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35220      fi
35221      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35222    fi
35223  fi
35224
35225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35228  # "foo.exe" is OK but "foo" is an error.
35229  #
35230  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35231  # It is also a way to make sure we got the proper file name for the real test later on.
35232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35233  if test "x$test_shortpath" = x; then
35234    # Short path failed, file does not exist as specified.
35235    # Try adding .exe or .cmd
35236    if test -f "${new_path}.exe"; then
35237      input_to_shortpath="${new_path}.exe"
35238    elif test -f "${new_path}.cmd"; then
35239      input_to_shortpath="${new_path}.cmd"
35240    else
35241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35242$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35243      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35244$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35245      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35246    fi
35247  else
35248    input_to_shortpath="$new_path"
35249  fi
35250
35251  # Call helper function which possibly converts this using DOS-style short mode.
35252  # If so, the updated path is stored in $new_path.
35253  new_path="$input_to_shortpath"
35254
35255  input_path="$input_to_shortpath"
35256  # Check if we need to convert this using DOS-style short mode. If the path
35257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35258  # take no chances and rewrite it.
35259  # Note: m4 eats our [], so we need to use [ and ] instead.
35260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35261  if test "x$has_forbidden_chars" != x; then
35262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35266      # Going to short mode and back again did indeed matter. Since short mode is
35267      # case insensitive, let's make it lowercase to improve readability.
35268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35269      # Now convert it back to Unix-style (cygpath)
35270      input_path=`$CYGPATH -u "$shortmode_path"`
35271      new_path="$input_path"
35272    fi
35273  fi
35274
35275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35276  if test "x$test_cygdrive_prefix" = x; then
35277    # As a simple fix, exclude /usr/bin since it's not a real path.
35278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35280      # a path prefixed by /cygdrive for fixpath to work.
35281      new_path="$CYGWIN_ROOT_PATH$input_path"
35282    fi
35283  fi
35284
35285  # remove trailing .exe if any
35286  new_path="${new_path/%.exe/}"
35287
35288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35289
35290  # First separate the path from the arguments. This will split at the first
35291  # space.
35292  complete="$CXXCPP"
35293  path="${complete%% *}"
35294  tmp="$complete EOL"
35295  arguments="${tmp#* }"
35296
35297  # Input might be given as Windows format, start by converting to
35298  # unix format.
35299  new_path="$path"
35300
35301  windows_path="$new_path"
35302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35303    unix_path=`$CYGPATH -u "$windows_path"`
35304    new_path="$unix_path"
35305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35307    new_path="$unix_path"
35308  fi
35309
35310
35311  # Now try to locate executable using which
35312  new_path=`$WHICH "$new_path" 2> /dev/null`
35313
35314  if test "x$new_path" = x; then
35315    # Oops. Which didn't find the executable.
35316    # The splitting of arguments from the executable at a space might have been incorrect,
35317    # since paths with space are more likely in Windows. Give it another try with the whole
35318    # argument.
35319    path="$complete"
35320    arguments="EOL"
35321    new_path="$path"
35322
35323  windows_path="$new_path"
35324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35325    unix_path=`$CYGPATH -u "$windows_path"`
35326    new_path="$unix_path"
35327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35329    new_path="$unix_path"
35330  fi
35331
35332
35333    new_path=`$WHICH "$new_path" 2> /dev/null`
35334    # bat and cmd files are not always considered executable in MSYS causing which
35335    # to not find them
35336    if test "x$new_path" = x \
35337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35339      new_path="$path"
35340
35341  windows_path="$new_path"
35342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35343    unix_path=`$CYGPATH -u "$windows_path"`
35344    new_path="$unix_path"
35345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35347    new_path="$unix_path"
35348  fi
35349
35350    fi
35351
35352    if test "x$new_path" = x; then
35353      # It's still not found. Now this is an unrecoverable error.
35354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35355$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35356      has_space=`$ECHO "$complete" | $GREP " "`
35357      if test "x$has_space" != x; then
35358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35360      fi
35361      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35362    fi
35363  fi
35364
35365  # Now new_path has a complete unix path to the binary
35366  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35367    # Keep paths in /bin as-is, but remove trailing .exe if any
35368    new_path="${new_path/%.exe/}"
35369    # Do not save /bin paths to all_fixpath_prefixes!
35370  else
35371    # Not in mixed or Windows style, start by that.
35372    new_path=`cmd //c echo $new_path`
35373
35374  input_path="$new_path"
35375  # Check if we need to convert this using DOS-style short mode. If the path
35376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35377  # take no chances and rewrite it.
35378  # Note: m4 eats our [], so we need to use [ and ] instead.
35379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35380  if test "x$has_forbidden_chars" != x; then
35381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35383  fi
35384
35385    # Output is in $new_path
35386
35387  windows_path="$new_path"
35388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35389    unix_path=`$CYGPATH -u "$windows_path"`
35390    new_path="$unix_path"
35391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35393    new_path="$unix_path"
35394  fi
35395
35396    # remove trailing .exe if any
35397    new_path="${new_path/%.exe/}"
35398
35399    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35400    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35401  fi
35402
35403    else
35404      # We're on a unix platform. Hooray! :)
35405      # First separate the path from the arguments. This will split at the first
35406      # space.
35407      complete="$CXXCPP"
35408      path="${complete%% *}"
35409      tmp="$complete EOL"
35410      arguments="${tmp#* }"
35411
35412      # Cannot rely on the command "which" here since it doesn't always work.
35413      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35414      if test -z "$is_absolute_path"; then
35415        # Path to executable is not absolute. Find it.
35416        IFS_save="$IFS"
35417        IFS=:
35418        for p in $PATH; do
35419          if test -f "$p/$path" && test -x "$p/$path"; then
35420            new_path="$p/$path"
35421            break
35422          fi
35423        done
35424        IFS="$IFS_save"
35425      else
35426        # This is an absolute path, we can use it without further modifications.
35427        new_path="$path"
35428      fi
35429
35430      if test "x$new_path" = x; then
35431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35432$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35433        has_space=`$ECHO "$complete" | $GREP " "`
35434        if test "x$has_space" != x; then
35435          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35436$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35437        fi
35438        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35439      fi
35440    fi
35441
35442    # Now join together the path and the arguments once again
35443    if test "x$arguments" != xEOL; then
35444      new_complete="$new_path ${arguments% *}"
35445    else
35446      new_complete="$new_path"
35447    fi
35448
35449    if test "x$complete" != "x$new_complete"; then
35450      CXXCPP="$new_complete"
35451      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35452$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35453    fi
35454  fi
35455
35456
35457  #
35458  # Setup the linker (LD)
35459  #
35460  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35461    # In the Microsoft toolchain we have a separate LD command "link".
35462    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35463    # a cygwin program for something completely different.
35464    # Extract the first word of "link", so it can be a program name with args.
35465set dummy link; ac_word=$2
35466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35467$as_echo_n "checking for $ac_word... " >&6; }
35468if ${ac_cv_prog_LD+:} false; then :
35469  $as_echo_n "(cached) " >&6
35470else
35471  if test -n "$LD"; then
35472  ac_cv_prog_LD="$LD" # Let the user override the test.
35473else
35474  ac_prog_rejected=no
35475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35476for as_dir in $PATH
35477do
35478  IFS=$as_save_IFS
35479  test -z "$as_dir" && as_dir=.
35480    for ac_exec_ext in '' $ac_executable_extensions; do
35481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35482    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35483       ac_prog_rejected=yes
35484       continue
35485     fi
35486    ac_cv_prog_LD="link"
35487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35488    break 2
35489  fi
35490done
35491  done
35492IFS=$as_save_IFS
35493
35494if test $ac_prog_rejected = yes; then
35495  # We found a bogon in the path, so make sure we never use it.
35496  set dummy $ac_cv_prog_LD
35497  shift
35498  if test $# != 0; then
35499    # We chose a different compiler from the bogus one.
35500    # However, it has the same basename, so the bogon will be chosen
35501    # first if we set LD to just the basename; use the full file name.
35502    shift
35503    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35504  fi
35505fi
35506fi
35507fi
35508LD=$ac_cv_prog_LD
35509if test -n "$LD"; then
35510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35511$as_echo "$LD" >&6; }
35512else
35513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35514$as_echo "no" >&6; }
35515fi
35516
35517
35518
35519  # Only process if variable expands to non-empty
35520
35521  if test "x$LD" != x; then
35522    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35523
35524  # First separate the path from the arguments. This will split at the first
35525  # space.
35526  complete="$LD"
35527  path="${complete%% *}"
35528  tmp="$complete EOL"
35529  arguments="${tmp#* }"
35530
35531  # Input might be given as Windows format, start by converting to
35532  # unix format.
35533  new_path=`$CYGPATH -u "$path"`
35534
35535  # Now try to locate executable using which
35536  new_path=`$WHICH "$new_path" 2> /dev/null`
35537  # bat and cmd files are not always considered executable in cygwin causing which
35538  # to not find them
35539  if test "x$new_path" = x \
35540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35542    new_path=`$CYGPATH -u "$path"`
35543  fi
35544  if test "x$new_path" = x; then
35545    # Oops. Which didn't find the executable.
35546    # The splitting of arguments from the executable at a space might have been incorrect,
35547    # since paths with space are more likely in Windows. Give it another try with the whole
35548    # argument.
35549    path="$complete"
35550    arguments="EOL"
35551    new_path=`$CYGPATH -u "$path"`
35552    new_path=`$WHICH "$new_path" 2> /dev/null`
35553    # bat and cmd files are not always considered executable in cygwin causing which
35554    # to not find them
35555    if test "x$new_path" = x \
35556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35558      new_path=`$CYGPATH -u "$path"`
35559    fi
35560    if test "x$new_path" = x; then
35561      # It's still not found. Now this is an unrecoverable error.
35562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35563$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35564      has_space=`$ECHO "$complete" | $GREP " "`
35565      if test "x$has_space" != x; then
35566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35568      fi
35569      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35570    fi
35571  fi
35572
35573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35576  # "foo.exe" is OK but "foo" is an error.
35577  #
35578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35579  # It is also a way to make sure we got the proper file name for the real test later on.
35580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35581  if test "x$test_shortpath" = x; then
35582    # Short path failed, file does not exist as specified.
35583    # Try adding .exe or .cmd
35584    if test -f "${new_path}.exe"; then
35585      input_to_shortpath="${new_path}.exe"
35586    elif test -f "${new_path}.cmd"; then
35587      input_to_shortpath="${new_path}.cmd"
35588    else
35589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35590$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35593      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35594    fi
35595  else
35596    input_to_shortpath="$new_path"
35597  fi
35598
35599  # Call helper function which possibly converts this using DOS-style short mode.
35600  # If so, the updated path is stored in $new_path.
35601  new_path="$input_to_shortpath"
35602
35603  input_path="$input_to_shortpath"
35604  # Check if we need to convert this using DOS-style short mode. If the path
35605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35606  # take no chances and rewrite it.
35607  # Note: m4 eats our [], so we need to use [ and ] instead.
35608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35609  if test "x$has_forbidden_chars" != x; then
35610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35614      # Going to short mode and back again did indeed matter. Since short mode is
35615      # case insensitive, let's make it lowercase to improve readability.
35616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35617      # Now convert it back to Unix-style (cygpath)
35618      input_path=`$CYGPATH -u "$shortmode_path"`
35619      new_path="$input_path"
35620    fi
35621  fi
35622
35623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35624  if test "x$test_cygdrive_prefix" = x; then
35625    # As a simple fix, exclude /usr/bin since it's not a real path.
35626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35628      # a path prefixed by /cygdrive for fixpath to work.
35629      new_path="$CYGWIN_ROOT_PATH$input_path"
35630    fi
35631  fi
35632
35633  # remove trailing .exe if any
35634  new_path="${new_path/%.exe/}"
35635
35636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35637
35638  # First separate the path from the arguments. This will split at the first
35639  # space.
35640  complete="$LD"
35641  path="${complete%% *}"
35642  tmp="$complete EOL"
35643  arguments="${tmp#* }"
35644
35645  # Input might be given as Windows format, start by converting to
35646  # unix format.
35647  new_path="$path"
35648
35649  windows_path="$new_path"
35650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35651    unix_path=`$CYGPATH -u "$windows_path"`
35652    new_path="$unix_path"
35653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35655    new_path="$unix_path"
35656  fi
35657
35658
35659  # Now try to locate executable using which
35660  new_path=`$WHICH "$new_path" 2> /dev/null`
35661
35662  if test "x$new_path" = x; then
35663    # Oops. Which didn't find the executable.
35664    # The splitting of arguments from the executable at a space might have been incorrect,
35665    # since paths with space are more likely in Windows. Give it another try with the whole
35666    # argument.
35667    path="$complete"
35668    arguments="EOL"
35669    new_path="$path"
35670
35671  windows_path="$new_path"
35672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35673    unix_path=`$CYGPATH -u "$windows_path"`
35674    new_path="$unix_path"
35675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35677    new_path="$unix_path"
35678  fi
35679
35680
35681    new_path=`$WHICH "$new_path" 2> /dev/null`
35682    # bat and cmd files are not always considered executable in MSYS causing which
35683    # to not find them
35684    if test "x$new_path" = x \
35685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35687      new_path="$path"
35688
35689  windows_path="$new_path"
35690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35691    unix_path=`$CYGPATH -u "$windows_path"`
35692    new_path="$unix_path"
35693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35695    new_path="$unix_path"
35696  fi
35697
35698    fi
35699
35700    if test "x$new_path" = x; then
35701      # It's still not found. Now this is an unrecoverable error.
35702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35703$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35704      has_space=`$ECHO "$complete" | $GREP " "`
35705      if test "x$has_space" != x; then
35706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35708      fi
35709      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35710    fi
35711  fi
35712
35713  # Now new_path has a complete unix path to the binary
35714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35715    # Keep paths in /bin as-is, but remove trailing .exe if any
35716    new_path="${new_path/%.exe/}"
35717    # Do not save /bin paths to all_fixpath_prefixes!
35718  else
35719    # Not in mixed or Windows style, start by that.
35720    new_path=`cmd //c echo $new_path`
35721
35722  input_path="$new_path"
35723  # Check if we need to convert this using DOS-style short mode. If the path
35724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35725  # take no chances and rewrite it.
35726  # Note: m4 eats our [], so we need to use [ and ] instead.
35727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35728  if test "x$has_forbidden_chars" != x; then
35729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35731  fi
35732
35733    # Output is in $new_path
35734
35735  windows_path="$new_path"
35736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35737    unix_path=`$CYGPATH -u "$windows_path"`
35738    new_path="$unix_path"
35739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35741    new_path="$unix_path"
35742  fi
35743
35744    # remove trailing .exe if any
35745    new_path="${new_path/%.exe/}"
35746
35747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35749  fi
35750
35751    else
35752      # We're on a unix platform. Hooray! :)
35753      # First separate the path from the arguments. This will split at the first
35754      # space.
35755      complete="$LD"
35756      path="${complete%% *}"
35757      tmp="$complete EOL"
35758      arguments="${tmp#* }"
35759
35760      # Cannot rely on the command "which" here since it doesn't always work.
35761      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35762      if test -z "$is_absolute_path"; then
35763        # Path to executable is not absolute. Find it.
35764        IFS_save="$IFS"
35765        IFS=:
35766        for p in $PATH; do
35767          if test -f "$p/$path" && test -x "$p/$path"; then
35768            new_path="$p/$path"
35769            break
35770          fi
35771        done
35772        IFS="$IFS_save"
35773      else
35774        # This is an absolute path, we can use it without further modifications.
35775        new_path="$path"
35776      fi
35777
35778      if test "x$new_path" = x; then
35779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35780$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35781        has_space=`$ECHO "$complete" | $GREP " "`
35782        if test "x$has_space" != x; then
35783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35785        fi
35786        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35787      fi
35788    fi
35789
35790    # Now join together the path and the arguments once again
35791    if test "x$arguments" != xEOL; then
35792      new_complete="$new_path ${arguments% *}"
35793    else
35794      new_complete="$new_path"
35795    fi
35796
35797    if test "x$complete" != "x$new_complete"; then
35798      LD="$new_complete"
35799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35800$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35801    fi
35802  fi
35803
35804    # Verify that we indeed succeeded with this trick.
35805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35806$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35807    "$LD" --version > /dev/null
35808    if test $? -eq 0 ; then
35809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35810$as_echo "no" >&6; }
35811      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35812    else
35813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35814$as_echo "yes" >&6; }
35815    fi
35816    LDCXX="$LD"
35817  else
35818    # All other toolchains use the compiler to link.
35819    LD="$CC"
35820    LDCXX="$CXX"
35821  fi
35822
35823  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35824
35825
35826  #
35827  # Setup the assembler (AS)
35828  #
35829  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35830    # FIXME: should this really be solaris, or solstudio?
35831
35832
35833  # Publish this variable in the help.
35834
35835
35836  if [ -z "${AS+x}" ]; then
35837    # The variable is not set by user, try to locate tool using the code snippet
35838    for ac_prog in as
35839do
35840  # Extract the first word of "$ac_prog", so it can be a program name with args.
35841set dummy $ac_prog; ac_word=$2
35842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35843$as_echo_n "checking for $ac_word... " >&6; }
35844if ${ac_cv_path_AS+:} false; then :
35845  $as_echo_n "(cached) " >&6
35846else
35847  case $AS in
35848  [\\/]* | ?:[\\/]*)
35849  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35850  ;;
35851  *)
35852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35853for as_dir in $PATH
35854do
35855  IFS=$as_save_IFS
35856  test -z "$as_dir" && as_dir=.
35857    for ac_exec_ext in '' $ac_executable_extensions; do
35858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35859    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35861    break 2
35862  fi
35863done
35864  done
35865IFS=$as_save_IFS
35866
35867  ;;
35868esac
35869fi
35870AS=$ac_cv_path_AS
35871if test -n "$AS"; then
35872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35873$as_echo "$AS" >&6; }
35874else
35875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35876$as_echo "no" >&6; }
35877fi
35878
35879
35880  test -n "$AS" && break
35881done
35882
35883  else
35884    # The variable is set, but is it from the command line or the environment?
35885
35886    # Try to remove the string !AS! from our list.
35887    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35888    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35889      # If it failed, the variable was not from the command line. Ignore it,
35890      # but warn the user (except for BASH, which is always set by the calling BASH).
35891      if test "xAS" != xBASH; then
35892        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35893$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35894      fi
35895      # Try to locate tool using the code snippet
35896      for ac_prog in as
35897do
35898  # Extract the first word of "$ac_prog", so it can be a program name with args.
35899set dummy $ac_prog; ac_word=$2
35900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35901$as_echo_n "checking for $ac_word... " >&6; }
35902if ${ac_cv_path_AS+:} false; then :
35903  $as_echo_n "(cached) " >&6
35904else
35905  case $AS in
35906  [\\/]* | ?:[\\/]*)
35907  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35908  ;;
35909  *)
35910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35911for as_dir in $PATH
35912do
35913  IFS=$as_save_IFS
35914  test -z "$as_dir" && as_dir=.
35915    for ac_exec_ext in '' $ac_executable_extensions; do
35916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35917    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35919    break 2
35920  fi
35921done
35922  done
35923IFS=$as_save_IFS
35924
35925  ;;
35926esac
35927fi
35928AS=$ac_cv_path_AS
35929if test -n "$AS"; then
35930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35931$as_echo "$AS" >&6; }
35932else
35933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35934$as_echo "no" >&6; }
35935fi
35936
35937
35938  test -n "$AS" && break
35939done
35940
35941    else
35942      # If it succeeded, then it was overridden by the user. We will use it
35943      # for the tool.
35944
35945      # First remove it from the list of overridden variables, so we can test
35946      # for unknown variables in the end.
35947      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35948
35949      # Check if we try to supply an empty value
35950      if test "x$AS" = x; then
35951        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35952$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35954$as_echo_n "checking for AS... " >&6; }
35955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35956$as_echo "disabled" >&6; }
35957      else
35958        # Check if the provided tool contains a complete path.
35959        tool_specified="$AS"
35960        tool_basename="${tool_specified##*/}"
35961        if test "x$tool_basename" = "x$tool_specified"; then
35962          # A command without a complete path is provided, search $PATH.
35963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35964$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35965          # Extract the first word of "$tool_basename", so it can be a program name with args.
35966set dummy $tool_basename; ac_word=$2
35967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35968$as_echo_n "checking for $ac_word... " >&6; }
35969if ${ac_cv_path_AS+:} false; then :
35970  $as_echo_n "(cached) " >&6
35971else
35972  case $AS in
35973  [\\/]* | ?:[\\/]*)
35974  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35975  ;;
35976  *)
35977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35978for as_dir in $PATH
35979do
35980  IFS=$as_save_IFS
35981  test -z "$as_dir" && as_dir=.
35982    for ac_exec_ext in '' $ac_executable_extensions; do
35983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35984    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35986    break 2
35987  fi
35988done
35989  done
35990IFS=$as_save_IFS
35991
35992  ;;
35993esac
35994fi
35995AS=$ac_cv_path_AS
35996if test -n "$AS"; then
35997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35998$as_echo "$AS" >&6; }
35999else
36000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36001$as_echo "no" >&6; }
36002fi
36003
36004
36005          if test "x$AS" = x; then
36006            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36007          fi
36008        else
36009          # Otherwise we believe it is a complete path. Use it as it is.
36010          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36011$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36012          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36013$as_echo_n "checking for AS... " >&6; }
36014          if test ! -x "$tool_specified"; then
36015            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36016$as_echo "not found" >&6; }
36017            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36018          fi
36019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36020$as_echo "$tool_specified" >&6; }
36021        fi
36022      fi
36023    fi
36024
36025  fi
36026
36027
36028
36029  # Only process if variable expands to non-empty
36030
36031  if test "x$AS" != x; then
36032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36033
36034  # First separate the path from the arguments. This will split at the first
36035  # space.
36036  complete="$AS"
36037  path="${complete%% *}"
36038  tmp="$complete EOL"
36039  arguments="${tmp#* }"
36040
36041  # Input might be given as Windows format, start by converting to
36042  # unix format.
36043  new_path=`$CYGPATH -u "$path"`
36044
36045  # Now try to locate executable using which
36046  new_path=`$WHICH "$new_path" 2> /dev/null`
36047  # bat and cmd files are not always considered executable in cygwin causing which
36048  # to not find them
36049  if test "x$new_path" = x \
36050      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36051      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36052    new_path=`$CYGPATH -u "$path"`
36053  fi
36054  if test "x$new_path" = x; then
36055    # Oops. Which didn't find the executable.
36056    # The splitting of arguments from the executable at a space might have been incorrect,
36057    # since paths with space are more likely in Windows. Give it another try with the whole
36058    # argument.
36059    path="$complete"
36060    arguments="EOL"
36061    new_path=`$CYGPATH -u "$path"`
36062    new_path=`$WHICH "$new_path" 2> /dev/null`
36063    # bat and cmd files are not always considered executable in cygwin causing which
36064    # to not find them
36065    if test "x$new_path" = x \
36066        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36067        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36068      new_path=`$CYGPATH -u "$path"`
36069    fi
36070    if test "x$new_path" = x; then
36071      # It's still not found. Now this is an unrecoverable error.
36072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36073$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36074      has_space=`$ECHO "$complete" | $GREP " "`
36075      if test "x$has_space" != x; then
36076        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36077$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36078      fi
36079      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36080    fi
36081  fi
36082
36083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36086  # "foo.exe" is OK but "foo" is an error.
36087  #
36088  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36089  # It is also a way to make sure we got the proper file name for the real test later on.
36090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36091  if test "x$test_shortpath" = x; then
36092    # Short path failed, file does not exist as specified.
36093    # Try adding .exe or .cmd
36094    if test -f "${new_path}.exe"; then
36095      input_to_shortpath="${new_path}.exe"
36096    elif test -f "${new_path}.cmd"; then
36097      input_to_shortpath="${new_path}.cmd"
36098    else
36099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36100$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36101      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36102$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36103      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36104    fi
36105  else
36106    input_to_shortpath="$new_path"
36107  fi
36108
36109  # Call helper function which possibly converts this using DOS-style short mode.
36110  # If so, the updated path is stored in $new_path.
36111  new_path="$input_to_shortpath"
36112
36113  input_path="$input_to_shortpath"
36114  # Check if we need to convert this using DOS-style short mode. If the path
36115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36116  # take no chances and rewrite it.
36117  # Note: m4 eats our [], so we need to use [ and ] instead.
36118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36119  if test "x$has_forbidden_chars" != x; then
36120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36124      # Going to short mode and back again did indeed matter. Since short mode is
36125      # case insensitive, let's make it lowercase to improve readability.
36126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36127      # Now convert it back to Unix-style (cygpath)
36128      input_path=`$CYGPATH -u "$shortmode_path"`
36129      new_path="$input_path"
36130    fi
36131  fi
36132
36133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36134  if test "x$test_cygdrive_prefix" = x; then
36135    # As a simple fix, exclude /usr/bin since it's not a real path.
36136    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36138      # a path prefixed by /cygdrive for fixpath to work.
36139      new_path="$CYGWIN_ROOT_PATH$input_path"
36140    fi
36141  fi
36142
36143  # remove trailing .exe if any
36144  new_path="${new_path/%.exe/}"
36145
36146    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36147
36148  # First separate the path from the arguments. This will split at the first
36149  # space.
36150  complete="$AS"
36151  path="${complete%% *}"
36152  tmp="$complete EOL"
36153  arguments="${tmp#* }"
36154
36155  # Input might be given as Windows format, start by converting to
36156  # unix format.
36157  new_path="$path"
36158
36159  windows_path="$new_path"
36160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36161    unix_path=`$CYGPATH -u "$windows_path"`
36162    new_path="$unix_path"
36163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36165    new_path="$unix_path"
36166  fi
36167
36168
36169  # Now try to locate executable using which
36170  new_path=`$WHICH "$new_path" 2> /dev/null`
36171
36172  if test "x$new_path" = x; then
36173    # Oops. Which didn't find the executable.
36174    # The splitting of arguments from the executable at a space might have been incorrect,
36175    # since paths with space are more likely in Windows. Give it another try with the whole
36176    # argument.
36177    path="$complete"
36178    arguments="EOL"
36179    new_path="$path"
36180
36181  windows_path="$new_path"
36182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36183    unix_path=`$CYGPATH -u "$windows_path"`
36184    new_path="$unix_path"
36185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36187    new_path="$unix_path"
36188  fi
36189
36190
36191    new_path=`$WHICH "$new_path" 2> /dev/null`
36192    # bat and cmd files are not always considered executable in MSYS causing which
36193    # to not find them
36194    if test "x$new_path" = x \
36195        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36196        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36197      new_path="$path"
36198
36199  windows_path="$new_path"
36200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36201    unix_path=`$CYGPATH -u "$windows_path"`
36202    new_path="$unix_path"
36203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36205    new_path="$unix_path"
36206  fi
36207
36208    fi
36209
36210    if test "x$new_path" = x; then
36211      # It's still not found. Now this is an unrecoverable error.
36212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36213$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36214      has_space=`$ECHO "$complete" | $GREP " "`
36215      if test "x$has_space" != x; then
36216        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36217$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36218      fi
36219      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36220    fi
36221  fi
36222
36223  # Now new_path has a complete unix path to the binary
36224  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36225    # Keep paths in /bin as-is, but remove trailing .exe if any
36226    new_path="${new_path/%.exe/}"
36227    # Do not save /bin paths to all_fixpath_prefixes!
36228  else
36229    # Not in mixed or Windows style, start by that.
36230    new_path=`cmd //c echo $new_path`
36231
36232  input_path="$new_path"
36233  # Check if we need to convert this using DOS-style short mode. If the path
36234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36235  # take no chances and rewrite it.
36236  # Note: m4 eats our [], so we need to use [ and ] instead.
36237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36238  if test "x$has_forbidden_chars" != x; then
36239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36241  fi
36242
36243    # Output is in $new_path
36244
36245  windows_path="$new_path"
36246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36247    unix_path=`$CYGPATH -u "$windows_path"`
36248    new_path="$unix_path"
36249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36251    new_path="$unix_path"
36252  fi
36253
36254    # remove trailing .exe if any
36255    new_path="${new_path/%.exe/}"
36256
36257    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36258    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36259  fi
36260
36261    else
36262      # We're on a unix platform. Hooray! :)
36263      # First separate the path from the arguments. This will split at the first
36264      # space.
36265      complete="$AS"
36266      path="${complete%% *}"
36267      tmp="$complete EOL"
36268      arguments="${tmp#* }"
36269
36270      # Cannot rely on the command "which" here since it doesn't always work.
36271      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36272      if test -z "$is_absolute_path"; then
36273        # Path to executable is not absolute. Find it.
36274        IFS_save="$IFS"
36275        IFS=:
36276        for p in $PATH; do
36277          if test -f "$p/$path" && test -x "$p/$path"; then
36278            new_path="$p/$path"
36279            break
36280          fi
36281        done
36282        IFS="$IFS_save"
36283      else
36284        # This is an absolute path, we can use it without further modifications.
36285        new_path="$path"
36286      fi
36287
36288      if test "x$new_path" = x; then
36289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36290$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36291        has_space=`$ECHO "$complete" | $GREP " "`
36292        if test "x$has_space" != x; then
36293          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36294$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36295        fi
36296        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36297      fi
36298    fi
36299
36300    # Now join together the path and the arguments once again
36301    if test "x$arguments" != xEOL; then
36302      new_complete="$new_path ${arguments% *}"
36303    else
36304      new_complete="$new_path"
36305    fi
36306
36307    if test "x$complete" != "x$new_complete"; then
36308      AS="$new_complete"
36309      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36310$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36311    fi
36312  fi
36313
36314  else
36315    # FIXME: is this correct for microsoft?
36316    AS="$CC -c"
36317  fi
36318
36319
36320  #
36321  # Setup the archiver (AR)
36322  #
36323  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36324    # The corresponding ar tool is lib.exe (used to create static libraries)
36325    # Extract the first word of "lib", so it can be a program name with args.
36326set dummy lib; ac_word=$2
36327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36328$as_echo_n "checking for $ac_word... " >&6; }
36329if ${ac_cv_prog_AR+:} false; then :
36330  $as_echo_n "(cached) " >&6
36331else
36332  if test -n "$AR"; then
36333  ac_cv_prog_AR="$AR" # Let the user override the test.
36334else
36335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36336for as_dir in $PATH
36337do
36338  IFS=$as_save_IFS
36339  test -z "$as_dir" && as_dir=.
36340    for ac_exec_ext in '' $ac_executable_extensions; do
36341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36342    ac_cv_prog_AR="lib"
36343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36344    break 2
36345  fi
36346done
36347  done
36348IFS=$as_save_IFS
36349
36350fi
36351fi
36352AR=$ac_cv_prog_AR
36353if test -n "$AR"; then
36354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36355$as_echo "$AR" >&6; }
36356else
36357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36358$as_echo "no" >&6; }
36359fi
36360
36361
36362  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36363
36364
36365  # Publish this variable in the help.
36366
36367
36368  if [ -z "${AR+x}" ]; then
36369    # The variable is not set by user, try to locate tool using the code snippet
36370    if test -n "$ac_tool_prefix"; then
36371  for ac_prog in ar gcc-ar
36372  do
36373    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36374set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36376$as_echo_n "checking for $ac_word... " >&6; }
36377if ${ac_cv_prog_AR+:} false; then :
36378  $as_echo_n "(cached) " >&6
36379else
36380  if test -n "$AR"; then
36381  ac_cv_prog_AR="$AR" # Let the user override the test.
36382else
36383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36384for as_dir in $PATH
36385do
36386  IFS=$as_save_IFS
36387  test -z "$as_dir" && as_dir=.
36388    for ac_exec_ext in '' $ac_executable_extensions; do
36389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36390    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36392    break 2
36393  fi
36394done
36395  done
36396IFS=$as_save_IFS
36397
36398fi
36399fi
36400AR=$ac_cv_prog_AR
36401if test -n "$AR"; then
36402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36403$as_echo "$AR" >&6; }
36404else
36405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36406$as_echo "no" >&6; }
36407fi
36408
36409
36410    test -n "$AR" && break
36411  done
36412fi
36413if test -z "$AR"; then
36414  ac_ct_AR=$AR
36415  for ac_prog in ar gcc-ar
36416do
36417  # Extract the first word of "$ac_prog", so it can be a program name with args.
36418set dummy $ac_prog; ac_word=$2
36419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36420$as_echo_n "checking for $ac_word... " >&6; }
36421if ${ac_cv_prog_ac_ct_AR+:} false; then :
36422  $as_echo_n "(cached) " >&6
36423else
36424  if test -n "$ac_ct_AR"; then
36425  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36426else
36427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36428for as_dir in $PATH
36429do
36430  IFS=$as_save_IFS
36431  test -z "$as_dir" && as_dir=.
36432    for ac_exec_ext in '' $ac_executable_extensions; do
36433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36434    ac_cv_prog_ac_ct_AR="$ac_prog"
36435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36436    break 2
36437  fi
36438done
36439  done
36440IFS=$as_save_IFS
36441
36442fi
36443fi
36444ac_ct_AR=$ac_cv_prog_ac_ct_AR
36445if test -n "$ac_ct_AR"; then
36446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36447$as_echo "$ac_ct_AR" >&6; }
36448else
36449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36450$as_echo "no" >&6; }
36451fi
36452
36453
36454  test -n "$ac_ct_AR" && break
36455done
36456
36457  if test "x$ac_ct_AR" = x; then
36458    AR=""
36459  else
36460    case $cross_compiling:$ac_tool_warned in
36461yes:)
36462{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36463$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36464ac_tool_warned=yes ;;
36465esac
36466    AR=$ac_ct_AR
36467  fi
36468fi
36469
36470  else
36471    # The variable is set, but is it from the command line or the environment?
36472
36473    # Try to remove the string !AR! from our list.
36474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36476      # If it failed, the variable was not from the command line. Ignore it,
36477      # but warn the user (except for BASH, which is always set by the calling BASH).
36478      if test "xAR" != xBASH; then
36479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36480$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36481      fi
36482      # Try to locate tool using the code snippet
36483      if test -n "$ac_tool_prefix"; then
36484  for ac_prog in ar gcc-ar
36485  do
36486    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36487set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36489$as_echo_n "checking for $ac_word... " >&6; }
36490if ${ac_cv_prog_AR+:} false; then :
36491  $as_echo_n "(cached) " >&6
36492else
36493  if test -n "$AR"; then
36494  ac_cv_prog_AR="$AR" # Let the user override the test.
36495else
36496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36497for as_dir in $PATH
36498do
36499  IFS=$as_save_IFS
36500  test -z "$as_dir" && as_dir=.
36501    for ac_exec_ext in '' $ac_executable_extensions; do
36502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36503    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36505    break 2
36506  fi
36507done
36508  done
36509IFS=$as_save_IFS
36510
36511fi
36512fi
36513AR=$ac_cv_prog_AR
36514if test -n "$AR"; then
36515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36516$as_echo "$AR" >&6; }
36517else
36518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36519$as_echo "no" >&6; }
36520fi
36521
36522
36523    test -n "$AR" && break
36524  done
36525fi
36526if test -z "$AR"; then
36527  ac_ct_AR=$AR
36528  for ac_prog in ar gcc-ar
36529do
36530  # Extract the first word of "$ac_prog", so it can be a program name with args.
36531set dummy $ac_prog; ac_word=$2
36532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36533$as_echo_n "checking for $ac_word... " >&6; }
36534if ${ac_cv_prog_ac_ct_AR+:} false; then :
36535  $as_echo_n "(cached) " >&6
36536else
36537  if test -n "$ac_ct_AR"; then
36538  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36539else
36540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36541for as_dir in $PATH
36542do
36543  IFS=$as_save_IFS
36544  test -z "$as_dir" && as_dir=.
36545    for ac_exec_ext in '' $ac_executable_extensions; do
36546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36547    ac_cv_prog_ac_ct_AR="$ac_prog"
36548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36549    break 2
36550  fi
36551done
36552  done
36553IFS=$as_save_IFS
36554
36555fi
36556fi
36557ac_ct_AR=$ac_cv_prog_ac_ct_AR
36558if test -n "$ac_ct_AR"; then
36559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36560$as_echo "$ac_ct_AR" >&6; }
36561else
36562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36563$as_echo "no" >&6; }
36564fi
36565
36566
36567  test -n "$ac_ct_AR" && break
36568done
36569
36570  if test "x$ac_ct_AR" = x; then
36571    AR=""
36572  else
36573    case $cross_compiling:$ac_tool_warned in
36574yes:)
36575{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36576$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36577ac_tool_warned=yes ;;
36578esac
36579    AR=$ac_ct_AR
36580  fi
36581fi
36582
36583    else
36584      # If it succeeded, then it was overridden by the user. We will use it
36585      # for the tool.
36586
36587      # First remove it from the list of overridden variables, so we can test
36588      # for unknown variables in the end.
36589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36590
36591      # Check if we try to supply an empty value
36592      if test "x$AR" = x; then
36593        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36594$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36596$as_echo_n "checking for AR... " >&6; }
36597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36598$as_echo "disabled" >&6; }
36599      else
36600        # Check if the provided tool contains a complete path.
36601        tool_specified="$AR"
36602        tool_basename="${tool_specified##*/}"
36603        if test "x$tool_basename" = "x$tool_specified"; then
36604          # A command without a complete path is provided, search $PATH.
36605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36606$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36607          # Extract the first word of "$tool_basename", so it can be a program name with args.
36608set dummy $tool_basename; ac_word=$2
36609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36610$as_echo_n "checking for $ac_word... " >&6; }
36611if ${ac_cv_path_AR+:} false; then :
36612  $as_echo_n "(cached) " >&6
36613else
36614  case $AR in
36615  [\\/]* | ?:[\\/]*)
36616  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36617  ;;
36618  *)
36619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36620for as_dir in $PATH
36621do
36622  IFS=$as_save_IFS
36623  test -z "$as_dir" && as_dir=.
36624    for ac_exec_ext in '' $ac_executable_extensions; do
36625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36626    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36628    break 2
36629  fi
36630done
36631  done
36632IFS=$as_save_IFS
36633
36634  ;;
36635esac
36636fi
36637AR=$ac_cv_path_AR
36638if test -n "$AR"; then
36639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36640$as_echo "$AR" >&6; }
36641else
36642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36643$as_echo "no" >&6; }
36644fi
36645
36646
36647          if test "x$AR" = x; then
36648            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36649          fi
36650        else
36651          # Otherwise we believe it is a complete path. Use it as it is.
36652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36653$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36654          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36655$as_echo_n "checking for AR... " >&6; }
36656          if test ! -x "$tool_specified"; then
36657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36658$as_echo "not found" >&6; }
36659            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36660          fi
36661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36662$as_echo "$tool_specified" >&6; }
36663        fi
36664      fi
36665    fi
36666
36667  fi
36668
36669
36670  else
36671
36672
36673  # Publish this variable in the help.
36674
36675
36676  if [ -z "${AR+x}" ]; then
36677    # The variable is not set by user, try to locate tool using the code snippet
36678    if test -n "$ac_tool_prefix"; then
36679  for ac_prog in ar
36680  do
36681    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36682set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36684$as_echo_n "checking for $ac_word... " >&6; }
36685if ${ac_cv_prog_AR+:} false; then :
36686  $as_echo_n "(cached) " >&6
36687else
36688  if test -n "$AR"; then
36689  ac_cv_prog_AR="$AR" # Let the user override the test.
36690else
36691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36692for as_dir in $PATH
36693do
36694  IFS=$as_save_IFS
36695  test -z "$as_dir" && as_dir=.
36696    for ac_exec_ext in '' $ac_executable_extensions; do
36697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36698    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36700    break 2
36701  fi
36702done
36703  done
36704IFS=$as_save_IFS
36705
36706fi
36707fi
36708AR=$ac_cv_prog_AR
36709if test -n "$AR"; then
36710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36711$as_echo "$AR" >&6; }
36712else
36713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36714$as_echo "no" >&6; }
36715fi
36716
36717
36718    test -n "$AR" && break
36719  done
36720fi
36721if test -z "$AR"; then
36722  ac_ct_AR=$AR
36723  for ac_prog in ar
36724do
36725  # Extract the first word of "$ac_prog", so it can be a program name with args.
36726set dummy $ac_prog; ac_word=$2
36727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36728$as_echo_n "checking for $ac_word... " >&6; }
36729if ${ac_cv_prog_ac_ct_AR+:} false; then :
36730  $as_echo_n "(cached) " >&6
36731else
36732  if test -n "$ac_ct_AR"; then
36733  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36734else
36735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36736for as_dir in $PATH
36737do
36738  IFS=$as_save_IFS
36739  test -z "$as_dir" && as_dir=.
36740    for ac_exec_ext in '' $ac_executable_extensions; do
36741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36742    ac_cv_prog_ac_ct_AR="$ac_prog"
36743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36744    break 2
36745  fi
36746done
36747  done
36748IFS=$as_save_IFS
36749
36750fi
36751fi
36752ac_ct_AR=$ac_cv_prog_ac_ct_AR
36753if test -n "$ac_ct_AR"; then
36754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36755$as_echo "$ac_ct_AR" >&6; }
36756else
36757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36758$as_echo "no" >&6; }
36759fi
36760
36761
36762  test -n "$ac_ct_AR" && break
36763done
36764
36765  if test "x$ac_ct_AR" = x; then
36766    AR=""
36767  else
36768    case $cross_compiling:$ac_tool_warned in
36769yes:)
36770{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36771$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36772ac_tool_warned=yes ;;
36773esac
36774    AR=$ac_ct_AR
36775  fi
36776fi
36777
36778  else
36779    # The variable is set, but is it from the command line or the environment?
36780
36781    # Try to remove the string !AR! from our list.
36782    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36783    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36784      # If it failed, the variable was not from the command line. Ignore it,
36785      # but warn the user (except for BASH, which is always set by the calling BASH).
36786      if test "xAR" != xBASH; then
36787        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36788$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36789      fi
36790      # Try to locate tool using the code snippet
36791      if test -n "$ac_tool_prefix"; then
36792  for ac_prog in ar
36793  do
36794    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36795set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36797$as_echo_n "checking for $ac_word... " >&6; }
36798if ${ac_cv_prog_AR+:} false; then :
36799  $as_echo_n "(cached) " >&6
36800else
36801  if test -n "$AR"; then
36802  ac_cv_prog_AR="$AR" # Let the user override the test.
36803else
36804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36805for as_dir in $PATH
36806do
36807  IFS=$as_save_IFS
36808  test -z "$as_dir" && as_dir=.
36809    for ac_exec_ext in '' $ac_executable_extensions; do
36810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36811    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36813    break 2
36814  fi
36815done
36816  done
36817IFS=$as_save_IFS
36818
36819fi
36820fi
36821AR=$ac_cv_prog_AR
36822if test -n "$AR"; then
36823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36824$as_echo "$AR" >&6; }
36825else
36826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36827$as_echo "no" >&6; }
36828fi
36829
36830
36831    test -n "$AR" && break
36832  done
36833fi
36834if test -z "$AR"; then
36835  ac_ct_AR=$AR
36836  for ac_prog in ar
36837do
36838  # Extract the first word of "$ac_prog", so it can be a program name with args.
36839set dummy $ac_prog; ac_word=$2
36840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36841$as_echo_n "checking for $ac_word... " >&6; }
36842if ${ac_cv_prog_ac_ct_AR+:} false; then :
36843  $as_echo_n "(cached) " >&6
36844else
36845  if test -n "$ac_ct_AR"; then
36846  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36847else
36848as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36849for as_dir in $PATH
36850do
36851  IFS=$as_save_IFS
36852  test -z "$as_dir" && as_dir=.
36853    for ac_exec_ext in '' $ac_executable_extensions; do
36854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36855    ac_cv_prog_ac_ct_AR="$ac_prog"
36856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36857    break 2
36858  fi
36859done
36860  done
36861IFS=$as_save_IFS
36862
36863fi
36864fi
36865ac_ct_AR=$ac_cv_prog_ac_ct_AR
36866if test -n "$ac_ct_AR"; then
36867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36868$as_echo "$ac_ct_AR" >&6; }
36869else
36870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36871$as_echo "no" >&6; }
36872fi
36873
36874
36875  test -n "$ac_ct_AR" && break
36876done
36877
36878  if test "x$ac_ct_AR" = x; then
36879    AR=""
36880  else
36881    case $cross_compiling:$ac_tool_warned in
36882yes:)
36883{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36884$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36885ac_tool_warned=yes ;;
36886esac
36887    AR=$ac_ct_AR
36888  fi
36889fi
36890
36891    else
36892      # If it succeeded, then it was overridden by the user. We will use it
36893      # for the tool.
36894
36895      # First remove it from the list of overridden variables, so we can test
36896      # for unknown variables in the end.
36897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36898
36899      # Check if we try to supply an empty value
36900      if test "x$AR" = x; then
36901        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36902$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36903        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36904$as_echo_n "checking for AR... " >&6; }
36905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36906$as_echo "disabled" >&6; }
36907      else
36908        # Check if the provided tool contains a complete path.
36909        tool_specified="$AR"
36910        tool_basename="${tool_specified##*/}"
36911        if test "x$tool_basename" = "x$tool_specified"; then
36912          # A command without a complete path is provided, search $PATH.
36913          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36914$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36915          # Extract the first word of "$tool_basename", so it can be a program name with args.
36916set dummy $tool_basename; ac_word=$2
36917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36918$as_echo_n "checking for $ac_word... " >&6; }
36919if ${ac_cv_path_AR+:} false; then :
36920  $as_echo_n "(cached) " >&6
36921else
36922  case $AR in
36923  [\\/]* | ?:[\\/]*)
36924  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36925  ;;
36926  *)
36927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36928for as_dir in $PATH
36929do
36930  IFS=$as_save_IFS
36931  test -z "$as_dir" && as_dir=.
36932    for ac_exec_ext in '' $ac_executable_extensions; do
36933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36934    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36936    break 2
36937  fi
36938done
36939  done
36940IFS=$as_save_IFS
36941
36942  ;;
36943esac
36944fi
36945AR=$ac_cv_path_AR
36946if test -n "$AR"; then
36947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36948$as_echo "$AR" >&6; }
36949else
36950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36951$as_echo "no" >&6; }
36952fi
36953
36954
36955          if test "x$AR" = x; then
36956            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36957          fi
36958        else
36959          # Otherwise we believe it is a complete path. Use it as it is.
36960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36961$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36962          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36963$as_echo_n "checking for AR... " >&6; }
36964          if test ! -x "$tool_specified"; then
36965            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36966$as_echo "not found" >&6; }
36967            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36968          fi
36969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36970$as_echo "$tool_specified" >&6; }
36971        fi
36972      fi
36973    fi
36974
36975  fi
36976
36977
36978  fi
36979
36980  # Only process if variable expands to non-empty
36981
36982  if test "x$AR" != x; then
36983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36984
36985  # First separate the path from the arguments. This will split at the first
36986  # space.
36987  complete="$AR"
36988  path="${complete%% *}"
36989  tmp="$complete EOL"
36990  arguments="${tmp#* }"
36991
36992  # Input might be given as Windows format, start by converting to
36993  # unix format.
36994  new_path=`$CYGPATH -u "$path"`
36995
36996  # Now try to locate executable using which
36997  new_path=`$WHICH "$new_path" 2> /dev/null`
36998  # bat and cmd files are not always considered executable in cygwin causing which
36999  # to not find them
37000  if test "x$new_path" = x \
37001      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37002      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37003    new_path=`$CYGPATH -u "$path"`
37004  fi
37005  if test "x$new_path" = x; then
37006    # Oops. Which didn't find the executable.
37007    # The splitting of arguments from the executable at a space might have been incorrect,
37008    # since paths with space are more likely in Windows. Give it another try with the whole
37009    # argument.
37010    path="$complete"
37011    arguments="EOL"
37012    new_path=`$CYGPATH -u "$path"`
37013    new_path=`$WHICH "$new_path" 2> /dev/null`
37014    # bat and cmd files are not always considered executable in cygwin causing which
37015    # to not find them
37016    if test "x$new_path" = x \
37017        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37018        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37019      new_path=`$CYGPATH -u "$path"`
37020    fi
37021    if test "x$new_path" = x; then
37022      # It's still not found. Now this is an unrecoverable error.
37023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37024$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37025      has_space=`$ECHO "$complete" | $GREP " "`
37026      if test "x$has_space" != x; then
37027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37029      fi
37030      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37031    fi
37032  fi
37033
37034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37037  # "foo.exe" is OK but "foo" is an error.
37038  #
37039  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37040  # It is also a way to make sure we got the proper file name for the real test later on.
37041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37042  if test "x$test_shortpath" = x; then
37043    # Short path failed, file does not exist as specified.
37044    # Try adding .exe or .cmd
37045    if test -f "${new_path}.exe"; then
37046      input_to_shortpath="${new_path}.exe"
37047    elif test -f "${new_path}.cmd"; then
37048      input_to_shortpath="${new_path}.cmd"
37049    else
37050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37051$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37052      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37053$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37054      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37055    fi
37056  else
37057    input_to_shortpath="$new_path"
37058  fi
37059
37060  # Call helper function which possibly converts this using DOS-style short mode.
37061  # If so, the updated path is stored in $new_path.
37062  new_path="$input_to_shortpath"
37063
37064  input_path="$input_to_shortpath"
37065  # Check if we need to convert this using DOS-style short mode. If the path
37066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37067  # take no chances and rewrite it.
37068  # Note: m4 eats our [], so we need to use [ and ] instead.
37069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37070  if test "x$has_forbidden_chars" != x; then
37071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37075      # Going to short mode and back again did indeed matter. Since short mode is
37076      # case insensitive, let's make it lowercase to improve readability.
37077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37078      # Now convert it back to Unix-style (cygpath)
37079      input_path=`$CYGPATH -u "$shortmode_path"`
37080      new_path="$input_path"
37081    fi
37082  fi
37083
37084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37085  if test "x$test_cygdrive_prefix" = x; then
37086    # As a simple fix, exclude /usr/bin since it's not a real path.
37087    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37089      # a path prefixed by /cygdrive for fixpath to work.
37090      new_path="$CYGWIN_ROOT_PATH$input_path"
37091    fi
37092  fi
37093
37094  # remove trailing .exe if any
37095  new_path="${new_path/%.exe/}"
37096
37097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37098
37099  # First separate the path from the arguments. This will split at the first
37100  # space.
37101  complete="$AR"
37102  path="${complete%% *}"
37103  tmp="$complete EOL"
37104  arguments="${tmp#* }"
37105
37106  # Input might be given as Windows format, start by converting to
37107  # unix format.
37108  new_path="$path"
37109
37110  windows_path="$new_path"
37111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37112    unix_path=`$CYGPATH -u "$windows_path"`
37113    new_path="$unix_path"
37114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37116    new_path="$unix_path"
37117  fi
37118
37119
37120  # Now try to locate executable using which
37121  new_path=`$WHICH "$new_path" 2> /dev/null`
37122
37123  if test "x$new_path" = x; then
37124    # Oops. Which didn't find the executable.
37125    # The splitting of arguments from the executable at a space might have been incorrect,
37126    # since paths with space are more likely in Windows. Give it another try with the whole
37127    # argument.
37128    path="$complete"
37129    arguments="EOL"
37130    new_path="$path"
37131
37132  windows_path="$new_path"
37133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37134    unix_path=`$CYGPATH -u "$windows_path"`
37135    new_path="$unix_path"
37136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37138    new_path="$unix_path"
37139  fi
37140
37141
37142    new_path=`$WHICH "$new_path" 2> /dev/null`
37143    # bat and cmd files are not always considered executable in MSYS causing which
37144    # to not find them
37145    if test "x$new_path" = x \
37146        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37147        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37148      new_path="$path"
37149
37150  windows_path="$new_path"
37151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37152    unix_path=`$CYGPATH -u "$windows_path"`
37153    new_path="$unix_path"
37154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37156    new_path="$unix_path"
37157  fi
37158
37159    fi
37160
37161    if test "x$new_path" = x; then
37162      # It's still not found. Now this is an unrecoverable error.
37163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37164$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37165      has_space=`$ECHO "$complete" | $GREP " "`
37166      if test "x$has_space" != x; then
37167        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37168$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37169      fi
37170      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37171    fi
37172  fi
37173
37174  # Now new_path has a complete unix path to the binary
37175  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37176    # Keep paths in /bin as-is, but remove trailing .exe if any
37177    new_path="${new_path/%.exe/}"
37178    # Do not save /bin paths to all_fixpath_prefixes!
37179  else
37180    # Not in mixed or Windows style, start by that.
37181    new_path=`cmd //c echo $new_path`
37182
37183  input_path="$new_path"
37184  # Check if we need to convert this using DOS-style short mode. If the path
37185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37186  # take no chances and rewrite it.
37187  # Note: m4 eats our [], so we need to use [ and ] instead.
37188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37189  if test "x$has_forbidden_chars" != x; then
37190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37192  fi
37193
37194    # Output is in $new_path
37195
37196  windows_path="$new_path"
37197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37198    unix_path=`$CYGPATH -u "$windows_path"`
37199    new_path="$unix_path"
37200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37202    new_path="$unix_path"
37203  fi
37204
37205    # remove trailing .exe if any
37206    new_path="${new_path/%.exe/}"
37207
37208    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37209    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37210  fi
37211
37212    else
37213      # We're on a unix platform. Hooray! :)
37214      # First separate the path from the arguments. This will split at the first
37215      # space.
37216      complete="$AR"
37217      path="${complete%% *}"
37218      tmp="$complete EOL"
37219      arguments="${tmp#* }"
37220
37221      # Cannot rely on the command "which" here since it doesn't always work.
37222      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37223      if test -z "$is_absolute_path"; then
37224        # Path to executable is not absolute. Find it.
37225        IFS_save="$IFS"
37226        IFS=:
37227        for p in $PATH; do
37228          if test -f "$p/$path" && test -x "$p/$path"; then
37229            new_path="$p/$path"
37230            break
37231          fi
37232        done
37233        IFS="$IFS_save"
37234      else
37235        # This is an absolute path, we can use it without further modifications.
37236        new_path="$path"
37237      fi
37238
37239      if test "x$new_path" = x; then
37240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37241$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37242        has_space=`$ECHO "$complete" | $GREP " "`
37243        if test "x$has_space" != x; then
37244          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37245$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37246        fi
37247        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37248      fi
37249    fi
37250
37251    # Now join together the path and the arguments once again
37252    if test "x$arguments" != xEOL; then
37253      new_complete="$new_path ${arguments% *}"
37254    else
37255      new_complete="$new_path"
37256    fi
37257
37258    if test "x$complete" != "x$new_complete"; then
37259      AR="$new_complete"
37260      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37261$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37262    fi
37263  fi
37264
37265
37266
37267  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37268
37269
37270  # Publish this variable in the help.
37271
37272
37273  if [ -z "${LIPO+x}" ]; then
37274    # The variable is not set by user, try to locate tool using the code snippet
37275    for ac_prog in lipo
37276do
37277  # Extract the first word of "$ac_prog", so it can be a program name with args.
37278set dummy $ac_prog; ac_word=$2
37279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37280$as_echo_n "checking for $ac_word... " >&6; }
37281if ${ac_cv_path_LIPO+:} false; then :
37282  $as_echo_n "(cached) " >&6
37283else
37284  case $LIPO in
37285  [\\/]* | ?:[\\/]*)
37286  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37287  ;;
37288  *)
37289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37290for as_dir in $PATH
37291do
37292  IFS=$as_save_IFS
37293  test -z "$as_dir" && as_dir=.
37294    for ac_exec_ext in '' $ac_executable_extensions; do
37295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37296    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37298    break 2
37299  fi
37300done
37301  done
37302IFS=$as_save_IFS
37303
37304  ;;
37305esac
37306fi
37307LIPO=$ac_cv_path_LIPO
37308if test -n "$LIPO"; then
37309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37310$as_echo "$LIPO" >&6; }
37311else
37312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37313$as_echo "no" >&6; }
37314fi
37315
37316
37317  test -n "$LIPO" && break
37318done
37319
37320  else
37321    # The variable is set, but is it from the command line or the environment?
37322
37323    # Try to remove the string !LIPO! from our list.
37324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37326      # If it failed, the variable was not from the command line. Ignore it,
37327      # but warn the user (except for BASH, which is always set by the calling BASH).
37328      if test "xLIPO" != xBASH; then
37329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37330$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37331      fi
37332      # Try to locate tool using the code snippet
37333      for ac_prog in lipo
37334do
37335  # Extract the first word of "$ac_prog", so it can be a program name with args.
37336set dummy $ac_prog; ac_word=$2
37337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37338$as_echo_n "checking for $ac_word... " >&6; }
37339if ${ac_cv_path_LIPO+:} false; then :
37340  $as_echo_n "(cached) " >&6
37341else
37342  case $LIPO in
37343  [\\/]* | ?:[\\/]*)
37344  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37345  ;;
37346  *)
37347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37348for as_dir in $PATH
37349do
37350  IFS=$as_save_IFS
37351  test -z "$as_dir" && as_dir=.
37352    for ac_exec_ext in '' $ac_executable_extensions; do
37353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37354    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37356    break 2
37357  fi
37358done
37359  done
37360IFS=$as_save_IFS
37361
37362  ;;
37363esac
37364fi
37365LIPO=$ac_cv_path_LIPO
37366if test -n "$LIPO"; then
37367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37368$as_echo "$LIPO" >&6; }
37369else
37370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37371$as_echo "no" >&6; }
37372fi
37373
37374
37375  test -n "$LIPO" && break
37376done
37377
37378    else
37379      # If it succeeded, then it was overridden by the user. We will use it
37380      # for the tool.
37381
37382      # First remove it from the list of overridden variables, so we can test
37383      # for unknown variables in the end.
37384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37385
37386      # Check if we try to supply an empty value
37387      if test "x$LIPO" = x; then
37388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37389$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37391$as_echo_n "checking for LIPO... " >&6; }
37392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37393$as_echo "disabled" >&6; }
37394      else
37395        # Check if the provided tool contains a complete path.
37396        tool_specified="$LIPO"
37397        tool_basename="${tool_specified##*/}"
37398        if test "x$tool_basename" = "x$tool_specified"; then
37399          # A command without a complete path is provided, search $PATH.
37400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37401$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37402          # Extract the first word of "$tool_basename", so it can be a program name with args.
37403set dummy $tool_basename; ac_word=$2
37404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37405$as_echo_n "checking for $ac_word... " >&6; }
37406if ${ac_cv_path_LIPO+:} false; then :
37407  $as_echo_n "(cached) " >&6
37408else
37409  case $LIPO in
37410  [\\/]* | ?:[\\/]*)
37411  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37412  ;;
37413  *)
37414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37415for as_dir in $PATH
37416do
37417  IFS=$as_save_IFS
37418  test -z "$as_dir" && as_dir=.
37419    for ac_exec_ext in '' $ac_executable_extensions; do
37420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37421    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37423    break 2
37424  fi
37425done
37426  done
37427IFS=$as_save_IFS
37428
37429  ;;
37430esac
37431fi
37432LIPO=$ac_cv_path_LIPO
37433if test -n "$LIPO"; then
37434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37435$as_echo "$LIPO" >&6; }
37436else
37437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37438$as_echo "no" >&6; }
37439fi
37440
37441
37442          if test "x$LIPO" = x; then
37443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37444          fi
37445        else
37446          # Otherwise we believe it is a complete path. Use it as it is.
37447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37448$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37450$as_echo_n "checking for LIPO... " >&6; }
37451          if test ! -x "$tool_specified"; then
37452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37453$as_echo "not found" >&6; }
37454            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37455          fi
37456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37457$as_echo "$tool_specified" >&6; }
37458        fi
37459      fi
37460    fi
37461
37462  fi
37463
37464
37465
37466  # Only process if variable expands to non-empty
37467
37468  if test "x$LIPO" != x; then
37469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37470
37471  # First separate the path from the arguments. This will split at the first
37472  # space.
37473  complete="$LIPO"
37474  path="${complete%% *}"
37475  tmp="$complete EOL"
37476  arguments="${tmp#* }"
37477
37478  # Input might be given as Windows format, start by converting to
37479  # unix format.
37480  new_path=`$CYGPATH -u "$path"`
37481
37482  # Now try to locate executable using which
37483  new_path=`$WHICH "$new_path" 2> /dev/null`
37484  # bat and cmd files are not always considered executable in cygwin causing which
37485  # to not find them
37486  if test "x$new_path" = x \
37487      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37488      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37489    new_path=`$CYGPATH -u "$path"`
37490  fi
37491  if test "x$new_path" = x; then
37492    # Oops. Which didn't find the executable.
37493    # The splitting of arguments from the executable at a space might have been incorrect,
37494    # since paths with space are more likely in Windows. Give it another try with the whole
37495    # argument.
37496    path="$complete"
37497    arguments="EOL"
37498    new_path=`$CYGPATH -u "$path"`
37499    new_path=`$WHICH "$new_path" 2> /dev/null`
37500    # bat and cmd files are not always considered executable in cygwin causing which
37501    # to not find them
37502    if test "x$new_path" = x \
37503        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37504        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37505      new_path=`$CYGPATH -u "$path"`
37506    fi
37507    if test "x$new_path" = x; then
37508      # It's still not found. Now this is an unrecoverable error.
37509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37510$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37511      has_space=`$ECHO "$complete" | $GREP " "`
37512      if test "x$has_space" != x; then
37513        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37514$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37515      fi
37516      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37517    fi
37518  fi
37519
37520  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37521  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37522  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37523  # "foo.exe" is OK but "foo" is an error.
37524  #
37525  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37526  # It is also a way to make sure we got the proper file name for the real test later on.
37527  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37528  if test "x$test_shortpath" = x; then
37529    # Short path failed, file does not exist as specified.
37530    # Try adding .exe or .cmd
37531    if test -f "${new_path}.exe"; then
37532      input_to_shortpath="${new_path}.exe"
37533    elif test -f "${new_path}.cmd"; then
37534      input_to_shortpath="${new_path}.cmd"
37535    else
37536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37537$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37538      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37539$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37540      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37541    fi
37542  else
37543    input_to_shortpath="$new_path"
37544  fi
37545
37546  # Call helper function which possibly converts this using DOS-style short mode.
37547  # If so, the updated path is stored in $new_path.
37548  new_path="$input_to_shortpath"
37549
37550  input_path="$input_to_shortpath"
37551  # Check if we need to convert this using DOS-style short mode. If the path
37552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37553  # take no chances and rewrite it.
37554  # Note: m4 eats our [], so we need to use [ and ] instead.
37555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37556  if test "x$has_forbidden_chars" != x; then
37557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37561      # Going to short mode and back again did indeed matter. Since short mode is
37562      # case insensitive, let's make it lowercase to improve readability.
37563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37564      # Now convert it back to Unix-style (cygpath)
37565      input_path=`$CYGPATH -u "$shortmode_path"`
37566      new_path="$input_path"
37567    fi
37568  fi
37569
37570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37571  if test "x$test_cygdrive_prefix" = x; then
37572    # As a simple fix, exclude /usr/bin since it's not a real path.
37573    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37575      # a path prefixed by /cygdrive for fixpath to work.
37576      new_path="$CYGWIN_ROOT_PATH$input_path"
37577    fi
37578  fi
37579
37580  # remove trailing .exe if any
37581  new_path="${new_path/%.exe/}"
37582
37583    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37584
37585  # First separate the path from the arguments. This will split at the first
37586  # space.
37587  complete="$LIPO"
37588  path="${complete%% *}"
37589  tmp="$complete EOL"
37590  arguments="${tmp#* }"
37591
37592  # Input might be given as Windows format, start by converting to
37593  # unix format.
37594  new_path="$path"
37595
37596  windows_path="$new_path"
37597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37598    unix_path=`$CYGPATH -u "$windows_path"`
37599    new_path="$unix_path"
37600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37602    new_path="$unix_path"
37603  fi
37604
37605
37606  # Now try to locate executable using which
37607  new_path=`$WHICH "$new_path" 2> /dev/null`
37608
37609  if test "x$new_path" = x; then
37610    # Oops. Which didn't find the executable.
37611    # The splitting of arguments from the executable at a space might have been incorrect,
37612    # since paths with space are more likely in Windows. Give it another try with the whole
37613    # argument.
37614    path="$complete"
37615    arguments="EOL"
37616    new_path="$path"
37617
37618  windows_path="$new_path"
37619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37620    unix_path=`$CYGPATH -u "$windows_path"`
37621    new_path="$unix_path"
37622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37624    new_path="$unix_path"
37625  fi
37626
37627
37628    new_path=`$WHICH "$new_path" 2> /dev/null`
37629    # bat and cmd files are not always considered executable in MSYS causing which
37630    # to not find them
37631    if test "x$new_path" = x \
37632        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37633        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37634      new_path="$path"
37635
37636  windows_path="$new_path"
37637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37638    unix_path=`$CYGPATH -u "$windows_path"`
37639    new_path="$unix_path"
37640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37642    new_path="$unix_path"
37643  fi
37644
37645    fi
37646
37647    if test "x$new_path" = x; then
37648      # It's still not found. Now this is an unrecoverable error.
37649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37650$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37651      has_space=`$ECHO "$complete" | $GREP " "`
37652      if test "x$has_space" != x; then
37653        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37654$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37655      fi
37656      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37657    fi
37658  fi
37659
37660  # Now new_path has a complete unix path to the binary
37661  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37662    # Keep paths in /bin as-is, but remove trailing .exe if any
37663    new_path="${new_path/%.exe/}"
37664    # Do not save /bin paths to all_fixpath_prefixes!
37665  else
37666    # Not in mixed or Windows style, start by that.
37667    new_path=`cmd //c echo $new_path`
37668
37669  input_path="$new_path"
37670  # Check if we need to convert this using DOS-style short mode. If the path
37671  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37672  # take no chances and rewrite it.
37673  # Note: m4 eats our [], so we need to use [ and ] instead.
37674  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37675  if test "x$has_forbidden_chars" != x; then
37676    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37677    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37678  fi
37679
37680    # Output is in $new_path
37681
37682  windows_path="$new_path"
37683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37684    unix_path=`$CYGPATH -u "$windows_path"`
37685    new_path="$unix_path"
37686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37688    new_path="$unix_path"
37689  fi
37690
37691    # remove trailing .exe if any
37692    new_path="${new_path/%.exe/}"
37693
37694    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37695    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37696  fi
37697
37698    else
37699      # We're on a unix platform. Hooray! :)
37700      # First separate the path from the arguments. This will split at the first
37701      # space.
37702      complete="$LIPO"
37703      path="${complete%% *}"
37704      tmp="$complete EOL"
37705      arguments="${tmp#* }"
37706
37707      # Cannot rely on the command "which" here since it doesn't always work.
37708      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37709      if test -z "$is_absolute_path"; then
37710        # Path to executable is not absolute. Find it.
37711        IFS_save="$IFS"
37712        IFS=:
37713        for p in $PATH; do
37714          if test -f "$p/$path" && test -x "$p/$path"; then
37715            new_path="$p/$path"
37716            break
37717          fi
37718        done
37719        IFS="$IFS_save"
37720      else
37721        # This is an absolute path, we can use it without further modifications.
37722        new_path="$path"
37723      fi
37724
37725      if test "x$new_path" = x; then
37726        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37727$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37728        has_space=`$ECHO "$complete" | $GREP " "`
37729        if test "x$has_space" != x; then
37730          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37731$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37732        fi
37733        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37734      fi
37735    fi
37736
37737    # Now join together the path and the arguments once again
37738    if test "x$arguments" != xEOL; then
37739      new_complete="$new_path ${arguments% *}"
37740    else
37741      new_complete="$new_path"
37742    fi
37743
37744    if test "x$complete" != "x$new_complete"; then
37745      LIPO="$new_complete"
37746      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37747$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37748    fi
37749  fi
37750
37751  fi
37752
37753  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37754    # Extract the first word of "mt", so it can be a program name with args.
37755set dummy mt; ac_word=$2
37756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37757$as_echo_n "checking for $ac_word... " >&6; }
37758if ${ac_cv_prog_MT+:} false; then :
37759  $as_echo_n "(cached) " >&6
37760else
37761  if test -n "$MT"; then
37762  ac_cv_prog_MT="$MT" # Let the user override the test.
37763else
37764  ac_prog_rejected=no
37765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37766for as_dir in $PATH
37767do
37768  IFS=$as_save_IFS
37769  test -z "$as_dir" && as_dir=.
37770    for ac_exec_ext in '' $ac_executable_extensions; do
37771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37772    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37773       ac_prog_rejected=yes
37774       continue
37775     fi
37776    ac_cv_prog_MT="mt"
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
37784if test $ac_prog_rejected = yes; then
37785  # We found a bogon in the path, so make sure we never use it.
37786  set dummy $ac_cv_prog_MT
37787  shift
37788  if test $# != 0; then
37789    # We chose a different compiler from the bogus one.
37790    # However, it has the same basename, so the bogon will be chosen
37791    # first if we set MT to just the basename; use the full file name.
37792    shift
37793    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37794  fi
37795fi
37796fi
37797fi
37798MT=$ac_cv_prog_MT
37799if test -n "$MT"; then
37800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37801$as_echo "$MT" >&6; }
37802else
37803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37804$as_echo "no" >&6; }
37805fi
37806
37807
37808
37809  # Only process if variable expands to non-empty
37810
37811  if test "x$MT" != x; then
37812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37813
37814  # First separate the path from the arguments. This will split at the first
37815  # space.
37816  complete="$MT"
37817  path="${complete%% *}"
37818  tmp="$complete EOL"
37819  arguments="${tmp#* }"
37820
37821  # Input might be given as Windows format, start by converting to
37822  # unix format.
37823  new_path=`$CYGPATH -u "$path"`
37824
37825  # Now try to locate executable using which
37826  new_path=`$WHICH "$new_path" 2> /dev/null`
37827  # bat and cmd files are not always considered executable in cygwin causing which
37828  # to not find them
37829  if test "x$new_path" = x \
37830      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37831      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37832    new_path=`$CYGPATH -u "$path"`
37833  fi
37834  if test "x$new_path" = x; then
37835    # Oops. Which didn't find the executable.
37836    # The splitting of arguments from the executable at a space might have been incorrect,
37837    # since paths with space are more likely in Windows. Give it another try with the whole
37838    # argument.
37839    path="$complete"
37840    arguments="EOL"
37841    new_path=`$CYGPATH -u "$path"`
37842    new_path=`$WHICH "$new_path" 2> /dev/null`
37843    # bat and cmd files are not always considered executable in cygwin causing which
37844    # to not find them
37845    if test "x$new_path" = x \
37846        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37847        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37848      new_path=`$CYGPATH -u "$path"`
37849    fi
37850    if test "x$new_path" = x; then
37851      # It's still not found. Now this is an unrecoverable error.
37852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37853$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37854      has_space=`$ECHO "$complete" | $GREP " "`
37855      if test "x$has_space" != x; then
37856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37858      fi
37859      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37860    fi
37861  fi
37862
37863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37866  # "foo.exe" is OK but "foo" is an error.
37867  #
37868  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37869  # It is also a way to make sure we got the proper file name for the real test later on.
37870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37871  if test "x$test_shortpath" = x; then
37872    # Short path failed, file does not exist as specified.
37873    # Try adding .exe or .cmd
37874    if test -f "${new_path}.exe"; then
37875      input_to_shortpath="${new_path}.exe"
37876    elif test -f "${new_path}.cmd"; then
37877      input_to_shortpath="${new_path}.cmd"
37878    else
37879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37880$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37881      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37882$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37883      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37884    fi
37885  else
37886    input_to_shortpath="$new_path"
37887  fi
37888
37889  # Call helper function which possibly converts this using DOS-style short mode.
37890  # If so, the updated path is stored in $new_path.
37891  new_path="$input_to_shortpath"
37892
37893  input_path="$input_to_shortpath"
37894  # Check if we need to convert this using DOS-style short mode. If the path
37895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37896  # take no chances and rewrite it.
37897  # Note: m4 eats our [], so we need to use [ and ] instead.
37898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37899  if test "x$has_forbidden_chars" != x; then
37900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37904      # Going to short mode and back again did indeed matter. Since short mode is
37905      # case insensitive, let's make it lowercase to improve readability.
37906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37907      # Now convert it back to Unix-style (cygpath)
37908      input_path=`$CYGPATH -u "$shortmode_path"`
37909      new_path="$input_path"
37910    fi
37911  fi
37912
37913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37914  if test "x$test_cygdrive_prefix" = x; then
37915    # As a simple fix, exclude /usr/bin since it's not a real path.
37916    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37918      # a path prefixed by /cygdrive for fixpath to work.
37919      new_path="$CYGWIN_ROOT_PATH$input_path"
37920    fi
37921  fi
37922
37923  # remove trailing .exe if any
37924  new_path="${new_path/%.exe/}"
37925
37926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37927
37928  # First separate the path from the arguments. This will split at the first
37929  # space.
37930  complete="$MT"
37931  path="${complete%% *}"
37932  tmp="$complete EOL"
37933  arguments="${tmp#* }"
37934
37935  # Input might be given as Windows format, start by converting to
37936  # unix format.
37937  new_path="$path"
37938
37939  windows_path="$new_path"
37940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37941    unix_path=`$CYGPATH -u "$windows_path"`
37942    new_path="$unix_path"
37943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37945    new_path="$unix_path"
37946  fi
37947
37948
37949  # Now try to locate executable using which
37950  new_path=`$WHICH "$new_path" 2> /dev/null`
37951
37952  if test "x$new_path" = x; then
37953    # Oops. Which didn't find the executable.
37954    # The splitting of arguments from the executable at a space might have been incorrect,
37955    # since paths with space are more likely in Windows. Give it another try with the whole
37956    # argument.
37957    path="$complete"
37958    arguments="EOL"
37959    new_path="$path"
37960
37961  windows_path="$new_path"
37962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37963    unix_path=`$CYGPATH -u "$windows_path"`
37964    new_path="$unix_path"
37965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37967    new_path="$unix_path"
37968  fi
37969
37970
37971    new_path=`$WHICH "$new_path" 2> /dev/null`
37972    # bat and cmd files are not always considered executable in MSYS causing which
37973    # to not find them
37974    if test "x$new_path" = x \
37975        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37976        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37977      new_path="$path"
37978
37979  windows_path="$new_path"
37980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37981    unix_path=`$CYGPATH -u "$windows_path"`
37982    new_path="$unix_path"
37983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37985    new_path="$unix_path"
37986  fi
37987
37988    fi
37989
37990    if test "x$new_path" = x; then
37991      # It's still not found. Now this is an unrecoverable error.
37992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37993$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37994      has_space=`$ECHO "$complete" | $GREP " "`
37995      if test "x$has_space" != x; then
37996        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37997$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37998      fi
37999      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38000    fi
38001  fi
38002
38003  # Now new_path has a complete unix path to the binary
38004  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38005    # Keep paths in /bin as-is, but remove trailing .exe if any
38006    new_path="${new_path/%.exe/}"
38007    # Do not save /bin paths to all_fixpath_prefixes!
38008  else
38009    # Not in mixed or Windows style, start by that.
38010    new_path=`cmd //c echo $new_path`
38011
38012  input_path="$new_path"
38013  # Check if we need to convert this using DOS-style short mode. If the path
38014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38015  # take no chances and rewrite it.
38016  # Note: m4 eats our [], so we need to use [ and ] instead.
38017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38018  if test "x$has_forbidden_chars" != x; then
38019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38020    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38021  fi
38022
38023    # Output is in $new_path
38024
38025  windows_path="$new_path"
38026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38027    unix_path=`$CYGPATH -u "$windows_path"`
38028    new_path="$unix_path"
38029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38031    new_path="$unix_path"
38032  fi
38033
38034    # remove trailing .exe if any
38035    new_path="${new_path/%.exe/}"
38036
38037    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38038    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38039  fi
38040
38041    else
38042      # We're on a unix platform. Hooray! :)
38043      # First separate the path from the arguments. This will split at the first
38044      # space.
38045      complete="$MT"
38046      path="${complete%% *}"
38047      tmp="$complete EOL"
38048      arguments="${tmp#* }"
38049
38050      # Cannot rely on the command "which" here since it doesn't always work.
38051      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38052      if test -z "$is_absolute_path"; then
38053        # Path to executable is not absolute. Find it.
38054        IFS_save="$IFS"
38055        IFS=:
38056        for p in $PATH; do
38057          if test -f "$p/$path" && test -x "$p/$path"; then
38058            new_path="$p/$path"
38059            break
38060          fi
38061        done
38062        IFS="$IFS_save"
38063      else
38064        # This is an absolute path, we can use it without further modifications.
38065        new_path="$path"
38066      fi
38067
38068      if test "x$new_path" = x; then
38069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38070$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38071        has_space=`$ECHO "$complete" | $GREP " "`
38072        if test "x$has_space" != x; then
38073          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38074$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38075        fi
38076        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38077      fi
38078    fi
38079
38080    # Now join together the path and the arguments once again
38081    if test "x$arguments" != xEOL; then
38082      new_complete="$new_path ${arguments% *}"
38083    else
38084      new_complete="$new_path"
38085    fi
38086
38087    if test "x$complete" != "x$new_complete"; then
38088      MT="$new_complete"
38089      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38090$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38091    fi
38092  fi
38093
38094    # Setup the resource compiler (RC)
38095    # Extract the first word of "rc", so it can be a program name with args.
38096set dummy rc; ac_word=$2
38097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38098$as_echo_n "checking for $ac_word... " >&6; }
38099if ${ac_cv_prog_RC+:} false; then :
38100  $as_echo_n "(cached) " >&6
38101else
38102  if test -n "$RC"; then
38103  ac_cv_prog_RC="$RC" # Let the user override the test.
38104else
38105  ac_prog_rejected=no
38106as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38107for as_dir in $PATH
38108do
38109  IFS=$as_save_IFS
38110  test -z "$as_dir" && as_dir=.
38111    for ac_exec_ext in '' $ac_executable_extensions; do
38112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38113    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38114       ac_prog_rejected=yes
38115       continue
38116     fi
38117    ac_cv_prog_RC="rc"
38118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38119    break 2
38120  fi
38121done
38122  done
38123IFS=$as_save_IFS
38124
38125if test $ac_prog_rejected = yes; then
38126  # We found a bogon in the path, so make sure we never use it.
38127  set dummy $ac_cv_prog_RC
38128  shift
38129  if test $# != 0; then
38130    # We chose a different compiler from the bogus one.
38131    # However, it has the same basename, so the bogon will be chosen
38132    # first if we set RC to just the basename; use the full file name.
38133    shift
38134    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38135  fi
38136fi
38137fi
38138fi
38139RC=$ac_cv_prog_RC
38140if test -n "$RC"; then
38141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38142$as_echo "$RC" >&6; }
38143else
38144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38145$as_echo "no" >&6; }
38146fi
38147
38148
38149
38150  # Only process if variable expands to non-empty
38151
38152  if test "x$RC" != x; then
38153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38154
38155  # First separate the path from the arguments. This will split at the first
38156  # space.
38157  complete="$RC"
38158  path="${complete%% *}"
38159  tmp="$complete EOL"
38160  arguments="${tmp#* }"
38161
38162  # Input might be given as Windows format, start by converting to
38163  # unix format.
38164  new_path=`$CYGPATH -u "$path"`
38165
38166  # Now try to locate executable using which
38167  new_path=`$WHICH "$new_path" 2> /dev/null`
38168  # bat and cmd files are not always considered executable in cygwin causing which
38169  # to not find them
38170  if test "x$new_path" = x \
38171      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38172      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38173    new_path=`$CYGPATH -u "$path"`
38174  fi
38175  if test "x$new_path" = x; then
38176    # Oops. Which didn't find the executable.
38177    # The splitting of arguments from the executable at a space might have been incorrect,
38178    # since paths with space are more likely in Windows. Give it another try with the whole
38179    # argument.
38180    path="$complete"
38181    arguments="EOL"
38182    new_path=`$CYGPATH -u "$path"`
38183    new_path=`$WHICH "$new_path" 2> /dev/null`
38184    # bat and cmd files are not always considered executable in cygwin causing which
38185    # to not find them
38186    if test "x$new_path" = x \
38187        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38188        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38189      new_path=`$CYGPATH -u "$path"`
38190    fi
38191    if test "x$new_path" = x; then
38192      # It's still not found. Now this is an unrecoverable error.
38193      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38194$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38195      has_space=`$ECHO "$complete" | $GREP " "`
38196      if test "x$has_space" != x; then
38197        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38198$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38199      fi
38200      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38201    fi
38202  fi
38203
38204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38207  # "foo.exe" is OK but "foo" is an error.
38208  #
38209  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38210  # It is also a way to make sure we got the proper file name for the real test later on.
38211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38212  if test "x$test_shortpath" = x; then
38213    # Short path failed, file does not exist as specified.
38214    # Try adding .exe or .cmd
38215    if test -f "${new_path}.exe"; then
38216      input_to_shortpath="${new_path}.exe"
38217    elif test -f "${new_path}.cmd"; then
38218      input_to_shortpath="${new_path}.cmd"
38219    else
38220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38221$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38222      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38223$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38224      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38225    fi
38226  else
38227    input_to_shortpath="$new_path"
38228  fi
38229
38230  # Call helper function which possibly converts this using DOS-style short mode.
38231  # If so, the updated path is stored in $new_path.
38232  new_path="$input_to_shortpath"
38233
38234  input_path="$input_to_shortpath"
38235  # Check if we need to convert this using DOS-style short mode. If the path
38236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38237  # take no chances and rewrite it.
38238  # Note: m4 eats our [], so we need to use [ and ] instead.
38239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38240  if test "x$has_forbidden_chars" != x; then
38241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38245      # Going to short mode and back again did indeed matter. Since short mode is
38246      # case insensitive, let's make it lowercase to improve readability.
38247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38248      # Now convert it back to Unix-style (cygpath)
38249      input_path=`$CYGPATH -u "$shortmode_path"`
38250      new_path="$input_path"
38251    fi
38252  fi
38253
38254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38255  if test "x$test_cygdrive_prefix" = x; then
38256    # As a simple fix, exclude /usr/bin since it's not a real path.
38257    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38259      # a path prefixed by /cygdrive for fixpath to work.
38260      new_path="$CYGWIN_ROOT_PATH$input_path"
38261    fi
38262  fi
38263
38264  # remove trailing .exe if any
38265  new_path="${new_path/%.exe/}"
38266
38267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38268
38269  # First separate the path from the arguments. This will split at the first
38270  # space.
38271  complete="$RC"
38272  path="${complete%% *}"
38273  tmp="$complete EOL"
38274  arguments="${tmp#* }"
38275
38276  # Input might be given as Windows format, start by converting to
38277  # unix format.
38278  new_path="$path"
38279
38280  windows_path="$new_path"
38281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38282    unix_path=`$CYGPATH -u "$windows_path"`
38283    new_path="$unix_path"
38284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38286    new_path="$unix_path"
38287  fi
38288
38289
38290  # Now try to locate executable using which
38291  new_path=`$WHICH "$new_path" 2> /dev/null`
38292
38293  if test "x$new_path" = x; then
38294    # Oops. Which didn't find the executable.
38295    # The splitting of arguments from the executable at a space might have been incorrect,
38296    # since paths with space are more likely in Windows. Give it another try with the whole
38297    # argument.
38298    path="$complete"
38299    arguments="EOL"
38300    new_path="$path"
38301
38302  windows_path="$new_path"
38303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38304    unix_path=`$CYGPATH -u "$windows_path"`
38305    new_path="$unix_path"
38306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38308    new_path="$unix_path"
38309  fi
38310
38311
38312    new_path=`$WHICH "$new_path" 2> /dev/null`
38313    # bat and cmd files are not always considered executable in MSYS causing which
38314    # to not find them
38315    if test "x$new_path" = x \
38316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38318      new_path="$path"
38319
38320  windows_path="$new_path"
38321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38322    unix_path=`$CYGPATH -u "$windows_path"`
38323    new_path="$unix_path"
38324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38326    new_path="$unix_path"
38327  fi
38328
38329    fi
38330
38331    if test "x$new_path" = x; then
38332      # It's still not found. Now this is an unrecoverable error.
38333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38334$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38335      has_space=`$ECHO "$complete" | $GREP " "`
38336      if test "x$has_space" != x; then
38337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38339      fi
38340      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38341    fi
38342  fi
38343
38344  # Now new_path has a complete unix path to the binary
38345  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38346    # Keep paths in /bin as-is, but remove trailing .exe if any
38347    new_path="${new_path/%.exe/}"
38348    # Do not save /bin paths to all_fixpath_prefixes!
38349  else
38350    # Not in mixed or Windows style, start by that.
38351    new_path=`cmd //c echo $new_path`
38352
38353  input_path="$new_path"
38354  # Check if we need to convert this using DOS-style short mode. If the path
38355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38356  # take no chances and rewrite it.
38357  # Note: m4 eats our [], so we need to use [ and ] instead.
38358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38359  if test "x$has_forbidden_chars" != x; then
38360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38362  fi
38363
38364    # Output is in $new_path
38365
38366  windows_path="$new_path"
38367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38368    unix_path=`$CYGPATH -u "$windows_path"`
38369    new_path="$unix_path"
38370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38372    new_path="$unix_path"
38373  fi
38374
38375    # remove trailing .exe if any
38376    new_path="${new_path/%.exe/}"
38377
38378    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38379    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38380  fi
38381
38382    else
38383      # We're on a unix platform. Hooray! :)
38384      # First separate the path from the arguments. This will split at the first
38385      # space.
38386      complete="$RC"
38387      path="${complete%% *}"
38388      tmp="$complete EOL"
38389      arguments="${tmp#* }"
38390
38391      # Cannot rely on the command "which" here since it doesn't always work.
38392      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38393      if test -z "$is_absolute_path"; then
38394        # Path to executable is not absolute. Find it.
38395        IFS_save="$IFS"
38396        IFS=:
38397        for p in $PATH; do
38398          if test -f "$p/$path" && test -x "$p/$path"; then
38399            new_path="$p/$path"
38400            break
38401          fi
38402        done
38403        IFS="$IFS_save"
38404      else
38405        # This is an absolute path, we can use it without further modifications.
38406        new_path="$path"
38407      fi
38408
38409      if test "x$new_path" = x; then
38410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38411$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38412        has_space=`$ECHO "$complete" | $GREP " "`
38413        if test "x$has_space" != x; then
38414          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38415$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38416        fi
38417        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38418      fi
38419    fi
38420
38421    # Now join together the path and the arguments once again
38422    if test "x$arguments" != xEOL; then
38423      new_complete="$new_path ${arguments% *}"
38424    else
38425      new_complete="$new_path"
38426    fi
38427
38428    if test "x$complete" != "x$new_complete"; then
38429      RC="$new_complete"
38430      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38431$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38432    fi
38433  fi
38434
38435    # Extract the first word of "dumpbin", so it can be a program name with args.
38436set dummy dumpbin; ac_word=$2
38437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38438$as_echo_n "checking for $ac_word... " >&6; }
38439if ${ac_cv_prog_DUMPBIN+:} false; then :
38440  $as_echo_n "(cached) " >&6
38441else
38442  if test -n "$DUMPBIN"; then
38443  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38444else
38445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38446for as_dir in $PATH
38447do
38448  IFS=$as_save_IFS
38449  test -z "$as_dir" && as_dir=.
38450    for ac_exec_ext in '' $ac_executable_extensions; do
38451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38452    ac_cv_prog_DUMPBIN="dumpbin"
38453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38454    break 2
38455  fi
38456done
38457  done
38458IFS=$as_save_IFS
38459
38460fi
38461fi
38462DUMPBIN=$ac_cv_prog_DUMPBIN
38463if test -n "$DUMPBIN"; then
38464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38465$as_echo "$DUMPBIN" >&6; }
38466else
38467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38468$as_echo "no" >&6; }
38469fi
38470
38471
38472
38473  # Only process if variable expands to non-empty
38474
38475  if test "x$DUMPBIN" != x; then
38476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38477
38478  # First separate the path from the arguments. This will split at the first
38479  # space.
38480  complete="$DUMPBIN"
38481  path="${complete%% *}"
38482  tmp="$complete EOL"
38483  arguments="${tmp#* }"
38484
38485  # Input might be given as Windows format, start by converting to
38486  # unix format.
38487  new_path=`$CYGPATH -u "$path"`
38488
38489  # Now try to locate executable using which
38490  new_path=`$WHICH "$new_path" 2> /dev/null`
38491  # bat and cmd files are not always considered executable in cygwin causing which
38492  # to not find them
38493  if test "x$new_path" = x \
38494      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38495      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38496    new_path=`$CYGPATH -u "$path"`
38497  fi
38498  if test "x$new_path" = x; then
38499    # Oops. Which didn't find the executable.
38500    # The splitting of arguments from the executable at a space might have been incorrect,
38501    # since paths with space are more likely in Windows. Give it another try with the whole
38502    # argument.
38503    path="$complete"
38504    arguments="EOL"
38505    new_path=`$CYGPATH -u "$path"`
38506    new_path=`$WHICH "$new_path" 2> /dev/null`
38507    # bat and cmd files are not always considered executable in cygwin causing which
38508    # to not find them
38509    if test "x$new_path" = x \
38510        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38511        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38512      new_path=`$CYGPATH -u "$path"`
38513    fi
38514    if test "x$new_path" = x; then
38515      # It's still not found. Now this is an unrecoverable error.
38516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38517$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38518      has_space=`$ECHO "$complete" | $GREP " "`
38519      if test "x$has_space" != x; then
38520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38522      fi
38523      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38524    fi
38525  fi
38526
38527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38530  # "foo.exe" is OK but "foo" is an error.
38531  #
38532  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38533  # It is also a way to make sure we got the proper file name for the real test later on.
38534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38535  if test "x$test_shortpath" = x; then
38536    # Short path failed, file does not exist as specified.
38537    # Try adding .exe or .cmd
38538    if test -f "${new_path}.exe"; then
38539      input_to_shortpath="${new_path}.exe"
38540    elif test -f "${new_path}.cmd"; then
38541      input_to_shortpath="${new_path}.cmd"
38542    else
38543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38544$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38545      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38546$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38547      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38548    fi
38549  else
38550    input_to_shortpath="$new_path"
38551  fi
38552
38553  # Call helper function which possibly converts this using DOS-style short mode.
38554  # If so, the updated path is stored in $new_path.
38555  new_path="$input_to_shortpath"
38556
38557  input_path="$input_to_shortpath"
38558  # Check if we need to convert this using DOS-style short mode. If the path
38559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38560  # take no chances and rewrite it.
38561  # Note: m4 eats our [], so we need to use [ and ] instead.
38562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38563  if test "x$has_forbidden_chars" != x; then
38564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38568      # Going to short mode and back again did indeed matter. Since short mode is
38569      # case insensitive, let's make it lowercase to improve readability.
38570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38571      # Now convert it back to Unix-style (cygpath)
38572      input_path=`$CYGPATH -u "$shortmode_path"`
38573      new_path="$input_path"
38574    fi
38575  fi
38576
38577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38578  if test "x$test_cygdrive_prefix" = x; then
38579    # As a simple fix, exclude /usr/bin since it's not a real path.
38580    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38582      # a path prefixed by /cygdrive for fixpath to work.
38583      new_path="$CYGWIN_ROOT_PATH$input_path"
38584    fi
38585  fi
38586
38587  # remove trailing .exe if any
38588  new_path="${new_path/%.exe/}"
38589
38590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38591
38592  # First separate the path from the arguments. This will split at the first
38593  # space.
38594  complete="$DUMPBIN"
38595  path="${complete%% *}"
38596  tmp="$complete EOL"
38597  arguments="${tmp#* }"
38598
38599  # Input might be given as Windows format, start by converting to
38600  # unix format.
38601  new_path="$path"
38602
38603  windows_path="$new_path"
38604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38605    unix_path=`$CYGPATH -u "$windows_path"`
38606    new_path="$unix_path"
38607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38609    new_path="$unix_path"
38610  fi
38611
38612
38613  # Now try to locate executable using which
38614  new_path=`$WHICH "$new_path" 2> /dev/null`
38615
38616  if test "x$new_path" = x; then
38617    # Oops. Which didn't find the executable.
38618    # The splitting of arguments from the executable at a space might have been incorrect,
38619    # since paths with space are more likely in Windows. Give it another try with the whole
38620    # argument.
38621    path="$complete"
38622    arguments="EOL"
38623    new_path="$path"
38624
38625  windows_path="$new_path"
38626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38627    unix_path=`$CYGPATH -u "$windows_path"`
38628    new_path="$unix_path"
38629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38631    new_path="$unix_path"
38632  fi
38633
38634
38635    new_path=`$WHICH "$new_path" 2> /dev/null`
38636    # bat and cmd files are not always considered executable in MSYS causing which
38637    # to not find them
38638    if test "x$new_path" = x \
38639        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38640        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38641      new_path="$path"
38642
38643  windows_path="$new_path"
38644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38645    unix_path=`$CYGPATH -u "$windows_path"`
38646    new_path="$unix_path"
38647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38649    new_path="$unix_path"
38650  fi
38651
38652    fi
38653
38654    if test "x$new_path" = x; then
38655      # It's still not found. Now this is an unrecoverable error.
38656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38657$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38658      has_space=`$ECHO "$complete" | $GREP " "`
38659      if test "x$has_space" != x; then
38660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38662      fi
38663      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38664    fi
38665  fi
38666
38667  # Now new_path has a complete unix path to the binary
38668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38669    # Keep paths in /bin as-is, but remove trailing .exe if any
38670    new_path="${new_path/%.exe/}"
38671    # Do not save /bin paths to all_fixpath_prefixes!
38672  else
38673    # Not in mixed or Windows style, start by that.
38674    new_path=`cmd //c echo $new_path`
38675
38676  input_path="$new_path"
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38685  fi
38686
38687    # Output is in $new_path
38688
38689  windows_path="$new_path"
38690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38691    unix_path=`$CYGPATH -u "$windows_path"`
38692    new_path="$unix_path"
38693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38695    new_path="$unix_path"
38696  fi
38697
38698    # remove trailing .exe if any
38699    new_path="${new_path/%.exe/}"
38700
38701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38703  fi
38704
38705    else
38706      # We're on a unix platform. Hooray! :)
38707      # First separate the path from the arguments. This will split at the first
38708      # space.
38709      complete="$DUMPBIN"
38710      path="${complete%% *}"
38711      tmp="$complete EOL"
38712      arguments="${tmp#* }"
38713
38714      # Cannot rely on the command "which" here since it doesn't always work.
38715      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38716      if test -z "$is_absolute_path"; then
38717        # Path to executable is not absolute. Find it.
38718        IFS_save="$IFS"
38719        IFS=:
38720        for p in $PATH; do
38721          if test -f "$p/$path" && test -x "$p/$path"; then
38722            new_path="$p/$path"
38723            break
38724          fi
38725        done
38726        IFS="$IFS_save"
38727      else
38728        # This is an absolute path, we can use it without further modifications.
38729        new_path="$path"
38730      fi
38731
38732      if test "x$new_path" = x; then
38733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38734$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38735        has_space=`$ECHO "$complete" | $GREP " "`
38736        if test "x$has_space" != x; then
38737          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38738$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38739        fi
38740        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38741      fi
38742    fi
38743
38744    # Now join together the path and the arguments once again
38745    if test "x$arguments" != xEOL; then
38746      new_complete="$new_path ${arguments% *}"
38747    else
38748      new_complete="$new_path"
38749    fi
38750
38751    if test "x$complete" != "x$new_complete"; then
38752      DUMPBIN="$new_complete"
38753      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38754$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38755    fi
38756  fi
38757
38758    # We need to check for 'msbuild.exe' because at the place where we expect to
38759    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38760    # won't find the 'msbuild.exe' executable in that case (and the
38761    # 'ac_executable_extensions' is unusable due to performance reasons).
38762    # Notice that we intentionally don't fix up the path to MSBUILD because we
38763    # will call it in a DOS shell during freetype detection on Windows (see
38764    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38765    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38766set dummy msbuild.exe; ac_word=$2
38767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38768$as_echo_n "checking for $ac_word... " >&6; }
38769if ${ac_cv_prog_MSBUILD+:} false; then :
38770  $as_echo_n "(cached) " >&6
38771else
38772  if test -n "$MSBUILD"; then
38773  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38774else
38775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38776for as_dir in $PATH
38777do
38778  IFS=$as_save_IFS
38779  test -z "$as_dir" && as_dir=.
38780    for ac_exec_ext in '' $ac_executable_extensions; do
38781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38782    ac_cv_prog_MSBUILD="msbuild.exe"
38783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38784    break 2
38785  fi
38786done
38787  done
38788IFS=$as_save_IFS
38789
38790fi
38791fi
38792MSBUILD=$ac_cv_prog_MSBUILD
38793if test -n "$MSBUILD"; then
38794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38795$as_echo "$MSBUILD" >&6; }
38796else
38797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38798$as_echo "no" >&6; }
38799fi
38800
38801
38802  fi
38803
38804  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38805
38806
38807  # Publish this variable in the help.
38808
38809
38810  if [ -z "${STRIP+x}" ]; then
38811    # The variable is not set by user, try to locate tool using the code snippet
38812    for ac_prog in strip
38813do
38814  # Extract the first word of "$ac_prog", so it can be a program name with args.
38815set dummy $ac_prog; ac_word=$2
38816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38817$as_echo_n "checking for $ac_word... " >&6; }
38818if ${ac_cv_path_STRIP+:} false; then :
38819  $as_echo_n "(cached) " >&6
38820else
38821  case $STRIP in
38822  [\\/]* | ?:[\\/]*)
38823  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38824  ;;
38825  *)
38826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38827for as_dir in $PATH
38828do
38829  IFS=$as_save_IFS
38830  test -z "$as_dir" && as_dir=.
38831    for ac_exec_ext in '' $ac_executable_extensions; do
38832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38833    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38835    break 2
38836  fi
38837done
38838  done
38839IFS=$as_save_IFS
38840
38841  ;;
38842esac
38843fi
38844STRIP=$ac_cv_path_STRIP
38845if test -n "$STRIP"; then
38846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38847$as_echo "$STRIP" >&6; }
38848else
38849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38850$as_echo "no" >&6; }
38851fi
38852
38853
38854  test -n "$STRIP" && break
38855done
38856
38857  else
38858    # The variable is set, but is it from the command line or the environment?
38859
38860    # Try to remove the string !STRIP! from our list.
38861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38863      # If it failed, the variable was not from the command line. Ignore it,
38864      # but warn the user (except for BASH, which is always set by the calling BASH).
38865      if test "xSTRIP" != xBASH; then
38866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38867$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38868      fi
38869      # Try to locate tool using the code snippet
38870      for ac_prog in strip
38871do
38872  # Extract the first word of "$ac_prog", so it can be a program name with args.
38873set dummy $ac_prog; ac_word=$2
38874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38875$as_echo_n "checking for $ac_word... " >&6; }
38876if ${ac_cv_path_STRIP+:} false; then :
38877  $as_echo_n "(cached) " >&6
38878else
38879  case $STRIP in
38880  [\\/]* | ?:[\\/]*)
38881  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38882  ;;
38883  *)
38884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38885for as_dir in $PATH
38886do
38887  IFS=$as_save_IFS
38888  test -z "$as_dir" && as_dir=.
38889    for ac_exec_ext in '' $ac_executable_extensions; do
38890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38891    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38893    break 2
38894  fi
38895done
38896  done
38897IFS=$as_save_IFS
38898
38899  ;;
38900esac
38901fi
38902STRIP=$ac_cv_path_STRIP
38903if test -n "$STRIP"; then
38904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38905$as_echo "$STRIP" >&6; }
38906else
38907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38908$as_echo "no" >&6; }
38909fi
38910
38911
38912  test -n "$STRIP" && break
38913done
38914
38915    else
38916      # If it succeeded, then it was overridden by the user. We will use it
38917      # for the tool.
38918
38919      # First remove it from the list of overridden variables, so we can test
38920      # for unknown variables in the end.
38921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38922
38923      # Check if we try to supply an empty value
38924      if test "x$STRIP" = x; then
38925        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38926$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38928$as_echo_n "checking for STRIP... " >&6; }
38929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38930$as_echo "disabled" >&6; }
38931      else
38932        # Check if the provided tool contains a complete path.
38933        tool_specified="$STRIP"
38934        tool_basename="${tool_specified##*/}"
38935        if test "x$tool_basename" = "x$tool_specified"; then
38936          # A command without a complete path is provided, search $PATH.
38937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38938$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38939          # Extract the first word of "$tool_basename", so it can be a program name with args.
38940set dummy $tool_basename; ac_word=$2
38941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38942$as_echo_n "checking for $ac_word... " >&6; }
38943if ${ac_cv_path_STRIP+:} false; then :
38944  $as_echo_n "(cached) " >&6
38945else
38946  case $STRIP in
38947  [\\/]* | ?:[\\/]*)
38948  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38949  ;;
38950  *)
38951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38952for as_dir in $PATH
38953do
38954  IFS=$as_save_IFS
38955  test -z "$as_dir" && as_dir=.
38956    for ac_exec_ext in '' $ac_executable_extensions; do
38957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38958    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38960    break 2
38961  fi
38962done
38963  done
38964IFS=$as_save_IFS
38965
38966  ;;
38967esac
38968fi
38969STRIP=$ac_cv_path_STRIP
38970if test -n "$STRIP"; then
38971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38972$as_echo "$STRIP" >&6; }
38973else
38974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38975$as_echo "no" >&6; }
38976fi
38977
38978
38979          if test "x$STRIP" = x; then
38980            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38981          fi
38982        else
38983          # Otherwise we believe it is a complete path. Use it as it is.
38984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38985$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38986          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38987$as_echo_n "checking for STRIP... " >&6; }
38988          if test ! -x "$tool_specified"; then
38989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38990$as_echo "not found" >&6; }
38991            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38992          fi
38993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38994$as_echo "$tool_specified" >&6; }
38995        fi
38996      fi
38997    fi
38998
38999  fi
39000
39001
39002
39003  # Only process if variable expands to non-empty
39004
39005  if test "x$STRIP" != x; then
39006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39007
39008  # First separate the path from the arguments. This will split at the first
39009  # space.
39010  complete="$STRIP"
39011  path="${complete%% *}"
39012  tmp="$complete EOL"
39013  arguments="${tmp#* }"
39014
39015  # Input might be given as Windows format, start by converting to
39016  # unix format.
39017  new_path=`$CYGPATH -u "$path"`
39018
39019  # Now try to locate executable using which
39020  new_path=`$WHICH "$new_path" 2> /dev/null`
39021  # bat and cmd files are not always considered executable in cygwin causing which
39022  # to not find them
39023  if test "x$new_path" = x \
39024      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39025      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39026    new_path=`$CYGPATH -u "$path"`
39027  fi
39028  if test "x$new_path" = x; then
39029    # Oops. Which didn't find the executable.
39030    # The splitting of arguments from the executable at a space might have been incorrect,
39031    # since paths with space are more likely in Windows. Give it another try with the whole
39032    # argument.
39033    path="$complete"
39034    arguments="EOL"
39035    new_path=`$CYGPATH -u "$path"`
39036    new_path=`$WHICH "$new_path" 2> /dev/null`
39037    # bat and cmd files are not always considered executable in cygwin causing which
39038    # to not find them
39039    if test "x$new_path" = x \
39040        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39041        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39042      new_path=`$CYGPATH -u "$path"`
39043    fi
39044    if test "x$new_path" = x; then
39045      # It's still not found. Now this is an unrecoverable error.
39046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39047$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39048      has_space=`$ECHO "$complete" | $GREP " "`
39049      if test "x$has_space" != x; then
39050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39052      fi
39053      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39054    fi
39055  fi
39056
39057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39060  # "foo.exe" is OK but "foo" is an error.
39061  #
39062  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39063  # It is also a way to make sure we got the proper file name for the real test later on.
39064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39065  if test "x$test_shortpath" = x; then
39066    # Short path failed, file does not exist as specified.
39067    # Try adding .exe or .cmd
39068    if test -f "${new_path}.exe"; then
39069      input_to_shortpath="${new_path}.exe"
39070    elif test -f "${new_path}.cmd"; then
39071      input_to_shortpath="${new_path}.cmd"
39072    else
39073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39074$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39075      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39076$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39077      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39078    fi
39079  else
39080    input_to_shortpath="$new_path"
39081  fi
39082
39083  # Call helper function which possibly converts this using DOS-style short mode.
39084  # If so, the updated path is stored in $new_path.
39085  new_path="$input_to_shortpath"
39086
39087  input_path="$input_to_shortpath"
39088  # Check if we need to convert this using DOS-style short mode. If the path
39089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39090  # take no chances and rewrite it.
39091  # Note: m4 eats our [], so we need to use [ and ] instead.
39092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39093  if test "x$has_forbidden_chars" != x; then
39094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39098      # Going to short mode and back again did indeed matter. Since short mode is
39099      # case insensitive, let's make it lowercase to improve readability.
39100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39101      # Now convert it back to Unix-style (cygpath)
39102      input_path=`$CYGPATH -u "$shortmode_path"`
39103      new_path="$input_path"
39104    fi
39105  fi
39106
39107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39108  if test "x$test_cygdrive_prefix" = x; then
39109    # As a simple fix, exclude /usr/bin since it's not a real path.
39110    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39112      # a path prefixed by /cygdrive for fixpath to work.
39113      new_path="$CYGWIN_ROOT_PATH$input_path"
39114    fi
39115  fi
39116
39117  # remove trailing .exe if any
39118  new_path="${new_path/%.exe/}"
39119
39120    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39121
39122  # First separate the path from the arguments. This will split at the first
39123  # space.
39124  complete="$STRIP"
39125  path="${complete%% *}"
39126  tmp="$complete EOL"
39127  arguments="${tmp#* }"
39128
39129  # Input might be given as Windows format, start by converting to
39130  # unix format.
39131  new_path="$path"
39132
39133  windows_path="$new_path"
39134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39135    unix_path=`$CYGPATH -u "$windows_path"`
39136    new_path="$unix_path"
39137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39139    new_path="$unix_path"
39140  fi
39141
39142
39143  # Now try to locate executable using which
39144  new_path=`$WHICH "$new_path" 2> /dev/null`
39145
39146  if test "x$new_path" = x; then
39147    # Oops. Which didn't find the executable.
39148    # The splitting of arguments from the executable at a space might have been incorrect,
39149    # since paths with space are more likely in Windows. Give it another try with the whole
39150    # argument.
39151    path="$complete"
39152    arguments="EOL"
39153    new_path="$path"
39154
39155  windows_path="$new_path"
39156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39157    unix_path=`$CYGPATH -u "$windows_path"`
39158    new_path="$unix_path"
39159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39161    new_path="$unix_path"
39162  fi
39163
39164
39165    new_path=`$WHICH "$new_path" 2> /dev/null`
39166    # bat and cmd files are not always considered executable in MSYS causing which
39167    # to not find them
39168    if test "x$new_path" = x \
39169        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39170        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39171      new_path="$path"
39172
39173  windows_path="$new_path"
39174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39175    unix_path=`$CYGPATH -u "$windows_path"`
39176    new_path="$unix_path"
39177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39179    new_path="$unix_path"
39180  fi
39181
39182    fi
39183
39184    if test "x$new_path" = x; then
39185      # It's still not found. Now this is an unrecoverable error.
39186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39187$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39188      has_space=`$ECHO "$complete" | $GREP " "`
39189      if test "x$has_space" != x; then
39190        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39191$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39192      fi
39193      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39194    fi
39195  fi
39196
39197  # Now new_path has a complete unix path to the binary
39198  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39199    # Keep paths in /bin as-is, but remove trailing .exe if any
39200    new_path="${new_path/%.exe/}"
39201    # Do not save /bin paths to all_fixpath_prefixes!
39202  else
39203    # Not in mixed or Windows style, start by that.
39204    new_path=`cmd //c echo $new_path`
39205
39206  input_path="$new_path"
39207  # Check if we need to convert this using DOS-style short mode. If the path
39208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39209  # take no chances and rewrite it.
39210  # Note: m4 eats our [], so we need to use [ and ] instead.
39211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39212  if test "x$has_forbidden_chars" != x; then
39213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39215  fi
39216
39217    # Output is in $new_path
39218
39219  windows_path="$new_path"
39220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39221    unix_path=`$CYGPATH -u "$windows_path"`
39222    new_path="$unix_path"
39223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39225    new_path="$unix_path"
39226  fi
39227
39228    # remove trailing .exe if any
39229    new_path="${new_path/%.exe/}"
39230
39231    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39232    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39233  fi
39234
39235    else
39236      # We're on a unix platform. Hooray! :)
39237      # First separate the path from the arguments. This will split at the first
39238      # space.
39239      complete="$STRIP"
39240      path="${complete%% *}"
39241      tmp="$complete EOL"
39242      arguments="${tmp#* }"
39243
39244      # Cannot rely on the command "which" here since it doesn't always work.
39245      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39246      if test -z "$is_absolute_path"; then
39247        # Path to executable is not absolute. Find it.
39248        IFS_save="$IFS"
39249        IFS=:
39250        for p in $PATH; do
39251          if test -f "$p/$path" && test -x "$p/$path"; then
39252            new_path="$p/$path"
39253            break
39254          fi
39255        done
39256        IFS="$IFS_save"
39257      else
39258        # This is an absolute path, we can use it without further modifications.
39259        new_path="$path"
39260      fi
39261
39262      if test "x$new_path" = x; then
39263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39264$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39265        has_space=`$ECHO "$complete" | $GREP " "`
39266        if test "x$has_space" != x; then
39267          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39269        fi
39270        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39271      fi
39272    fi
39273
39274    # Now join together the path and the arguments once again
39275    if test "x$arguments" != xEOL; then
39276      new_complete="$new_path ${arguments% *}"
39277    else
39278      new_complete="$new_path"
39279    fi
39280
39281    if test "x$complete" != "x$new_complete"; then
39282      STRIP="$new_complete"
39283      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39284$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39285    fi
39286  fi
39287
39288
39289
39290  # Publish this variable in the help.
39291
39292
39293  if [ -z "${NM+x}" ]; then
39294    # The variable is not set by user, try to locate tool using the code snippet
39295    for ac_prog in nm
39296do
39297  # Extract the first word of "$ac_prog", so it can be a program name with args.
39298set dummy $ac_prog; ac_word=$2
39299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39300$as_echo_n "checking for $ac_word... " >&6; }
39301if ${ac_cv_path_NM+:} false; then :
39302  $as_echo_n "(cached) " >&6
39303else
39304  case $NM in
39305  [\\/]* | ?:[\\/]*)
39306  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39307  ;;
39308  *)
39309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39310for as_dir in $PATH
39311do
39312  IFS=$as_save_IFS
39313  test -z "$as_dir" && as_dir=.
39314    for ac_exec_ext in '' $ac_executable_extensions; do
39315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39316    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39318    break 2
39319  fi
39320done
39321  done
39322IFS=$as_save_IFS
39323
39324  ;;
39325esac
39326fi
39327NM=$ac_cv_path_NM
39328if test -n "$NM"; then
39329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39330$as_echo "$NM" >&6; }
39331else
39332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39333$as_echo "no" >&6; }
39334fi
39335
39336
39337  test -n "$NM" && break
39338done
39339
39340  else
39341    # The variable is set, but is it from the command line or the environment?
39342
39343    # Try to remove the string !NM! from our list.
39344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39346      # If it failed, the variable was not from the command line. Ignore it,
39347      # but warn the user (except for BASH, which is always set by the calling BASH).
39348      if test "xNM" != xBASH; then
39349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39350$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39351      fi
39352      # Try to locate tool using the code snippet
39353      for ac_prog in nm
39354do
39355  # Extract the first word of "$ac_prog", so it can be a program name with args.
39356set dummy $ac_prog; ac_word=$2
39357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39358$as_echo_n "checking for $ac_word... " >&6; }
39359if ${ac_cv_path_NM+:} false; then :
39360  $as_echo_n "(cached) " >&6
39361else
39362  case $NM in
39363  [\\/]* | ?:[\\/]*)
39364  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39365  ;;
39366  *)
39367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39368for as_dir in $PATH
39369do
39370  IFS=$as_save_IFS
39371  test -z "$as_dir" && as_dir=.
39372    for ac_exec_ext in '' $ac_executable_extensions; do
39373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39374    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39376    break 2
39377  fi
39378done
39379  done
39380IFS=$as_save_IFS
39381
39382  ;;
39383esac
39384fi
39385NM=$ac_cv_path_NM
39386if test -n "$NM"; then
39387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39388$as_echo "$NM" >&6; }
39389else
39390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39391$as_echo "no" >&6; }
39392fi
39393
39394
39395  test -n "$NM" && break
39396done
39397
39398    else
39399      # If it succeeded, then it was overridden by the user. We will use it
39400      # for the tool.
39401
39402      # First remove it from the list of overridden variables, so we can test
39403      # for unknown variables in the end.
39404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39405
39406      # Check if we try to supply an empty value
39407      if test "x$NM" = x; then
39408        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39409$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39411$as_echo_n "checking for NM... " >&6; }
39412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39413$as_echo "disabled" >&6; }
39414      else
39415        # Check if the provided tool contains a complete path.
39416        tool_specified="$NM"
39417        tool_basename="${tool_specified##*/}"
39418        if test "x$tool_basename" = "x$tool_specified"; then
39419          # A command without a complete path is provided, search $PATH.
39420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39421$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39422          # Extract the first word of "$tool_basename", so it can be a program name with args.
39423set dummy $tool_basename; ac_word=$2
39424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39425$as_echo_n "checking for $ac_word... " >&6; }
39426if ${ac_cv_path_NM+:} false; then :
39427  $as_echo_n "(cached) " >&6
39428else
39429  case $NM in
39430  [\\/]* | ?:[\\/]*)
39431  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39432  ;;
39433  *)
39434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39435for as_dir in $PATH
39436do
39437  IFS=$as_save_IFS
39438  test -z "$as_dir" && as_dir=.
39439    for ac_exec_ext in '' $ac_executable_extensions; do
39440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39441    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39443    break 2
39444  fi
39445done
39446  done
39447IFS=$as_save_IFS
39448
39449  ;;
39450esac
39451fi
39452NM=$ac_cv_path_NM
39453if test -n "$NM"; then
39454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39455$as_echo "$NM" >&6; }
39456else
39457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39458$as_echo "no" >&6; }
39459fi
39460
39461
39462          if test "x$NM" = x; then
39463            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39464          fi
39465        else
39466          # Otherwise we believe it is a complete path. Use it as it is.
39467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39468$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39469          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39470$as_echo_n "checking for NM... " >&6; }
39471          if test ! -x "$tool_specified"; then
39472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39473$as_echo "not found" >&6; }
39474            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39475          fi
39476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39477$as_echo "$tool_specified" >&6; }
39478        fi
39479      fi
39480    fi
39481
39482  fi
39483
39484
39485
39486  # Only process if variable expands to non-empty
39487
39488  if test "x$NM" != x; then
39489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39490
39491  # First separate the path from the arguments. This will split at the first
39492  # space.
39493  complete="$NM"
39494  path="${complete%% *}"
39495  tmp="$complete EOL"
39496  arguments="${tmp#* }"
39497
39498  # Input might be given as Windows format, start by converting to
39499  # unix format.
39500  new_path=`$CYGPATH -u "$path"`
39501
39502  # Now try to locate executable using which
39503  new_path=`$WHICH "$new_path" 2> /dev/null`
39504  # bat and cmd files are not always considered executable in cygwin causing which
39505  # to not find them
39506  if test "x$new_path" = x \
39507      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39508      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39509    new_path=`$CYGPATH -u "$path"`
39510  fi
39511  if test "x$new_path" = x; then
39512    # Oops. Which didn't find the executable.
39513    # The splitting of arguments from the executable at a space might have been incorrect,
39514    # since paths with space are more likely in Windows. Give it another try with the whole
39515    # argument.
39516    path="$complete"
39517    arguments="EOL"
39518    new_path=`$CYGPATH -u "$path"`
39519    new_path=`$WHICH "$new_path" 2> /dev/null`
39520    # bat and cmd files are not always considered executable in cygwin causing which
39521    # to not find them
39522    if test "x$new_path" = x \
39523        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39524        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39525      new_path=`$CYGPATH -u "$path"`
39526    fi
39527    if test "x$new_path" = x; then
39528      # It's still not found. Now this is an unrecoverable error.
39529      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39530$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39531      has_space=`$ECHO "$complete" | $GREP " "`
39532      if test "x$has_space" != x; then
39533        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39534$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39535      fi
39536      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39537    fi
39538  fi
39539
39540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39543  # "foo.exe" is OK but "foo" is an error.
39544  #
39545  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39546  # It is also a way to make sure we got the proper file name for the real test later on.
39547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39548  if test "x$test_shortpath" = x; then
39549    # Short path failed, file does not exist as specified.
39550    # Try adding .exe or .cmd
39551    if test -f "${new_path}.exe"; then
39552      input_to_shortpath="${new_path}.exe"
39553    elif test -f "${new_path}.cmd"; then
39554      input_to_shortpath="${new_path}.cmd"
39555    else
39556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39557$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39558      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39559$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39560      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39561    fi
39562  else
39563    input_to_shortpath="$new_path"
39564  fi
39565
39566  # Call helper function which possibly converts this using DOS-style short mode.
39567  # If so, the updated path is stored in $new_path.
39568  new_path="$input_to_shortpath"
39569
39570  input_path="$input_to_shortpath"
39571  # Check if we need to convert this using DOS-style short mode. If the path
39572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39573  # take no chances and rewrite it.
39574  # Note: m4 eats our [], so we need to use [ and ] instead.
39575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39576  if test "x$has_forbidden_chars" != x; then
39577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39581      # Going to short mode and back again did indeed matter. Since short mode is
39582      # case insensitive, let's make it lowercase to improve readability.
39583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39584      # Now convert it back to Unix-style (cygpath)
39585      input_path=`$CYGPATH -u "$shortmode_path"`
39586      new_path="$input_path"
39587    fi
39588  fi
39589
39590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39591  if test "x$test_cygdrive_prefix" = x; then
39592    # As a simple fix, exclude /usr/bin since it's not a real path.
39593    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39595      # a path prefixed by /cygdrive for fixpath to work.
39596      new_path="$CYGWIN_ROOT_PATH$input_path"
39597    fi
39598  fi
39599
39600  # remove trailing .exe if any
39601  new_path="${new_path/%.exe/}"
39602
39603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39604
39605  # First separate the path from the arguments. This will split at the first
39606  # space.
39607  complete="$NM"
39608  path="${complete%% *}"
39609  tmp="$complete EOL"
39610  arguments="${tmp#* }"
39611
39612  # Input might be given as Windows format, start by converting to
39613  # unix format.
39614  new_path="$path"
39615
39616  windows_path="$new_path"
39617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39618    unix_path=`$CYGPATH -u "$windows_path"`
39619    new_path="$unix_path"
39620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39622    new_path="$unix_path"
39623  fi
39624
39625
39626  # Now try to locate executable using which
39627  new_path=`$WHICH "$new_path" 2> /dev/null`
39628
39629  if test "x$new_path" = x; then
39630    # Oops. Which didn't find the executable.
39631    # The splitting of arguments from the executable at a space might have been incorrect,
39632    # since paths with space are more likely in Windows. Give it another try with the whole
39633    # argument.
39634    path="$complete"
39635    arguments="EOL"
39636    new_path="$path"
39637
39638  windows_path="$new_path"
39639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39640    unix_path=`$CYGPATH -u "$windows_path"`
39641    new_path="$unix_path"
39642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39644    new_path="$unix_path"
39645  fi
39646
39647
39648    new_path=`$WHICH "$new_path" 2> /dev/null`
39649    # bat and cmd files are not always considered executable in MSYS causing which
39650    # to not find them
39651    if test "x$new_path" = x \
39652        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39653        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39654      new_path="$path"
39655
39656  windows_path="$new_path"
39657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39658    unix_path=`$CYGPATH -u "$windows_path"`
39659    new_path="$unix_path"
39660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39662    new_path="$unix_path"
39663  fi
39664
39665    fi
39666
39667    if test "x$new_path" = x; then
39668      # It's still not found. Now this is an unrecoverable error.
39669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39670$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39671      has_space=`$ECHO "$complete" | $GREP " "`
39672      if test "x$has_space" != x; then
39673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39675      fi
39676      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39677    fi
39678  fi
39679
39680  # Now new_path has a complete unix path to the binary
39681  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39682    # Keep paths in /bin as-is, but remove trailing .exe if any
39683    new_path="${new_path/%.exe/}"
39684    # Do not save /bin paths to all_fixpath_prefixes!
39685  else
39686    # Not in mixed or Windows style, start by that.
39687    new_path=`cmd //c echo $new_path`
39688
39689  input_path="$new_path"
39690  # Check if we need to convert this using DOS-style short mode. If the path
39691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39692  # take no chances and rewrite it.
39693  # Note: m4 eats our [], so we need to use [ and ] instead.
39694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39695  if test "x$has_forbidden_chars" != x; then
39696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39698  fi
39699
39700    # Output is in $new_path
39701
39702  windows_path="$new_path"
39703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39704    unix_path=`$CYGPATH -u "$windows_path"`
39705    new_path="$unix_path"
39706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39708    new_path="$unix_path"
39709  fi
39710
39711    # remove trailing .exe if any
39712    new_path="${new_path/%.exe/}"
39713
39714    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39715    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39716  fi
39717
39718    else
39719      # We're on a unix platform. Hooray! :)
39720      # First separate the path from the arguments. This will split at the first
39721      # space.
39722      complete="$NM"
39723      path="${complete%% *}"
39724      tmp="$complete EOL"
39725      arguments="${tmp#* }"
39726
39727      # Cannot rely on the command "which" here since it doesn't always work.
39728      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39729      if test -z "$is_absolute_path"; then
39730        # Path to executable is not absolute. Find it.
39731        IFS_save="$IFS"
39732        IFS=:
39733        for p in $PATH; do
39734          if test -f "$p/$path" && test -x "$p/$path"; then
39735            new_path="$p/$path"
39736            break
39737          fi
39738        done
39739        IFS="$IFS_save"
39740      else
39741        # This is an absolute path, we can use it without further modifications.
39742        new_path="$path"
39743      fi
39744
39745      if test "x$new_path" = x; then
39746        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39747$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39748        has_space=`$ECHO "$complete" | $GREP " "`
39749        if test "x$has_space" != x; then
39750          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39751$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39752        fi
39753        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39754      fi
39755    fi
39756
39757    # Now join together the path and the arguments once again
39758    if test "x$arguments" != xEOL; then
39759      new_complete="$new_path ${arguments% *}"
39760    else
39761      new_complete="$new_path"
39762    fi
39763
39764    if test "x$complete" != "x$new_complete"; then
39765      NM="$new_complete"
39766      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39767$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39768    fi
39769  fi
39770
39771
39772
39773  # Publish this variable in the help.
39774
39775
39776  if [ -z "${GNM+x}" ]; then
39777    # The variable is not set by user, try to locate tool using the code snippet
39778    for ac_prog in gnm
39779do
39780  # Extract the first word of "$ac_prog", so it can be a program name with args.
39781set dummy $ac_prog; ac_word=$2
39782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39783$as_echo_n "checking for $ac_word... " >&6; }
39784if ${ac_cv_path_GNM+:} false; then :
39785  $as_echo_n "(cached) " >&6
39786else
39787  case $GNM in
39788  [\\/]* | ?:[\\/]*)
39789  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39790  ;;
39791  *)
39792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39793for as_dir in $PATH
39794do
39795  IFS=$as_save_IFS
39796  test -z "$as_dir" && as_dir=.
39797    for ac_exec_ext in '' $ac_executable_extensions; do
39798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39799    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39801    break 2
39802  fi
39803done
39804  done
39805IFS=$as_save_IFS
39806
39807  ;;
39808esac
39809fi
39810GNM=$ac_cv_path_GNM
39811if test -n "$GNM"; then
39812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39813$as_echo "$GNM" >&6; }
39814else
39815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39816$as_echo "no" >&6; }
39817fi
39818
39819
39820  test -n "$GNM" && break
39821done
39822
39823  else
39824    # The variable is set, but is it from the command line or the environment?
39825
39826    # Try to remove the string !GNM! from our list.
39827    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39828    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39829      # If it failed, the variable was not from the command line. Ignore it,
39830      # but warn the user (except for BASH, which is always set by the calling BASH).
39831      if test "xGNM" != xBASH; then
39832        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39833$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39834      fi
39835      # Try to locate tool using the code snippet
39836      for ac_prog in gnm
39837do
39838  # Extract the first word of "$ac_prog", so it can be a program name with args.
39839set dummy $ac_prog; ac_word=$2
39840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39841$as_echo_n "checking for $ac_word... " >&6; }
39842if ${ac_cv_path_GNM+:} false; then :
39843  $as_echo_n "(cached) " >&6
39844else
39845  case $GNM in
39846  [\\/]* | ?:[\\/]*)
39847  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39848  ;;
39849  *)
39850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39851for as_dir in $PATH
39852do
39853  IFS=$as_save_IFS
39854  test -z "$as_dir" && as_dir=.
39855    for ac_exec_ext in '' $ac_executable_extensions; do
39856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39857    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39859    break 2
39860  fi
39861done
39862  done
39863IFS=$as_save_IFS
39864
39865  ;;
39866esac
39867fi
39868GNM=$ac_cv_path_GNM
39869if test -n "$GNM"; then
39870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39871$as_echo "$GNM" >&6; }
39872else
39873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39874$as_echo "no" >&6; }
39875fi
39876
39877
39878  test -n "$GNM" && break
39879done
39880
39881    else
39882      # If it succeeded, then it was overridden by the user. We will use it
39883      # for the tool.
39884
39885      # First remove it from the list of overridden variables, so we can test
39886      # for unknown variables in the end.
39887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39888
39889      # Check if we try to supply an empty value
39890      if test "x$GNM" = x; then
39891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39892$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39894$as_echo_n "checking for GNM... " >&6; }
39895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39896$as_echo "disabled" >&6; }
39897      else
39898        # Check if the provided tool contains a complete path.
39899        tool_specified="$GNM"
39900        tool_basename="${tool_specified##*/}"
39901        if test "x$tool_basename" = "x$tool_specified"; then
39902          # A command without a complete path is provided, search $PATH.
39903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39904$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39905          # Extract the first word of "$tool_basename", so it can be a program name with args.
39906set dummy $tool_basename; ac_word=$2
39907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39908$as_echo_n "checking for $ac_word... " >&6; }
39909if ${ac_cv_path_GNM+:} false; then :
39910  $as_echo_n "(cached) " >&6
39911else
39912  case $GNM in
39913  [\\/]* | ?:[\\/]*)
39914  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39915  ;;
39916  *)
39917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39918for as_dir in $PATH
39919do
39920  IFS=$as_save_IFS
39921  test -z "$as_dir" && as_dir=.
39922    for ac_exec_ext in '' $ac_executable_extensions; do
39923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39924    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39926    break 2
39927  fi
39928done
39929  done
39930IFS=$as_save_IFS
39931
39932  ;;
39933esac
39934fi
39935GNM=$ac_cv_path_GNM
39936if test -n "$GNM"; then
39937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39938$as_echo "$GNM" >&6; }
39939else
39940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39941$as_echo "no" >&6; }
39942fi
39943
39944
39945          if test "x$GNM" = x; then
39946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39947          fi
39948        else
39949          # Otherwise we believe it is a complete path. Use it as it is.
39950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39951$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39953$as_echo_n "checking for GNM... " >&6; }
39954          if test ! -x "$tool_specified"; then
39955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39956$as_echo "not found" >&6; }
39957            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39958          fi
39959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39960$as_echo "$tool_specified" >&6; }
39961        fi
39962      fi
39963    fi
39964
39965  fi
39966
39967
39968
39969  # Only process if variable expands to non-empty
39970
39971  if test "x$GNM" != x; then
39972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39973
39974  # First separate the path from the arguments. This will split at the first
39975  # space.
39976  complete="$GNM"
39977  path="${complete%% *}"
39978  tmp="$complete EOL"
39979  arguments="${tmp#* }"
39980
39981  # Input might be given as Windows format, start by converting to
39982  # unix format.
39983  new_path=`$CYGPATH -u "$path"`
39984
39985  # Now try to locate executable using which
39986  new_path=`$WHICH "$new_path" 2> /dev/null`
39987  # bat and cmd files are not always considered executable in cygwin causing which
39988  # to not find them
39989  if test "x$new_path" = x \
39990      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39991      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39992    new_path=`$CYGPATH -u "$path"`
39993  fi
39994  if test "x$new_path" = x; then
39995    # Oops. Which didn't find the executable.
39996    # The splitting of arguments from the executable at a space might have been incorrect,
39997    # since paths with space are more likely in Windows. Give it another try with the whole
39998    # argument.
39999    path="$complete"
40000    arguments="EOL"
40001    new_path=`$CYGPATH -u "$path"`
40002    new_path=`$WHICH "$new_path" 2> /dev/null`
40003    # bat and cmd files are not always considered executable in cygwin causing which
40004    # to not find them
40005    if test "x$new_path" = x \
40006        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40007        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40008      new_path=`$CYGPATH -u "$path"`
40009    fi
40010    if test "x$new_path" = x; then
40011      # It's still not found. Now this is an unrecoverable error.
40012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40013$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40014      has_space=`$ECHO "$complete" | $GREP " "`
40015      if test "x$has_space" != x; then
40016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40018      fi
40019      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40020    fi
40021  fi
40022
40023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40026  # "foo.exe" is OK but "foo" is an error.
40027  #
40028  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40029  # It is also a way to make sure we got the proper file name for the real test later on.
40030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40031  if test "x$test_shortpath" = x; then
40032    # Short path failed, file does not exist as specified.
40033    # Try adding .exe or .cmd
40034    if test -f "${new_path}.exe"; then
40035      input_to_shortpath="${new_path}.exe"
40036    elif test -f "${new_path}.cmd"; then
40037      input_to_shortpath="${new_path}.cmd"
40038    else
40039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40040$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40041      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40042$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40043      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40044    fi
40045  else
40046    input_to_shortpath="$new_path"
40047  fi
40048
40049  # Call helper function which possibly converts this using DOS-style short mode.
40050  # If so, the updated path is stored in $new_path.
40051  new_path="$input_to_shortpath"
40052
40053  input_path="$input_to_shortpath"
40054  # Check if we need to convert this using DOS-style short mode. If the path
40055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40056  # take no chances and rewrite it.
40057  # Note: m4 eats our [], so we need to use [ and ] instead.
40058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40059  if test "x$has_forbidden_chars" != x; then
40060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40064      # Going to short mode and back again did indeed matter. Since short mode is
40065      # case insensitive, let's make it lowercase to improve readability.
40066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40067      # Now convert it back to Unix-style (cygpath)
40068      input_path=`$CYGPATH -u "$shortmode_path"`
40069      new_path="$input_path"
40070    fi
40071  fi
40072
40073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40074  if test "x$test_cygdrive_prefix" = x; then
40075    # As a simple fix, exclude /usr/bin since it's not a real path.
40076    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40078      # a path prefixed by /cygdrive for fixpath to work.
40079      new_path="$CYGWIN_ROOT_PATH$input_path"
40080    fi
40081  fi
40082
40083  # remove trailing .exe if any
40084  new_path="${new_path/%.exe/}"
40085
40086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40087
40088  # First separate the path from the arguments. This will split at the first
40089  # space.
40090  complete="$GNM"
40091  path="${complete%% *}"
40092  tmp="$complete EOL"
40093  arguments="${tmp#* }"
40094
40095  # Input might be given as Windows format, start by converting to
40096  # unix format.
40097  new_path="$path"
40098
40099  windows_path="$new_path"
40100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40101    unix_path=`$CYGPATH -u "$windows_path"`
40102    new_path="$unix_path"
40103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40105    new_path="$unix_path"
40106  fi
40107
40108
40109  # Now try to locate executable using which
40110  new_path=`$WHICH "$new_path" 2> /dev/null`
40111
40112  if test "x$new_path" = x; then
40113    # Oops. Which didn't find the executable.
40114    # The splitting of arguments from the executable at a space might have been incorrect,
40115    # since paths with space are more likely in Windows. Give it another try with the whole
40116    # argument.
40117    path="$complete"
40118    arguments="EOL"
40119    new_path="$path"
40120
40121  windows_path="$new_path"
40122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40123    unix_path=`$CYGPATH -u "$windows_path"`
40124    new_path="$unix_path"
40125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40127    new_path="$unix_path"
40128  fi
40129
40130
40131    new_path=`$WHICH "$new_path" 2> /dev/null`
40132    # bat and cmd files are not always considered executable in MSYS causing which
40133    # to not find them
40134    if test "x$new_path" = x \
40135        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40136        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40137      new_path="$path"
40138
40139  windows_path="$new_path"
40140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40141    unix_path=`$CYGPATH -u "$windows_path"`
40142    new_path="$unix_path"
40143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40145    new_path="$unix_path"
40146  fi
40147
40148    fi
40149
40150    if test "x$new_path" = x; then
40151      # It's still not found. Now this is an unrecoverable error.
40152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40153$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40154      has_space=`$ECHO "$complete" | $GREP " "`
40155      if test "x$has_space" != x; then
40156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40158      fi
40159      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40160    fi
40161  fi
40162
40163  # Now new_path has a complete unix path to the binary
40164  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40165    # Keep paths in /bin as-is, but remove trailing .exe if any
40166    new_path="${new_path/%.exe/}"
40167    # Do not save /bin paths to all_fixpath_prefixes!
40168  else
40169    # Not in mixed or Windows style, start by that.
40170    new_path=`cmd //c echo $new_path`
40171
40172  input_path="$new_path"
40173  # Check if we need to convert this using DOS-style short mode. If the path
40174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40175  # take no chances and rewrite it.
40176  # Note: m4 eats our [], so we need to use [ and ] instead.
40177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40178  if test "x$has_forbidden_chars" != x; then
40179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40181  fi
40182
40183    # Output is in $new_path
40184
40185  windows_path="$new_path"
40186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40187    unix_path=`$CYGPATH -u "$windows_path"`
40188    new_path="$unix_path"
40189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40191    new_path="$unix_path"
40192  fi
40193
40194    # remove trailing .exe if any
40195    new_path="${new_path/%.exe/}"
40196
40197    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40198    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40199  fi
40200
40201    else
40202      # We're on a unix platform. Hooray! :)
40203      # First separate the path from the arguments. This will split at the first
40204      # space.
40205      complete="$GNM"
40206      path="${complete%% *}"
40207      tmp="$complete EOL"
40208      arguments="${tmp#* }"
40209
40210      # Cannot rely on the command "which" here since it doesn't always work.
40211      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40212      if test -z "$is_absolute_path"; then
40213        # Path to executable is not absolute. Find it.
40214        IFS_save="$IFS"
40215        IFS=:
40216        for p in $PATH; do
40217          if test -f "$p/$path" && test -x "$p/$path"; then
40218            new_path="$p/$path"
40219            break
40220          fi
40221        done
40222        IFS="$IFS_save"
40223      else
40224        # This is an absolute path, we can use it without further modifications.
40225        new_path="$path"
40226      fi
40227
40228      if test "x$new_path" = x; then
40229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40230$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40231        has_space=`$ECHO "$complete" | $GREP " "`
40232        if test "x$has_space" != x; then
40233          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40234$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40235        fi
40236        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40237      fi
40238    fi
40239
40240    # Now join together the path and the arguments once again
40241    if test "x$arguments" != xEOL; then
40242      new_complete="$new_path ${arguments% *}"
40243    else
40244      new_complete="$new_path"
40245    fi
40246
40247    if test "x$complete" != "x$new_complete"; then
40248      GNM="$new_complete"
40249      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40250$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40251    fi
40252  fi
40253
40254  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40255    # FIXME: we should unify this with the solaris case above.
40256
40257
40258  # Publish this variable in the help.
40259
40260
40261  if [ -z "${STRIP+x}" ]; then
40262    # The variable is not set by user, try to locate tool using the code snippet
40263    if test -n "$ac_tool_prefix"; then
40264  for ac_prog in strip
40265  do
40266    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40267set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40269$as_echo_n "checking for $ac_word... " >&6; }
40270if ${ac_cv_prog_STRIP+:} false; then :
40271  $as_echo_n "(cached) " >&6
40272else
40273  if test -n "$STRIP"; then
40274  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40275else
40276as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40277for as_dir in $PATH
40278do
40279  IFS=$as_save_IFS
40280  test -z "$as_dir" && as_dir=.
40281    for ac_exec_ext in '' $ac_executable_extensions; do
40282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40283    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40285    break 2
40286  fi
40287done
40288  done
40289IFS=$as_save_IFS
40290
40291fi
40292fi
40293STRIP=$ac_cv_prog_STRIP
40294if test -n "$STRIP"; then
40295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40296$as_echo "$STRIP" >&6; }
40297else
40298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40299$as_echo "no" >&6; }
40300fi
40301
40302
40303    test -n "$STRIP" && break
40304  done
40305fi
40306if test -z "$STRIP"; then
40307  ac_ct_STRIP=$STRIP
40308  for ac_prog in strip
40309do
40310  # Extract the first word of "$ac_prog", so it can be a program name with args.
40311set dummy $ac_prog; ac_word=$2
40312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40313$as_echo_n "checking for $ac_word... " >&6; }
40314if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40315  $as_echo_n "(cached) " >&6
40316else
40317  if test -n "$ac_ct_STRIP"; then
40318  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40319else
40320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40321for as_dir in $PATH
40322do
40323  IFS=$as_save_IFS
40324  test -z "$as_dir" && as_dir=.
40325    for ac_exec_ext in '' $ac_executable_extensions; do
40326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40327    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40329    break 2
40330  fi
40331done
40332  done
40333IFS=$as_save_IFS
40334
40335fi
40336fi
40337ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40338if test -n "$ac_ct_STRIP"; then
40339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40340$as_echo "$ac_ct_STRIP" >&6; }
40341else
40342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40343$as_echo "no" >&6; }
40344fi
40345
40346
40347  test -n "$ac_ct_STRIP" && break
40348done
40349
40350  if test "x$ac_ct_STRIP" = x; then
40351    STRIP=""
40352  else
40353    case $cross_compiling:$ac_tool_warned in
40354yes:)
40355{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40356$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40357ac_tool_warned=yes ;;
40358esac
40359    STRIP=$ac_ct_STRIP
40360  fi
40361fi
40362
40363  else
40364    # The variable is set, but is it from the command line or the environment?
40365
40366    # Try to remove the string !STRIP! from our list.
40367    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40368    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40369      # If it failed, the variable was not from the command line. Ignore it,
40370      # but warn the user (except for BASH, which is always set by the calling BASH).
40371      if test "xSTRIP" != xBASH; then
40372        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40373$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40374      fi
40375      # Try to locate tool using the code snippet
40376      if test -n "$ac_tool_prefix"; then
40377  for ac_prog in strip
40378  do
40379    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40380set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40382$as_echo_n "checking for $ac_word... " >&6; }
40383if ${ac_cv_prog_STRIP+:} false; then :
40384  $as_echo_n "(cached) " >&6
40385else
40386  if test -n "$STRIP"; then
40387  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40388else
40389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40390for as_dir in $PATH
40391do
40392  IFS=$as_save_IFS
40393  test -z "$as_dir" && as_dir=.
40394    for ac_exec_ext in '' $ac_executable_extensions; do
40395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40396    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40398    break 2
40399  fi
40400done
40401  done
40402IFS=$as_save_IFS
40403
40404fi
40405fi
40406STRIP=$ac_cv_prog_STRIP
40407if test -n "$STRIP"; then
40408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40409$as_echo "$STRIP" >&6; }
40410else
40411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40412$as_echo "no" >&6; }
40413fi
40414
40415
40416    test -n "$STRIP" && break
40417  done
40418fi
40419if test -z "$STRIP"; then
40420  ac_ct_STRIP=$STRIP
40421  for ac_prog in strip
40422do
40423  # Extract the first word of "$ac_prog", so it can be a program name with args.
40424set dummy $ac_prog; ac_word=$2
40425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40426$as_echo_n "checking for $ac_word... " >&6; }
40427if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40428  $as_echo_n "(cached) " >&6
40429else
40430  if test -n "$ac_ct_STRIP"; then
40431  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40432else
40433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40434for as_dir in $PATH
40435do
40436  IFS=$as_save_IFS
40437  test -z "$as_dir" && as_dir=.
40438    for ac_exec_ext in '' $ac_executable_extensions; do
40439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40440    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40442    break 2
40443  fi
40444done
40445  done
40446IFS=$as_save_IFS
40447
40448fi
40449fi
40450ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40451if test -n "$ac_ct_STRIP"; then
40452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40453$as_echo "$ac_ct_STRIP" >&6; }
40454else
40455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40456$as_echo "no" >&6; }
40457fi
40458
40459
40460  test -n "$ac_ct_STRIP" && break
40461done
40462
40463  if test "x$ac_ct_STRIP" = x; then
40464    STRIP=""
40465  else
40466    case $cross_compiling:$ac_tool_warned in
40467yes:)
40468{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40469$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40470ac_tool_warned=yes ;;
40471esac
40472    STRIP=$ac_ct_STRIP
40473  fi
40474fi
40475
40476    else
40477      # If it succeeded, then it was overridden by the user. We will use it
40478      # for the tool.
40479
40480      # First remove it from the list of overridden variables, so we can test
40481      # for unknown variables in the end.
40482      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40483
40484      # Check if we try to supply an empty value
40485      if test "x$STRIP" = x; then
40486        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40487$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40488        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40489$as_echo_n "checking for STRIP... " >&6; }
40490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40491$as_echo "disabled" >&6; }
40492      else
40493        # Check if the provided tool contains a complete path.
40494        tool_specified="$STRIP"
40495        tool_basename="${tool_specified##*/}"
40496        if test "x$tool_basename" = "x$tool_specified"; then
40497          # A command without a complete path is provided, search $PATH.
40498          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40499$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40500          # Extract the first word of "$tool_basename", so it can be a program name with args.
40501set dummy $tool_basename; ac_word=$2
40502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40503$as_echo_n "checking for $ac_word... " >&6; }
40504if ${ac_cv_path_STRIP+:} false; then :
40505  $as_echo_n "(cached) " >&6
40506else
40507  case $STRIP in
40508  [\\/]* | ?:[\\/]*)
40509  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40510  ;;
40511  *)
40512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40513for as_dir in $PATH
40514do
40515  IFS=$as_save_IFS
40516  test -z "$as_dir" && as_dir=.
40517    for ac_exec_ext in '' $ac_executable_extensions; do
40518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40519    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40521    break 2
40522  fi
40523done
40524  done
40525IFS=$as_save_IFS
40526
40527  ;;
40528esac
40529fi
40530STRIP=$ac_cv_path_STRIP
40531if test -n "$STRIP"; then
40532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40533$as_echo "$STRIP" >&6; }
40534else
40535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40536$as_echo "no" >&6; }
40537fi
40538
40539
40540          if test "x$STRIP" = x; then
40541            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40542          fi
40543        else
40544          # Otherwise we believe it is a complete path. Use it as it is.
40545          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40546$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40547          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40548$as_echo_n "checking for STRIP... " >&6; }
40549          if test ! -x "$tool_specified"; then
40550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40551$as_echo "not found" >&6; }
40552            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40553          fi
40554          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40555$as_echo "$tool_specified" >&6; }
40556        fi
40557      fi
40558    fi
40559
40560  fi
40561
40562
40563
40564  # Only process if variable expands to non-empty
40565
40566  if test "x$STRIP" != x; then
40567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40568
40569  # First separate the path from the arguments. This will split at the first
40570  # space.
40571  complete="$STRIP"
40572  path="${complete%% *}"
40573  tmp="$complete EOL"
40574  arguments="${tmp#* }"
40575
40576  # Input might be given as Windows format, start by converting to
40577  # unix format.
40578  new_path=`$CYGPATH -u "$path"`
40579
40580  # Now try to locate executable using which
40581  new_path=`$WHICH "$new_path" 2> /dev/null`
40582  # bat and cmd files are not always considered executable in cygwin causing which
40583  # to not find them
40584  if test "x$new_path" = x \
40585      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40586      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40587    new_path=`$CYGPATH -u "$path"`
40588  fi
40589  if test "x$new_path" = x; then
40590    # Oops. Which didn't find the executable.
40591    # The splitting of arguments from the executable at a space might have been incorrect,
40592    # since paths with space are more likely in Windows. Give it another try with the whole
40593    # argument.
40594    path="$complete"
40595    arguments="EOL"
40596    new_path=`$CYGPATH -u "$path"`
40597    new_path=`$WHICH "$new_path" 2> /dev/null`
40598    # bat and cmd files are not always considered executable in cygwin causing which
40599    # to not find them
40600    if test "x$new_path" = x \
40601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40603      new_path=`$CYGPATH -u "$path"`
40604    fi
40605    if test "x$new_path" = x; then
40606      # It's still not found. Now this is an unrecoverable error.
40607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40608$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40609      has_space=`$ECHO "$complete" | $GREP " "`
40610      if test "x$has_space" != x; then
40611        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40612$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40613      fi
40614      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40615    fi
40616  fi
40617
40618  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40619  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40620  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40621  # "foo.exe" is OK but "foo" is an error.
40622  #
40623  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40624  # It is also a way to make sure we got the proper file name for the real test later on.
40625  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40626  if test "x$test_shortpath" = x; then
40627    # Short path failed, file does not exist as specified.
40628    # Try adding .exe or .cmd
40629    if test -f "${new_path}.exe"; then
40630      input_to_shortpath="${new_path}.exe"
40631    elif test -f "${new_path}.cmd"; then
40632      input_to_shortpath="${new_path}.cmd"
40633    else
40634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40635$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40636      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40637$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40638      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40639    fi
40640  else
40641    input_to_shortpath="$new_path"
40642  fi
40643
40644  # Call helper function which possibly converts this using DOS-style short mode.
40645  # If so, the updated path is stored in $new_path.
40646  new_path="$input_to_shortpath"
40647
40648  input_path="$input_to_shortpath"
40649  # Check if we need to convert this using DOS-style short mode. If the path
40650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40651  # take no chances and rewrite it.
40652  # Note: m4 eats our [], so we need to use [ and ] instead.
40653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40654  if test "x$has_forbidden_chars" != x; then
40655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40659      # Going to short mode and back again did indeed matter. Since short mode is
40660      # case insensitive, let's make it lowercase to improve readability.
40661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40662      # Now convert it back to Unix-style (cygpath)
40663      input_path=`$CYGPATH -u "$shortmode_path"`
40664      new_path="$input_path"
40665    fi
40666  fi
40667
40668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40669  if test "x$test_cygdrive_prefix" = x; then
40670    # As a simple fix, exclude /usr/bin since it's not a real path.
40671    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40673      # a path prefixed by /cygdrive for fixpath to work.
40674      new_path="$CYGWIN_ROOT_PATH$input_path"
40675    fi
40676  fi
40677
40678  # remove trailing .exe if any
40679  new_path="${new_path/%.exe/}"
40680
40681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40682
40683  # First separate the path from the arguments. This will split at the first
40684  # space.
40685  complete="$STRIP"
40686  path="${complete%% *}"
40687  tmp="$complete EOL"
40688  arguments="${tmp#* }"
40689
40690  # Input might be given as Windows format, start by converting to
40691  # unix format.
40692  new_path="$path"
40693
40694  windows_path="$new_path"
40695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40696    unix_path=`$CYGPATH -u "$windows_path"`
40697    new_path="$unix_path"
40698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40700    new_path="$unix_path"
40701  fi
40702
40703
40704  # Now try to locate executable using which
40705  new_path=`$WHICH "$new_path" 2> /dev/null`
40706
40707  if test "x$new_path" = x; then
40708    # Oops. Which didn't find the executable.
40709    # The splitting of arguments from the executable at a space might have been incorrect,
40710    # since paths with space are more likely in Windows. Give it another try with the whole
40711    # argument.
40712    path="$complete"
40713    arguments="EOL"
40714    new_path="$path"
40715
40716  windows_path="$new_path"
40717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40718    unix_path=`$CYGPATH -u "$windows_path"`
40719    new_path="$unix_path"
40720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40722    new_path="$unix_path"
40723  fi
40724
40725
40726    new_path=`$WHICH "$new_path" 2> /dev/null`
40727    # bat and cmd files are not always considered executable in MSYS causing which
40728    # to not find them
40729    if test "x$new_path" = x \
40730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40732      new_path="$path"
40733
40734  windows_path="$new_path"
40735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40736    unix_path=`$CYGPATH -u "$windows_path"`
40737    new_path="$unix_path"
40738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40740    new_path="$unix_path"
40741  fi
40742
40743    fi
40744
40745    if test "x$new_path" = x; then
40746      # It's still not found. Now this is an unrecoverable error.
40747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40748$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40749      has_space=`$ECHO "$complete" | $GREP " "`
40750      if test "x$has_space" != x; then
40751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40753      fi
40754      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40755    fi
40756  fi
40757
40758  # Now new_path has a complete unix path to the binary
40759  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40760    # Keep paths in /bin as-is, but remove trailing .exe if any
40761    new_path="${new_path/%.exe/}"
40762    # Do not save /bin paths to all_fixpath_prefixes!
40763  else
40764    # Not in mixed or Windows style, start by that.
40765    new_path=`cmd //c echo $new_path`
40766
40767  input_path="$new_path"
40768  # Check if we need to convert this using DOS-style short mode. If the path
40769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40770  # take no chances and rewrite it.
40771  # Note: m4 eats our [], so we need to use [ and ] instead.
40772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40773  if test "x$has_forbidden_chars" != x; then
40774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40776  fi
40777
40778    # Output is in $new_path
40779
40780  windows_path="$new_path"
40781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40782    unix_path=`$CYGPATH -u "$windows_path"`
40783    new_path="$unix_path"
40784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40786    new_path="$unix_path"
40787  fi
40788
40789    # remove trailing .exe if any
40790    new_path="${new_path/%.exe/}"
40791
40792    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40793    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40794  fi
40795
40796    else
40797      # We're on a unix platform. Hooray! :)
40798      # First separate the path from the arguments. This will split at the first
40799      # space.
40800      complete="$STRIP"
40801      path="${complete%% *}"
40802      tmp="$complete EOL"
40803      arguments="${tmp#* }"
40804
40805      # Cannot rely on the command "which" here since it doesn't always work.
40806      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40807      if test -z "$is_absolute_path"; then
40808        # Path to executable is not absolute. Find it.
40809        IFS_save="$IFS"
40810        IFS=:
40811        for p in $PATH; do
40812          if test -f "$p/$path" && test -x "$p/$path"; then
40813            new_path="$p/$path"
40814            break
40815          fi
40816        done
40817        IFS="$IFS_save"
40818      else
40819        # This is an absolute path, we can use it without further modifications.
40820        new_path="$path"
40821      fi
40822
40823      if test "x$new_path" = x; then
40824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40825$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40826        has_space=`$ECHO "$complete" | $GREP " "`
40827        if test "x$has_space" != x; then
40828          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40829$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40830        fi
40831        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40832      fi
40833    fi
40834
40835    # Now join together the path and the arguments once again
40836    if test "x$arguments" != xEOL; then
40837      new_complete="$new_path ${arguments% *}"
40838    else
40839      new_complete="$new_path"
40840    fi
40841
40842    if test "x$complete" != "x$new_complete"; then
40843      STRIP="$new_complete"
40844      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40845$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40846    fi
40847  fi
40848
40849    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40850
40851
40852  # Publish this variable in the help.
40853
40854
40855  if [ -z "${NM+x}" ]; then
40856    # The variable is not set by user, try to locate tool using the code snippet
40857    if test -n "$ac_tool_prefix"; then
40858  for ac_prog in nm gcc-nm
40859  do
40860    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40861set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40863$as_echo_n "checking for $ac_word... " >&6; }
40864if ${ac_cv_prog_NM+:} false; then :
40865  $as_echo_n "(cached) " >&6
40866else
40867  if test -n "$NM"; then
40868  ac_cv_prog_NM="$NM" # Let the user override the test.
40869else
40870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40871for as_dir in $PATH
40872do
40873  IFS=$as_save_IFS
40874  test -z "$as_dir" && as_dir=.
40875    for ac_exec_ext in '' $ac_executable_extensions; do
40876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40877    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40879    break 2
40880  fi
40881done
40882  done
40883IFS=$as_save_IFS
40884
40885fi
40886fi
40887NM=$ac_cv_prog_NM
40888if test -n "$NM"; then
40889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40890$as_echo "$NM" >&6; }
40891else
40892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40893$as_echo "no" >&6; }
40894fi
40895
40896
40897    test -n "$NM" && break
40898  done
40899fi
40900if test -z "$NM"; then
40901  ac_ct_NM=$NM
40902  for ac_prog in nm gcc-nm
40903do
40904  # Extract the first word of "$ac_prog", so it can be a program name with args.
40905set dummy $ac_prog; ac_word=$2
40906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40907$as_echo_n "checking for $ac_word... " >&6; }
40908if ${ac_cv_prog_ac_ct_NM+:} false; then :
40909  $as_echo_n "(cached) " >&6
40910else
40911  if test -n "$ac_ct_NM"; then
40912  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40913else
40914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40915for as_dir in $PATH
40916do
40917  IFS=$as_save_IFS
40918  test -z "$as_dir" && as_dir=.
40919    for ac_exec_ext in '' $ac_executable_extensions; do
40920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40921    ac_cv_prog_ac_ct_NM="$ac_prog"
40922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40923    break 2
40924  fi
40925done
40926  done
40927IFS=$as_save_IFS
40928
40929fi
40930fi
40931ac_ct_NM=$ac_cv_prog_ac_ct_NM
40932if test -n "$ac_ct_NM"; then
40933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40934$as_echo "$ac_ct_NM" >&6; }
40935else
40936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40937$as_echo "no" >&6; }
40938fi
40939
40940
40941  test -n "$ac_ct_NM" && break
40942done
40943
40944  if test "x$ac_ct_NM" = x; then
40945    NM=""
40946  else
40947    case $cross_compiling:$ac_tool_warned in
40948yes:)
40949{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40950$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40951ac_tool_warned=yes ;;
40952esac
40953    NM=$ac_ct_NM
40954  fi
40955fi
40956
40957  else
40958    # The variable is set, but is it from the command line or the environment?
40959
40960    # Try to remove the string !NM! from our list.
40961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40963      # If it failed, the variable was not from the command line. Ignore it,
40964      # but warn the user (except for BASH, which is always set by the calling BASH).
40965      if test "xNM" != xBASH; then
40966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40967$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40968      fi
40969      # Try to locate tool using the code snippet
40970      if test -n "$ac_tool_prefix"; then
40971  for ac_prog in nm gcc-nm
40972  do
40973    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40974set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40976$as_echo_n "checking for $ac_word... " >&6; }
40977if ${ac_cv_prog_NM+:} false; then :
40978  $as_echo_n "(cached) " >&6
40979else
40980  if test -n "$NM"; then
40981  ac_cv_prog_NM="$NM" # Let the user override the test.
40982else
40983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40984for as_dir in $PATH
40985do
40986  IFS=$as_save_IFS
40987  test -z "$as_dir" && as_dir=.
40988    for ac_exec_ext in '' $ac_executable_extensions; do
40989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40990    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40992    break 2
40993  fi
40994done
40995  done
40996IFS=$as_save_IFS
40997
40998fi
40999fi
41000NM=$ac_cv_prog_NM
41001if test -n "$NM"; then
41002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41003$as_echo "$NM" >&6; }
41004else
41005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41006$as_echo "no" >&6; }
41007fi
41008
41009
41010    test -n "$NM" && break
41011  done
41012fi
41013if test -z "$NM"; then
41014  ac_ct_NM=$NM
41015  for ac_prog in nm gcc-nm
41016do
41017  # Extract the first word of "$ac_prog", so it can be a program name with args.
41018set dummy $ac_prog; ac_word=$2
41019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41020$as_echo_n "checking for $ac_word... " >&6; }
41021if ${ac_cv_prog_ac_ct_NM+:} false; then :
41022  $as_echo_n "(cached) " >&6
41023else
41024  if test -n "$ac_ct_NM"; then
41025  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41026else
41027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41028for as_dir in $PATH
41029do
41030  IFS=$as_save_IFS
41031  test -z "$as_dir" && as_dir=.
41032    for ac_exec_ext in '' $ac_executable_extensions; do
41033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41034    ac_cv_prog_ac_ct_NM="$ac_prog"
41035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41036    break 2
41037  fi
41038done
41039  done
41040IFS=$as_save_IFS
41041
41042fi
41043fi
41044ac_ct_NM=$ac_cv_prog_ac_ct_NM
41045if test -n "$ac_ct_NM"; then
41046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41047$as_echo "$ac_ct_NM" >&6; }
41048else
41049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41050$as_echo "no" >&6; }
41051fi
41052
41053
41054  test -n "$ac_ct_NM" && break
41055done
41056
41057  if test "x$ac_ct_NM" = x; then
41058    NM=""
41059  else
41060    case $cross_compiling:$ac_tool_warned in
41061yes:)
41062{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41063$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41064ac_tool_warned=yes ;;
41065esac
41066    NM=$ac_ct_NM
41067  fi
41068fi
41069
41070    else
41071      # If it succeeded, then it was overridden by the user. We will use it
41072      # for the tool.
41073
41074      # First remove it from the list of overridden variables, so we can test
41075      # for unknown variables in the end.
41076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41077
41078      # Check if we try to supply an empty value
41079      if test "x$NM" = x; then
41080        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41081$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41083$as_echo_n "checking for NM... " >&6; }
41084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41085$as_echo "disabled" >&6; }
41086      else
41087        # Check if the provided tool contains a complete path.
41088        tool_specified="$NM"
41089        tool_basename="${tool_specified##*/}"
41090        if test "x$tool_basename" = "x$tool_specified"; then
41091          # A command without a complete path is provided, search $PATH.
41092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41093$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41094          # Extract the first word of "$tool_basename", so it can be a program name with args.
41095set dummy $tool_basename; ac_word=$2
41096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41097$as_echo_n "checking for $ac_word... " >&6; }
41098if ${ac_cv_path_NM+:} false; then :
41099  $as_echo_n "(cached) " >&6
41100else
41101  case $NM in
41102  [\\/]* | ?:[\\/]*)
41103  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41104  ;;
41105  *)
41106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41107for as_dir in $PATH
41108do
41109  IFS=$as_save_IFS
41110  test -z "$as_dir" && as_dir=.
41111    for ac_exec_ext in '' $ac_executable_extensions; do
41112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41113    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41115    break 2
41116  fi
41117done
41118  done
41119IFS=$as_save_IFS
41120
41121  ;;
41122esac
41123fi
41124NM=$ac_cv_path_NM
41125if test -n "$NM"; then
41126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41127$as_echo "$NM" >&6; }
41128else
41129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41130$as_echo "no" >&6; }
41131fi
41132
41133
41134          if test "x$NM" = x; then
41135            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41136          fi
41137        else
41138          # Otherwise we believe it is a complete path. Use it as it is.
41139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41140$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41141          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41142$as_echo_n "checking for NM... " >&6; }
41143          if test ! -x "$tool_specified"; then
41144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41145$as_echo "not found" >&6; }
41146            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41147          fi
41148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41149$as_echo "$tool_specified" >&6; }
41150        fi
41151      fi
41152    fi
41153
41154  fi
41155
41156
41157    else
41158
41159
41160  # Publish this variable in the help.
41161
41162
41163  if [ -z "${NM+x}" ]; then
41164    # The variable is not set by user, try to locate tool using the code snippet
41165    if test -n "$ac_tool_prefix"; then
41166  for ac_prog in nm
41167  do
41168    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41169set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41171$as_echo_n "checking for $ac_word... " >&6; }
41172if ${ac_cv_prog_NM+:} false; then :
41173  $as_echo_n "(cached) " >&6
41174else
41175  if test -n "$NM"; then
41176  ac_cv_prog_NM="$NM" # Let the user override the test.
41177else
41178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41179for as_dir in $PATH
41180do
41181  IFS=$as_save_IFS
41182  test -z "$as_dir" && as_dir=.
41183    for ac_exec_ext in '' $ac_executable_extensions; do
41184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41185    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41187    break 2
41188  fi
41189done
41190  done
41191IFS=$as_save_IFS
41192
41193fi
41194fi
41195NM=$ac_cv_prog_NM
41196if test -n "$NM"; then
41197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41198$as_echo "$NM" >&6; }
41199else
41200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41201$as_echo "no" >&6; }
41202fi
41203
41204
41205    test -n "$NM" && break
41206  done
41207fi
41208if test -z "$NM"; then
41209  ac_ct_NM=$NM
41210  for ac_prog in nm
41211do
41212  # Extract the first word of "$ac_prog", so it can be a program name with args.
41213set dummy $ac_prog; ac_word=$2
41214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41215$as_echo_n "checking for $ac_word... " >&6; }
41216if ${ac_cv_prog_ac_ct_NM+:} false; then :
41217  $as_echo_n "(cached) " >&6
41218else
41219  if test -n "$ac_ct_NM"; then
41220  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41221else
41222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41223for as_dir in $PATH
41224do
41225  IFS=$as_save_IFS
41226  test -z "$as_dir" && as_dir=.
41227    for ac_exec_ext in '' $ac_executable_extensions; do
41228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41229    ac_cv_prog_ac_ct_NM="$ac_prog"
41230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41231    break 2
41232  fi
41233done
41234  done
41235IFS=$as_save_IFS
41236
41237fi
41238fi
41239ac_ct_NM=$ac_cv_prog_ac_ct_NM
41240if test -n "$ac_ct_NM"; then
41241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41242$as_echo "$ac_ct_NM" >&6; }
41243else
41244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41245$as_echo "no" >&6; }
41246fi
41247
41248
41249  test -n "$ac_ct_NM" && break
41250done
41251
41252  if test "x$ac_ct_NM" = x; then
41253    NM=""
41254  else
41255    case $cross_compiling:$ac_tool_warned in
41256yes:)
41257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41259ac_tool_warned=yes ;;
41260esac
41261    NM=$ac_ct_NM
41262  fi
41263fi
41264
41265  else
41266    # The variable is set, but is it from the command line or the environment?
41267
41268    # Try to remove the string !NM! from our list.
41269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41271      # If it failed, the variable was not from the command line. Ignore it,
41272      # but warn the user (except for BASH, which is always set by the calling BASH).
41273      if test "xNM" != xBASH; then
41274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41275$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41276      fi
41277      # Try to locate tool using the code snippet
41278      if test -n "$ac_tool_prefix"; then
41279  for ac_prog in nm
41280  do
41281    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41282set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41284$as_echo_n "checking for $ac_word... " >&6; }
41285if ${ac_cv_prog_NM+:} false; then :
41286  $as_echo_n "(cached) " >&6
41287else
41288  if test -n "$NM"; then
41289  ac_cv_prog_NM="$NM" # Let the user override the test.
41290else
41291as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41292for as_dir in $PATH
41293do
41294  IFS=$as_save_IFS
41295  test -z "$as_dir" && as_dir=.
41296    for ac_exec_ext in '' $ac_executable_extensions; do
41297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41298    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41300    break 2
41301  fi
41302done
41303  done
41304IFS=$as_save_IFS
41305
41306fi
41307fi
41308NM=$ac_cv_prog_NM
41309if test -n "$NM"; then
41310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41311$as_echo "$NM" >&6; }
41312else
41313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41314$as_echo "no" >&6; }
41315fi
41316
41317
41318    test -n "$NM" && break
41319  done
41320fi
41321if test -z "$NM"; then
41322  ac_ct_NM=$NM
41323  for ac_prog in nm
41324do
41325  # Extract the first word of "$ac_prog", so it can be a program name with args.
41326set dummy $ac_prog; ac_word=$2
41327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41328$as_echo_n "checking for $ac_word... " >&6; }
41329if ${ac_cv_prog_ac_ct_NM+:} false; then :
41330  $as_echo_n "(cached) " >&6
41331else
41332  if test -n "$ac_ct_NM"; then
41333  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41334else
41335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41336for as_dir in $PATH
41337do
41338  IFS=$as_save_IFS
41339  test -z "$as_dir" && as_dir=.
41340    for ac_exec_ext in '' $ac_executable_extensions; do
41341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41342    ac_cv_prog_ac_ct_NM="$ac_prog"
41343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41344    break 2
41345  fi
41346done
41347  done
41348IFS=$as_save_IFS
41349
41350fi
41351fi
41352ac_ct_NM=$ac_cv_prog_ac_ct_NM
41353if test -n "$ac_ct_NM"; then
41354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41355$as_echo "$ac_ct_NM" >&6; }
41356else
41357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41358$as_echo "no" >&6; }
41359fi
41360
41361
41362  test -n "$ac_ct_NM" && break
41363done
41364
41365  if test "x$ac_ct_NM" = x; then
41366    NM=""
41367  else
41368    case $cross_compiling:$ac_tool_warned in
41369yes:)
41370{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41371$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41372ac_tool_warned=yes ;;
41373esac
41374    NM=$ac_ct_NM
41375  fi
41376fi
41377
41378    else
41379      # If it succeeded, then it was overridden by the user. We will use it
41380      # for the tool.
41381
41382      # First remove it from the list of overridden variables, so we can test
41383      # for unknown variables in the end.
41384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41385
41386      # Check if we try to supply an empty value
41387      if test "x$NM" = x; then
41388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41389$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41391$as_echo_n "checking for NM... " >&6; }
41392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41393$as_echo "disabled" >&6; }
41394      else
41395        # Check if the provided tool contains a complete path.
41396        tool_specified="$NM"
41397        tool_basename="${tool_specified##*/}"
41398        if test "x$tool_basename" = "x$tool_specified"; then
41399          # A command without a complete path is provided, search $PATH.
41400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41401$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41402          # Extract the first word of "$tool_basename", so it can be a program name with args.
41403set dummy $tool_basename; ac_word=$2
41404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41405$as_echo_n "checking for $ac_word... " >&6; }
41406if ${ac_cv_path_NM+:} false; then :
41407  $as_echo_n "(cached) " >&6
41408else
41409  case $NM in
41410  [\\/]* | ?:[\\/]*)
41411  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41412  ;;
41413  *)
41414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41415for as_dir in $PATH
41416do
41417  IFS=$as_save_IFS
41418  test -z "$as_dir" && as_dir=.
41419    for ac_exec_ext in '' $ac_executable_extensions; do
41420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41421    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41423    break 2
41424  fi
41425done
41426  done
41427IFS=$as_save_IFS
41428
41429  ;;
41430esac
41431fi
41432NM=$ac_cv_path_NM
41433if test -n "$NM"; then
41434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41435$as_echo "$NM" >&6; }
41436else
41437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41438$as_echo "no" >&6; }
41439fi
41440
41441
41442          if test "x$NM" = x; then
41443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41444          fi
41445        else
41446          # Otherwise we believe it is a complete path. Use it as it is.
41447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41448$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41450$as_echo_n "checking for NM... " >&6; }
41451          if test ! -x "$tool_specified"; then
41452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41453$as_echo "not found" >&6; }
41454            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41455          fi
41456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41457$as_echo "$tool_specified" >&6; }
41458        fi
41459      fi
41460    fi
41461
41462  fi
41463
41464
41465    fi
41466
41467  # Only process if variable expands to non-empty
41468
41469  if test "x$NM" != x; then
41470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41471
41472  # First separate the path from the arguments. This will split at the first
41473  # space.
41474  complete="$NM"
41475  path="${complete%% *}"
41476  tmp="$complete EOL"
41477  arguments="${tmp#* }"
41478
41479  # Input might be given as Windows format, start by converting to
41480  # unix format.
41481  new_path=`$CYGPATH -u "$path"`
41482
41483  # Now try to locate executable using which
41484  new_path=`$WHICH "$new_path" 2> /dev/null`
41485  # bat and cmd files are not always considered executable in cygwin causing which
41486  # to not find them
41487  if test "x$new_path" = x \
41488      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41489      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41490    new_path=`$CYGPATH -u "$path"`
41491  fi
41492  if test "x$new_path" = x; then
41493    # Oops. Which didn't find the executable.
41494    # The splitting of arguments from the executable at a space might have been incorrect,
41495    # since paths with space are more likely in Windows. Give it another try with the whole
41496    # argument.
41497    path="$complete"
41498    arguments="EOL"
41499    new_path=`$CYGPATH -u "$path"`
41500    new_path=`$WHICH "$new_path" 2> /dev/null`
41501    # bat and cmd files are not always considered executable in cygwin causing which
41502    # to not find them
41503    if test "x$new_path" = x \
41504        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41505        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41506      new_path=`$CYGPATH -u "$path"`
41507    fi
41508    if test "x$new_path" = x; then
41509      # It's still not found. Now this is an unrecoverable error.
41510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41511$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41512      has_space=`$ECHO "$complete" | $GREP " "`
41513      if test "x$has_space" != x; then
41514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41516      fi
41517      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41518    fi
41519  fi
41520
41521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41524  # "foo.exe" is OK but "foo" is an error.
41525  #
41526  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41527  # It is also a way to make sure we got the proper file name for the real test later on.
41528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41529  if test "x$test_shortpath" = x; then
41530    # Short path failed, file does not exist as specified.
41531    # Try adding .exe or .cmd
41532    if test -f "${new_path}.exe"; then
41533      input_to_shortpath="${new_path}.exe"
41534    elif test -f "${new_path}.cmd"; then
41535      input_to_shortpath="${new_path}.cmd"
41536    else
41537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41538$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41539      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41540$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41541      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41542    fi
41543  else
41544    input_to_shortpath="$new_path"
41545  fi
41546
41547  # Call helper function which possibly converts this using DOS-style short mode.
41548  # If so, the updated path is stored in $new_path.
41549  new_path="$input_to_shortpath"
41550
41551  input_path="$input_to_shortpath"
41552  # Check if we need to convert this using DOS-style short mode. If the path
41553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41554  # take no chances and rewrite it.
41555  # Note: m4 eats our [], so we need to use [ and ] instead.
41556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41557  if test "x$has_forbidden_chars" != x; then
41558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41562      # Going to short mode and back again did indeed matter. Since short mode is
41563      # case insensitive, let's make it lowercase to improve readability.
41564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41565      # Now convert it back to Unix-style (cygpath)
41566      input_path=`$CYGPATH -u "$shortmode_path"`
41567      new_path="$input_path"
41568    fi
41569  fi
41570
41571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41572  if test "x$test_cygdrive_prefix" = x; then
41573    # As a simple fix, exclude /usr/bin since it's not a real path.
41574    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41576      # a path prefixed by /cygdrive for fixpath to work.
41577      new_path="$CYGWIN_ROOT_PATH$input_path"
41578    fi
41579  fi
41580
41581  # remove trailing .exe if any
41582  new_path="${new_path/%.exe/}"
41583
41584    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41585
41586  # First separate the path from the arguments. This will split at the first
41587  # space.
41588  complete="$NM"
41589  path="${complete%% *}"
41590  tmp="$complete EOL"
41591  arguments="${tmp#* }"
41592
41593  # Input might be given as Windows format, start by converting to
41594  # unix format.
41595  new_path="$path"
41596
41597  windows_path="$new_path"
41598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41599    unix_path=`$CYGPATH -u "$windows_path"`
41600    new_path="$unix_path"
41601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41603    new_path="$unix_path"
41604  fi
41605
41606
41607  # Now try to locate executable using which
41608  new_path=`$WHICH "$new_path" 2> /dev/null`
41609
41610  if test "x$new_path" = x; then
41611    # Oops. Which didn't find the executable.
41612    # The splitting of arguments from the executable at a space might have been incorrect,
41613    # since paths with space are more likely in Windows. Give it another try with the whole
41614    # argument.
41615    path="$complete"
41616    arguments="EOL"
41617    new_path="$path"
41618
41619  windows_path="$new_path"
41620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41621    unix_path=`$CYGPATH -u "$windows_path"`
41622    new_path="$unix_path"
41623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41625    new_path="$unix_path"
41626  fi
41627
41628
41629    new_path=`$WHICH "$new_path" 2> /dev/null`
41630    # bat and cmd files are not always considered executable in MSYS causing which
41631    # to not find them
41632    if test "x$new_path" = x \
41633        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41634        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41635      new_path="$path"
41636
41637  windows_path="$new_path"
41638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41639    unix_path=`$CYGPATH -u "$windows_path"`
41640    new_path="$unix_path"
41641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41643    new_path="$unix_path"
41644  fi
41645
41646    fi
41647
41648    if test "x$new_path" = x; then
41649      # It's still not found. Now this is an unrecoverable error.
41650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41651$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41652      has_space=`$ECHO "$complete" | $GREP " "`
41653      if test "x$has_space" != x; then
41654        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41655$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41656      fi
41657      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41658    fi
41659  fi
41660
41661  # Now new_path has a complete unix path to the binary
41662  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41663    # Keep paths in /bin as-is, but remove trailing .exe if any
41664    new_path="${new_path/%.exe/}"
41665    # Do not save /bin paths to all_fixpath_prefixes!
41666  else
41667    # Not in mixed or Windows style, start by that.
41668    new_path=`cmd //c echo $new_path`
41669
41670  input_path="$new_path"
41671  # Check if we need to convert this using DOS-style short mode. If the path
41672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41673  # take no chances and rewrite it.
41674  # Note: m4 eats our [], so we need to use [ and ] instead.
41675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41676  if test "x$has_forbidden_chars" != x; then
41677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41679  fi
41680
41681    # Output is in $new_path
41682
41683  windows_path="$new_path"
41684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41685    unix_path=`$CYGPATH -u "$windows_path"`
41686    new_path="$unix_path"
41687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41689    new_path="$unix_path"
41690  fi
41691
41692    # remove trailing .exe if any
41693    new_path="${new_path/%.exe/}"
41694
41695    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41696    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41697  fi
41698
41699    else
41700      # We're on a unix platform. Hooray! :)
41701      # First separate the path from the arguments. This will split at the first
41702      # space.
41703      complete="$NM"
41704      path="${complete%% *}"
41705      tmp="$complete EOL"
41706      arguments="${tmp#* }"
41707
41708      # Cannot rely on the command "which" here since it doesn't always work.
41709      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41710      if test -z "$is_absolute_path"; then
41711        # Path to executable is not absolute. Find it.
41712        IFS_save="$IFS"
41713        IFS=:
41714        for p in $PATH; do
41715          if test -f "$p/$path" && test -x "$p/$path"; then
41716            new_path="$p/$path"
41717            break
41718          fi
41719        done
41720        IFS="$IFS_save"
41721      else
41722        # This is an absolute path, we can use it without further modifications.
41723        new_path="$path"
41724      fi
41725
41726      if test "x$new_path" = x; then
41727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41728$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41729        has_space=`$ECHO "$complete" | $GREP " "`
41730        if test "x$has_space" != x; then
41731          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41732$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41733        fi
41734        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41735      fi
41736    fi
41737
41738    # Now join together the path and the arguments once again
41739    if test "x$arguments" != xEOL; then
41740      new_complete="$new_path ${arguments% *}"
41741    else
41742      new_complete="$new_path"
41743    fi
41744
41745    if test "x$complete" != "x$new_complete"; then
41746      NM="$new_complete"
41747      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41748$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41749    fi
41750  fi
41751
41752    GNM="$NM"
41753
41754  fi
41755
41756  # objcopy is used for moving debug symbols to separate files when
41757  # full debug symbols are enabled.
41758  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41759
41760
41761  # Publish this variable in the help.
41762
41763
41764  if [ -z "${OBJCOPY+x}" ]; then
41765    # The variable is not set by user, try to locate tool using the code snippet
41766    if test -n "$ac_tool_prefix"; then
41767  for ac_prog in gobjcopy objcopy
41768  do
41769    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41770set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41772$as_echo_n "checking for $ac_word... " >&6; }
41773if ${ac_cv_prog_OBJCOPY+:} false; then :
41774  $as_echo_n "(cached) " >&6
41775else
41776  if test -n "$OBJCOPY"; then
41777  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41778else
41779as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41780for as_dir in $PATH
41781do
41782  IFS=$as_save_IFS
41783  test -z "$as_dir" && as_dir=.
41784    for ac_exec_ext in '' $ac_executable_extensions; do
41785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41786    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41788    break 2
41789  fi
41790done
41791  done
41792IFS=$as_save_IFS
41793
41794fi
41795fi
41796OBJCOPY=$ac_cv_prog_OBJCOPY
41797if test -n "$OBJCOPY"; then
41798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41799$as_echo "$OBJCOPY" >&6; }
41800else
41801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41802$as_echo "no" >&6; }
41803fi
41804
41805
41806    test -n "$OBJCOPY" && break
41807  done
41808fi
41809if test -z "$OBJCOPY"; then
41810  ac_ct_OBJCOPY=$OBJCOPY
41811  for ac_prog in gobjcopy objcopy
41812do
41813  # Extract the first word of "$ac_prog", so it can be a program name with args.
41814set dummy $ac_prog; ac_word=$2
41815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41816$as_echo_n "checking for $ac_word... " >&6; }
41817if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41818  $as_echo_n "(cached) " >&6
41819else
41820  if test -n "$ac_ct_OBJCOPY"; then
41821  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41822else
41823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41824for as_dir in $PATH
41825do
41826  IFS=$as_save_IFS
41827  test -z "$as_dir" && as_dir=.
41828    for ac_exec_ext in '' $ac_executable_extensions; do
41829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41830    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41832    break 2
41833  fi
41834done
41835  done
41836IFS=$as_save_IFS
41837
41838fi
41839fi
41840ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41841if test -n "$ac_ct_OBJCOPY"; then
41842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41843$as_echo "$ac_ct_OBJCOPY" >&6; }
41844else
41845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41846$as_echo "no" >&6; }
41847fi
41848
41849
41850  test -n "$ac_ct_OBJCOPY" && break
41851done
41852
41853  if test "x$ac_ct_OBJCOPY" = x; then
41854    OBJCOPY=""
41855  else
41856    case $cross_compiling:$ac_tool_warned in
41857yes:)
41858{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41859$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41860ac_tool_warned=yes ;;
41861esac
41862    OBJCOPY=$ac_ct_OBJCOPY
41863  fi
41864fi
41865
41866  else
41867    # The variable is set, but is it from the command line or the environment?
41868
41869    # Try to remove the string !OBJCOPY! from our list.
41870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41872      # If it failed, the variable was not from the command line. Ignore it,
41873      # but warn the user (except for BASH, which is always set by the calling BASH).
41874      if test "xOBJCOPY" != xBASH; then
41875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41876$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41877      fi
41878      # Try to locate tool using the code snippet
41879      if test -n "$ac_tool_prefix"; then
41880  for ac_prog in gobjcopy objcopy
41881  do
41882    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41883set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41885$as_echo_n "checking for $ac_word... " >&6; }
41886if ${ac_cv_prog_OBJCOPY+:} false; then :
41887  $as_echo_n "(cached) " >&6
41888else
41889  if test -n "$OBJCOPY"; then
41890  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41891else
41892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41893for as_dir in $PATH
41894do
41895  IFS=$as_save_IFS
41896  test -z "$as_dir" && as_dir=.
41897    for ac_exec_ext in '' $ac_executable_extensions; do
41898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41899    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41901    break 2
41902  fi
41903done
41904  done
41905IFS=$as_save_IFS
41906
41907fi
41908fi
41909OBJCOPY=$ac_cv_prog_OBJCOPY
41910if test -n "$OBJCOPY"; then
41911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41912$as_echo "$OBJCOPY" >&6; }
41913else
41914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41915$as_echo "no" >&6; }
41916fi
41917
41918
41919    test -n "$OBJCOPY" && break
41920  done
41921fi
41922if test -z "$OBJCOPY"; then
41923  ac_ct_OBJCOPY=$OBJCOPY
41924  for ac_prog in gobjcopy objcopy
41925do
41926  # Extract the first word of "$ac_prog", so it can be a program name with args.
41927set dummy $ac_prog; ac_word=$2
41928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41929$as_echo_n "checking for $ac_word... " >&6; }
41930if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41931  $as_echo_n "(cached) " >&6
41932else
41933  if test -n "$ac_ct_OBJCOPY"; then
41934  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41935else
41936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41937for as_dir in $PATH
41938do
41939  IFS=$as_save_IFS
41940  test -z "$as_dir" && as_dir=.
41941    for ac_exec_ext in '' $ac_executable_extensions; do
41942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41943    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41945    break 2
41946  fi
41947done
41948  done
41949IFS=$as_save_IFS
41950
41951fi
41952fi
41953ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41954if test -n "$ac_ct_OBJCOPY"; then
41955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41956$as_echo "$ac_ct_OBJCOPY" >&6; }
41957else
41958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41959$as_echo "no" >&6; }
41960fi
41961
41962
41963  test -n "$ac_ct_OBJCOPY" && break
41964done
41965
41966  if test "x$ac_ct_OBJCOPY" = x; then
41967    OBJCOPY=""
41968  else
41969    case $cross_compiling:$ac_tool_warned in
41970yes:)
41971{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41972$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41973ac_tool_warned=yes ;;
41974esac
41975    OBJCOPY=$ac_ct_OBJCOPY
41976  fi
41977fi
41978
41979    else
41980      # If it succeeded, then it was overridden by the user. We will use it
41981      # for the tool.
41982
41983      # First remove it from the list of overridden variables, so we can test
41984      # for unknown variables in the end.
41985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41986
41987      # Check if we try to supply an empty value
41988      if test "x$OBJCOPY" = x; then
41989        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41990$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41992$as_echo_n "checking for OBJCOPY... " >&6; }
41993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41994$as_echo "disabled" >&6; }
41995      else
41996        # Check if the provided tool contains a complete path.
41997        tool_specified="$OBJCOPY"
41998        tool_basename="${tool_specified##*/}"
41999        if test "x$tool_basename" = "x$tool_specified"; then
42000          # A command without a complete path is provided, search $PATH.
42001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42002$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42003          # Extract the first word of "$tool_basename", so it can be a program name with args.
42004set dummy $tool_basename; ac_word=$2
42005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42006$as_echo_n "checking for $ac_word... " >&6; }
42007if ${ac_cv_path_OBJCOPY+:} false; then :
42008  $as_echo_n "(cached) " >&6
42009else
42010  case $OBJCOPY in
42011  [\\/]* | ?:[\\/]*)
42012  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42013  ;;
42014  *)
42015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42016for as_dir in $PATH
42017do
42018  IFS=$as_save_IFS
42019  test -z "$as_dir" && as_dir=.
42020    for ac_exec_ext in '' $ac_executable_extensions; do
42021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42022    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42024    break 2
42025  fi
42026done
42027  done
42028IFS=$as_save_IFS
42029
42030  ;;
42031esac
42032fi
42033OBJCOPY=$ac_cv_path_OBJCOPY
42034if test -n "$OBJCOPY"; then
42035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42036$as_echo "$OBJCOPY" >&6; }
42037else
42038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42039$as_echo "no" >&6; }
42040fi
42041
42042
42043          if test "x$OBJCOPY" = x; then
42044            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42045          fi
42046        else
42047          # Otherwise we believe it is a complete path. Use it as it is.
42048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42049$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42050          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42051$as_echo_n "checking for OBJCOPY... " >&6; }
42052          if test ! -x "$tool_specified"; then
42053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42054$as_echo "not found" >&6; }
42055            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42056          fi
42057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42058$as_echo "$tool_specified" >&6; }
42059        fi
42060      fi
42061    fi
42062
42063  fi
42064
42065
42066    # Only call fixup if objcopy was found.
42067    if test -n "$OBJCOPY"; then
42068
42069  # Only process if variable expands to non-empty
42070
42071  if test "x$OBJCOPY" != x; then
42072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42073
42074  # First separate the path from the arguments. This will split at the first
42075  # space.
42076  complete="$OBJCOPY"
42077  path="${complete%% *}"
42078  tmp="$complete EOL"
42079  arguments="${tmp#* }"
42080
42081  # Input might be given as Windows format, start by converting to
42082  # unix format.
42083  new_path=`$CYGPATH -u "$path"`
42084
42085  # Now try to locate executable using which
42086  new_path=`$WHICH "$new_path" 2> /dev/null`
42087  # bat and cmd files are not always considered executable in cygwin causing which
42088  # to not find them
42089  if test "x$new_path" = x \
42090      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42091      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42092    new_path=`$CYGPATH -u "$path"`
42093  fi
42094  if test "x$new_path" = x; then
42095    # Oops. Which didn't find the executable.
42096    # The splitting of arguments from the executable at a space might have been incorrect,
42097    # since paths with space are more likely in Windows. Give it another try with the whole
42098    # argument.
42099    path="$complete"
42100    arguments="EOL"
42101    new_path=`$CYGPATH -u "$path"`
42102    new_path=`$WHICH "$new_path" 2> /dev/null`
42103    # bat and cmd files are not always considered executable in cygwin causing which
42104    # to not find them
42105    if test "x$new_path" = x \
42106        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42107        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42108      new_path=`$CYGPATH -u "$path"`
42109    fi
42110    if test "x$new_path" = x; then
42111      # It's still not found. Now this is an unrecoverable error.
42112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42113$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42114      has_space=`$ECHO "$complete" | $GREP " "`
42115      if test "x$has_space" != x; then
42116        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42117$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42118      fi
42119      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42120    fi
42121  fi
42122
42123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42126  # "foo.exe" is OK but "foo" is an error.
42127  #
42128  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42129  # It is also a way to make sure we got the proper file name for the real test later on.
42130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42131  if test "x$test_shortpath" = x; then
42132    # Short path failed, file does not exist as specified.
42133    # Try adding .exe or .cmd
42134    if test -f "${new_path}.exe"; then
42135      input_to_shortpath="${new_path}.exe"
42136    elif test -f "${new_path}.cmd"; then
42137      input_to_shortpath="${new_path}.cmd"
42138    else
42139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42140$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42141      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42142$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42143      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42144    fi
42145  else
42146    input_to_shortpath="$new_path"
42147  fi
42148
42149  # Call helper function which possibly converts this using DOS-style short mode.
42150  # If so, the updated path is stored in $new_path.
42151  new_path="$input_to_shortpath"
42152
42153  input_path="$input_to_shortpath"
42154  # Check if we need to convert this using DOS-style short mode. If the path
42155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42156  # take no chances and rewrite it.
42157  # Note: m4 eats our [], so we need to use [ and ] instead.
42158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42159  if test "x$has_forbidden_chars" != x; then
42160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42161    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42162    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42163    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42164      # Going to short mode and back again did indeed matter. Since short mode is
42165      # case insensitive, let's make it lowercase to improve readability.
42166      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42167      # Now convert it back to Unix-style (cygpath)
42168      input_path=`$CYGPATH -u "$shortmode_path"`
42169      new_path="$input_path"
42170    fi
42171  fi
42172
42173  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42174  if test "x$test_cygdrive_prefix" = x; then
42175    # As a simple fix, exclude /usr/bin since it's not a real path.
42176    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42177      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42178      # a path prefixed by /cygdrive for fixpath to work.
42179      new_path="$CYGWIN_ROOT_PATH$input_path"
42180    fi
42181  fi
42182
42183  # remove trailing .exe if any
42184  new_path="${new_path/%.exe/}"
42185
42186    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42187
42188  # First separate the path from the arguments. This will split at the first
42189  # space.
42190  complete="$OBJCOPY"
42191  path="${complete%% *}"
42192  tmp="$complete EOL"
42193  arguments="${tmp#* }"
42194
42195  # Input might be given as Windows format, start by converting to
42196  # unix format.
42197  new_path="$path"
42198
42199  windows_path="$new_path"
42200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42201    unix_path=`$CYGPATH -u "$windows_path"`
42202    new_path="$unix_path"
42203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42205    new_path="$unix_path"
42206  fi
42207
42208
42209  # Now try to locate executable using which
42210  new_path=`$WHICH "$new_path" 2> /dev/null`
42211
42212  if test "x$new_path" = x; then
42213    # Oops. Which didn't find the executable.
42214    # The splitting of arguments from the executable at a space might have been incorrect,
42215    # since paths with space are more likely in Windows. Give it another try with the whole
42216    # argument.
42217    path="$complete"
42218    arguments="EOL"
42219    new_path="$path"
42220
42221  windows_path="$new_path"
42222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42223    unix_path=`$CYGPATH -u "$windows_path"`
42224    new_path="$unix_path"
42225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42227    new_path="$unix_path"
42228  fi
42229
42230
42231    new_path=`$WHICH "$new_path" 2> /dev/null`
42232    # bat and cmd files are not always considered executable in MSYS causing which
42233    # to not find them
42234    if test "x$new_path" = x \
42235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42237      new_path="$path"
42238
42239  windows_path="$new_path"
42240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42241    unix_path=`$CYGPATH -u "$windows_path"`
42242    new_path="$unix_path"
42243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42245    new_path="$unix_path"
42246  fi
42247
42248    fi
42249
42250    if test "x$new_path" = x; then
42251      # It's still not found. Now this is an unrecoverable error.
42252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42253$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42254      has_space=`$ECHO "$complete" | $GREP " "`
42255      if test "x$has_space" != x; then
42256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42258      fi
42259      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42260    fi
42261  fi
42262
42263  # Now new_path has a complete unix path to the binary
42264  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42265    # Keep paths in /bin as-is, but remove trailing .exe if any
42266    new_path="${new_path/%.exe/}"
42267    # Do not save /bin paths to all_fixpath_prefixes!
42268  else
42269    # Not in mixed or Windows style, start by that.
42270    new_path=`cmd //c echo $new_path`
42271
42272  input_path="$new_path"
42273  # Check if we need to convert this using DOS-style short mode. If the path
42274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42275  # take no chances and rewrite it.
42276  # Note: m4 eats our [], so we need to use [ and ] instead.
42277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42278  if test "x$has_forbidden_chars" != x; then
42279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42281  fi
42282
42283    # Output is in $new_path
42284
42285  windows_path="$new_path"
42286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42287    unix_path=`$CYGPATH -u "$windows_path"`
42288    new_path="$unix_path"
42289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42291    new_path="$unix_path"
42292  fi
42293
42294    # remove trailing .exe if any
42295    new_path="${new_path/%.exe/}"
42296
42297    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42298    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42299  fi
42300
42301    else
42302      # We're on a unix platform. Hooray! :)
42303      # First separate the path from the arguments. This will split at the first
42304      # space.
42305      complete="$OBJCOPY"
42306      path="${complete%% *}"
42307      tmp="$complete EOL"
42308      arguments="${tmp#* }"
42309
42310      # Cannot rely on the command "which" here since it doesn't always work.
42311      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42312      if test -z "$is_absolute_path"; then
42313        # Path to executable is not absolute. Find it.
42314        IFS_save="$IFS"
42315        IFS=:
42316        for p in $PATH; do
42317          if test -f "$p/$path" && test -x "$p/$path"; then
42318            new_path="$p/$path"
42319            break
42320          fi
42321        done
42322        IFS="$IFS_save"
42323      else
42324        # This is an absolute path, we can use it without further modifications.
42325        new_path="$path"
42326      fi
42327
42328      if test "x$new_path" = x; then
42329        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42330$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42331        has_space=`$ECHO "$complete" | $GREP " "`
42332        if test "x$has_space" != x; then
42333          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42334$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42335        fi
42336        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42337      fi
42338    fi
42339
42340    # Now join together the path and the arguments once again
42341    if test "x$arguments" != xEOL; then
42342      new_complete="$new_path ${arguments% *}"
42343    else
42344      new_complete="$new_path"
42345    fi
42346
42347    if test "x$complete" != "x$new_complete"; then
42348      OBJCOPY="$new_complete"
42349      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42350$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42351    fi
42352  fi
42353
42354      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42355        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42356        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42357        # - version number is last blank separate word on first line
42358        # - version number formats that have been seen:
42359        #   - <major>.<minor>
42360        #   - <major>.<minor>.<micro>
42361        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42362        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42363         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42364              -e 's/.* //' \
42365              -e '/^[01]\./b bad' \
42366              -e '/^2\./{' \
42367              -e '  s/^2\.//' \
42368              -e '  /^[0-9]$/b bad' \
42369              -e '  /^[0-9]\./b bad' \
42370              -e '  /^1[0-9]$/b bad' \
42371              -e '  /^1[0-9]\./b bad' \
42372              -e '  /^20\./b bad' \
42373              -e '  /^21\.0$/b bad' \
42374              -e '  /^21\.0\./b bad' \
42375              -e '}' \
42376              -e ':good' \
42377              -e 's/.*/VALID_VERSION/p' \
42378              -e 'q' \
42379              -e ':bad' \
42380              -e 's/.*/BAD_VERSION/p' \
42381              -e 'q'`
42382        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42383          OBJCOPY=
42384          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
42385$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42386          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42387$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42388          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42389$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42390          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42391$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42392          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42393$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42394        fi
42395      fi
42396    fi
42397  fi
42398
42399
42400
42401  # Publish this variable in the help.
42402
42403
42404  if [ -z "${OBJDUMP+x}" ]; then
42405    # The variable is not set by user, try to locate tool using the code snippet
42406    if test -n "$ac_tool_prefix"; then
42407  for ac_prog in gobjdump objdump
42408  do
42409    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42410set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42412$as_echo_n "checking for $ac_word... " >&6; }
42413if ${ac_cv_prog_OBJDUMP+:} false; then :
42414  $as_echo_n "(cached) " >&6
42415else
42416  if test -n "$OBJDUMP"; then
42417  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42418else
42419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42420for as_dir in $PATH
42421do
42422  IFS=$as_save_IFS
42423  test -z "$as_dir" && as_dir=.
42424    for ac_exec_ext in '' $ac_executable_extensions; do
42425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42426    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42428    break 2
42429  fi
42430done
42431  done
42432IFS=$as_save_IFS
42433
42434fi
42435fi
42436OBJDUMP=$ac_cv_prog_OBJDUMP
42437if test -n "$OBJDUMP"; then
42438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42439$as_echo "$OBJDUMP" >&6; }
42440else
42441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42442$as_echo "no" >&6; }
42443fi
42444
42445
42446    test -n "$OBJDUMP" && break
42447  done
42448fi
42449if test -z "$OBJDUMP"; then
42450  ac_ct_OBJDUMP=$OBJDUMP
42451  for ac_prog in gobjdump objdump
42452do
42453  # Extract the first word of "$ac_prog", so it can be a program name with args.
42454set dummy $ac_prog; ac_word=$2
42455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42456$as_echo_n "checking for $ac_word... " >&6; }
42457if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42458  $as_echo_n "(cached) " >&6
42459else
42460  if test -n "$ac_ct_OBJDUMP"; then
42461  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42462else
42463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42464for as_dir in $PATH
42465do
42466  IFS=$as_save_IFS
42467  test -z "$as_dir" && as_dir=.
42468    for ac_exec_ext in '' $ac_executable_extensions; do
42469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42470    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42472    break 2
42473  fi
42474done
42475  done
42476IFS=$as_save_IFS
42477
42478fi
42479fi
42480ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42481if test -n "$ac_ct_OBJDUMP"; then
42482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42483$as_echo "$ac_ct_OBJDUMP" >&6; }
42484else
42485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42486$as_echo "no" >&6; }
42487fi
42488
42489
42490  test -n "$ac_ct_OBJDUMP" && break
42491done
42492
42493  if test "x$ac_ct_OBJDUMP" = x; then
42494    OBJDUMP=""
42495  else
42496    case $cross_compiling:$ac_tool_warned in
42497yes:)
42498{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42499$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42500ac_tool_warned=yes ;;
42501esac
42502    OBJDUMP=$ac_ct_OBJDUMP
42503  fi
42504fi
42505
42506  else
42507    # The variable is set, but is it from the command line or the environment?
42508
42509    # Try to remove the string !OBJDUMP! from our list.
42510    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42511    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42512      # If it failed, the variable was not from the command line. Ignore it,
42513      # but warn the user (except for BASH, which is always set by the calling BASH).
42514      if test "xOBJDUMP" != xBASH; then
42515        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42516$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42517      fi
42518      # Try to locate tool using the code snippet
42519      if test -n "$ac_tool_prefix"; then
42520  for ac_prog in gobjdump objdump
42521  do
42522    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42523set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42525$as_echo_n "checking for $ac_word... " >&6; }
42526if ${ac_cv_prog_OBJDUMP+:} false; then :
42527  $as_echo_n "(cached) " >&6
42528else
42529  if test -n "$OBJDUMP"; then
42530  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42531else
42532as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42533for as_dir in $PATH
42534do
42535  IFS=$as_save_IFS
42536  test -z "$as_dir" && as_dir=.
42537    for ac_exec_ext in '' $ac_executable_extensions; do
42538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42539    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42541    break 2
42542  fi
42543done
42544  done
42545IFS=$as_save_IFS
42546
42547fi
42548fi
42549OBJDUMP=$ac_cv_prog_OBJDUMP
42550if test -n "$OBJDUMP"; then
42551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42552$as_echo "$OBJDUMP" >&6; }
42553else
42554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42555$as_echo "no" >&6; }
42556fi
42557
42558
42559    test -n "$OBJDUMP" && break
42560  done
42561fi
42562if test -z "$OBJDUMP"; then
42563  ac_ct_OBJDUMP=$OBJDUMP
42564  for ac_prog in gobjdump objdump
42565do
42566  # Extract the first word of "$ac_prog", so it can be a program name with args.
42567set dummy $ac_prog; ac_word=$2
42568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42569$as_echo_n "checking for $ac_word... " >&6; }
42570if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42571  $as_echo_n "(cached) " >&6
42572else
42573  if test -n "$ac_ct_OBJDUMP"; then
42574  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42575else
42576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42577for as_dir in $PATH
42578do
42579  IFS=$as_save_IFS
42580  test -z "$as_dir" && as_dir=.
42581    for ac_exec_ext in '' $ac_executable_extensions; do
42582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42583    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42585    break 2
42586  fi
42587done
42588  done
42589IFS=$as_save_IFS
42590
42591fi
42592fi
42593ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42594if test -n "$ac_ct_OBJDUMP"; then
42595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42596$as_echo "$ac_ct_OBJDUMP" >&6; }
42597else
42598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42599$as_echo "no" >&6; }
42600fi
42601
42602
42603  test -n "$ac_ct_OBJDUMP" && break
42604done
42605
42606  if test "x$ac_ct_OBJDUMP" = x; then
42607    OBJDUMP=""
42608  else
42609    case $cross_compiling:$ac_tool_warned in
42610yes:)
42611{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42612$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42613ac_tool_warned=yes ;;
42614esac
42615    OBJDUMP=$ac_ct_OBJDUMP
42616  fi
42617fi
42618
42619    else
42620      # If it succeeded, then it was overridden by the user. We will use it
42621      # for the tool.
42622
42623      # First remove it from the list of overridden variables, so we can test
42624      # for unknown variables in the end.
42625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42626
42627      # Check if we try to supply an empty value
42628      if test "x$OBJDUMP" = x; then
42629        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42630$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42632$as_echo_n "checking for OBJDUMP... " >&6; }
42633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42634$as_echo "disabled" >&6; }
42635      else
42636        # Check if the provided tool contains a complete path.
42637        tool_specified="$OBJDUMP"
42638        tool_basename="${tool_specified##*/}"
42639        if test "x$tool_basename" = "x$tool_specified"; then
42640          # A command without a complete path is provided, search $PATH.
42641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42642$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42643          # Extract the first word of "$tool_basename", so it can be a program name with args.
42644set dummy $tool_basename; ac_word=$2
42645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42646$as_echo_n "checking for $ac_word... " >&6; }
42647if ${ac_cv_path_OBJDUMP+:} false; then :
42648  $as_echo_n "(cached) " >&6
42649else
42650  case $OBJDUMP in
42651  [\\/]* | ?:[\\/]*)
42652  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42653  ;;
42654  *)
42655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42656for as_dir in $PATH
42657do
42658  IFS=$as_save_IFS
42659  test -z "$as_dir" && as_dir=.
42660    for ac_exec_ext in '' $ac_executable_extensions; do
42661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42662    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42664    break 2
42665  fi
42666done
42667  done
42668IFS=$as_save_IFS
42669
42670  ;;
42671esac
42672fi
42673OBJDUMP=$ac_cv_path_OBJDUMP
42674if test -n "$OBJDUMP"; then
42675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42676$as_echo "$OBJDUMP" >&6; }
42677else
42678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42679$as_echo "no" >&6; }
42680fi
42681
42682
42683          if test "x$OBJDUMP" = x; then
42684            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42685          fi
42686        else
42687          # Otherwise we believe it is a complete path. Use it as it is.
42688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42689$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42690          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42691$as_echo_n "checking for OBJDUMP... " >&6; }
42692          if test ! -x "$tool_specified"; then
42693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42694$as_echo "not found" >&6; }
42695            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42696          fi
42697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42698$as_echo "$tool_specified" >&6; }
42699        fi
42700      fi
42701    fi
42702
42703  fi
42704
42705
42706  if test "x$OBJDUMP" != x; then
42707    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42708    # bails if argument is missing.
42709
42710  # Only process if variable expands to non-empty
42711
42712  if test "x$OBJDUMP" != x; then
42713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42714
42715  # First separate the path from the arguments. This will split at the first
42716  # space.
42717  complete="$OBJDUMP"
42718  path="${complete%% *}"
42719  tmp="$complete EOL"
42720  arguments="${tmp#* }"
42721
42722  # Input might be given as Windows format, start by converting to
42723  # unix format.
42724  new_path=`$CYGPATH -u "$path"`
42725
42726  # Now try to locate executable using which
42727  new_path=`$WHICH "$new_path" 2> /dev/null`
42728  # bat and cmd files are not always considered executable in cygwin causing which
42729  # to not find them
42730  if test "x$new_path" = x \
42731      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42732      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42733    new_path=`$CYGPATH -u "$path"`
42734  fi
42735  if test "x$new_path" = x; then
42736    # Oops. Which didn't find the executable.
42737    # The splitting of arguments from the executable at a space might have been incorrect,
42738    # since paths with space are more likely in Windows. Give it another try with the whole
42739    # argument.
42740    path="$complete"
42741    arguments="EOL"
42742    new_path=`$CYGPATH -u "$path"`
42743    new_path=`$WHICH "$new_path" 2> /dev/null`
42744    # bat and cmd files are not always considered executable in cygwin causing which
42745    # to not find them
42746    if test "x$new_path" = x \
42747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42749      new_path=`$CYGPATH -u "$path"`
42750    fi
42751    if test "x$new_path" = x; then
42752      # It's still not found. Now this is an unrecoverable error.
42753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42754$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42755      has_space=`$ECHO "$complete" | $GREP " "`
42756      if test "x$has_space" != x; then
42757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42759      fi
42760      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42761    fi
42762  fi
42763
42764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42767  # "foo.exe" is OK but "foo" is an error.
42768  #
42769  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42770  # It is also a way to make sure we got the proper file name for the real test later on.
42771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42772  if test "x$test_shortpath" = x; then
42773    # Short path failed, file does not exist as specified.
42774    # Try adding .exe or .cmd
42775    if test -f "${new_path}.exe"; then
42776      input_to_shortpath="${new_path}.exe"
42777    elif test -f "${new_path}.cmd"; then
42778      input_to_shortpath="${new_path}.cmd"
42779    else
42780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42781$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42782      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42783$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42784      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42785    fi
42786  else
42787    input_to_shortpath="$new_path"
42788  fi
42789
42790  # Call helper function which possibly converts this using DOS-style short mode.
42791  # If so, the updated path is stored in $new_path.
42792  new_path="$input_to_shortpath"
42793
42794  input_path="$input_to_shortpath"
42795  # Check if we need to convert this using DOS-style short mode. If the path
42796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42797  # take no chances and rewrite it.
42798  # Note: m4 eats our [], so we need to use [ and ] instead.
42799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42800  if test "x$has_forbidden_chars" != x; then
42801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42805      # Going to short mode and back again did indeed matter. Since short mode is
42806      # case insensitive, let's make it lowercase to improve readability.
42807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42808      # Now convert it back to Unix-style (cygpath)
42809      input_path=`$CYGPATH -u "$shortmode_path"`
42810      new_path="$input_path"
42811    fi
42812  fi
42813
42814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42815  if test "x$test_cygdrive_prefix" = x; then
42816    # As a simple fix, exclude /usr/bin since it's not a real path.
42817    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42819      # a path prefixed by /cygdrive for fixpath to work.
42820      new_path="$CYGWIN_ROOT_PATH$input_path"
42821    fi
42822  fi
42823
42824  # remove trailing .exe if any
42825  new_path="${new_path/%.exe/}"
42826
42827    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42828
42829  # First separate the path from the arguments. This will split at the first
42830  # space.
42831  complete="$OBJDUMP"
42832  path="${complete%% *}"
42833  tmp="$complete EOL"
42834  arguments="${tmp#* }"
42835
42836  # Input might be given as Windows format, start by converting to
42837  # unix format.
42838  new_path="$path"
42839
42840  windows_path="$new_path"
42841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42842    unix_path=`$CYGPATH -u "$windows_path"`
42843    new_path="$unix_path"
42844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42846    new_path="$unix_path"
42847  fi
42848
42849
42850  # Now try to locate executable using which
42851  new_path=`$WHICH "$new_path" 2> /dev/null`
42852
42853  if test "x$new_path" = x; then
42854    # Oops. Which didn't find the executable.
42855    # The splitting of arguments from the executable at a space might have been incorrect,
42856    # since paths with space are more likely in Windows. Give it another try with the whole
42857    # argument.
42858    path="$complete"
42859    arguments="EOL"
42860    new_path="$path"
42861
42862  windows_path="$new_path"
42863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42864    unix_path=`$CYGPATH -u "$windows_path"`
42865    new_path="$unix_path"
42866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42868    new_path="$unix_path"
42869  fi
42870
42871
42872    new_path=`$WHICH "$new_path" 2> /dev/null`
42873    # bat and cmd files are not always considered executable in MSYS causing which
42874    # to not find them
42875    if test "x$new_path" = x \
42876        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42877        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42878      new_path="$path"
42879
42880  windows_path="$new_path"
42881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42882    unix_path=`$CYGPATH -u "$windows_path"`
42883    new_path="$unix_path"
42884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42886    new_path="$unix_path"
42887  fi
42888
42889    fi
42890
42891    if test "x$new_path" = x; then
42892      # It's still not found. Now this is an unrecoverable error.
42893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42894$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42895      has_space=`$ECHO "$complete" | $GREP " "`
42896      if test "x$has_space" != x; then
42897        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42898$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42899      fi
42900      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42901    fi
42902  fi
42903
42904  # Now new_path has a complete unix path to the binary
42905  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42906    # Keep paths in /bin as-is, but remove trailing .exe if any
42907    new_path="${new_path/%.exe/}"
42908    # Do not save /bin paths to all_fixpath_prefixes!
42909  else
42910    # Not in mixed or Windows style, start by that.
42911    new_path=`cmd //c echo $new_path`
42912
42913  input_path="$new_path"
42914  # Check if we need to convert this using DOS-style short mode. If the path
42915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42916  # take no chances and rewrite it.
42917  # Note: m4 eats our [], so we need to use [ and ] instead.
42918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42919  if test "x$has_forbidden_chars" != x; then
42920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42922  fi
42923
42924    # Output is in $new_path
42925
42926  windows_path="$new_path"
42927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42928    unix_path=`$CYGPATH -u "$windows_path"`
42929    new_path="$unix_path"
42930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42932    new_path="$unix_path"
42933  fi
42934
42935    # remove trailing .exe if any
42936    new_path="${new_path/%.exe/}"
42937
42938    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42939    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42940  fi
42941
42942    else
42943      # We're on a unix platform. Hooray! :)
42944      # First separate the path from the arguments. This will split at the first
42945      # space.
42946      complete="$OBJDUMP"
42947      path="${complete%% *}"
42948      tmp="$complete EOL"
42949      arguments="${tmp#* }"
42950
42951      # Cannot rely on the command "which" here since it doesn't always work.
42952      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42953      if test -z "$is_absolute_path"; then
42954        # Path to executable is not absolute. Find it.
42955        IFS_save="$IFS"
42956        IFS=:
42957        for p in $PATH; do
42958          if test -f "$p/$path" && test -x "$p/$path"; then
42959            new_path="$p/$path"
42960            break
42961          fi
42962        done
42963        IFS="$IFS_save"
42964      else
42965        # This is an absolute path, we can use it without further modifications.
42966        new_path="$path"
42967      fi
42968
42969      if test "x$new_path" = x; then
42970        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42971$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42972        has_space=`$ECHO "$complete" | $GREP " "`
42973        if test "x$has_space" != x; then
42974          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42975$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42976        fi
42977        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42978      fi
42979    fi
42980
42981    # Now join together the path and the arguments once again
42982    if test "x$arguments" != xEOL; then
42983      new_complete="$new_path ${arguments% *}"
42984    else
42985      new_complete="$new_path"
42986    fi
42987
42988    if test "x$complete" != "x$new_complete"; then
42989      OBJDUMP="$new_complete"
42990      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42991$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42992    fi
42993  fi
42994
42995  fi
42996
42997
42998  # Restore old path.
42999  PATH="$OLD_PATH"
43000
43001  # Restore the flags to the user specified values.
43002  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43003  CFLAGS="$ORG_CFLAGS"
43004  CXXFLAGS="$ORG_CXXFLAGS"
43005
43006
43007# Finally do some processing after the detection phase
43008
43009  if test "x$COMPILE_TYPE" = "xcross"; then
43010    # Now we need to find a C/C++ compiler that can build executables for the
43011    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43012    # used once. Also, we need to do this without adding a tools dir to the
43013    # path, otherwise we might pick up cross-compilers which don't use standard
43014    # naming.
43015
43016    OLDPATH="$PATH"
43017
43018
43019# Check whether --with-build-devkit was given.
43020if test "${with_build_devkit+set}" = set; then :
43021  withval=$with_build_devkit;
43022fi
43023
43024    if test "x$with_build_devkit" = "xyes"; then
43025      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43026    elif test -n "$with_build_devkit"; then
43027      if test ! -d "$with_build_devkit"; then
43028        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43029      else
43030
43031  # Only process if variable expands to non-empty
43032
43033  if test "x$with_build_devkit" != x; then
43034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43035
43036  # Input might be given as Windows format, start by converting to
43037  # unix format.
43038  path="$with_build_devkit"
43039  new_path=`$CYGPATH -u "$path"`
43040
43041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43044  # "foo.exe" is OK but "foo" is an error.
43045  #
43046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43047  # It is also a way to make sure we got the proper file name for the real test later on.
43048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43049  if test "x$test_shortpath" = x; then
43050    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43051$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43052    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43053  fi
43054
43055  # Call helper function which possibly converts this using DOS-style short mode.
43056  # If so, the updated path is stored in $new_path.
43057
43058  input_path="$new_path"
43059  # Check if we need to convert this using DOS-style short mode. If the path
43060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43061  # take no chances and rewrite it.
43062  # Note: m4 eats our [], so we need to use [ and ] instead.
43063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43064  if test "x$has_forbidden_chars" != x; then
43065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43069      # Going to short mode and back again did indeed matter. Since short mode is
43070      # case insensitive, let's make it lowercase to improve readability.
43071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43072      # Now convert it back to Unix-style (cygpath)
43073      input_path=`$CYGPATH -u "$shortmode_path"`
43074      new_path="$input_path"
43075    fi
43076  fi
43077
43078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43079  if test "x$test_cygdrive_prefix" = x; then
43080    # As a simple fix, exclude /usr/bin since it's not a real path.
43081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43083      # a path prefixed by /cygdrive for fixpath to work.
43084      new_path="$CYGWIN_ROOT_PATH$input_path"
43085    fi
43086  fi
43087
43088
43089  if test "x$path" != "x$new_path"; then
43090    with_build_devkit="$new_path"
43091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43092$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43093  fi
43094
43095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43096
43097  path="$with_build_devkit"
43098  has_colon=`$ECHO $path | $GREP ^.:`
43099  new_path="$path"
43100  if test "x$has_colon" = x; then
43101    # Not in mixed or Windows style, start by that.
43102    new_path=`cmd //c echo $path`
43103  fi
43104
43105
43106  input_path="$new_path"
43107  # Check if we need to convert this using DOS-style short mode. If the path
43108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43109  # take no chances and rewrite it.
43110  # Note: m4 eats our [], so we need to use [ and ] instead.
43111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43112  if test "x$has_forbidden_chars" != x; then
43113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43115  fi
43116
43117
43118  windows_path="$new_path"
43119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43120    unix_path=`$CYGPATH -u "$windows_path"`
43121    new_path="$unix_path"
43122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43124    new_path="$unix_path"
43125  fi
43126
43127  if test "x$path" != "x$new_path"; then
43128    with_build_devkit="$new_path"
43129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43130$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43131  fi
43132
43133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43135
43136    else
43137      # We're on a unix platform. Hooray! :)
43138      path="$with_build_devkit"
43139      has_space=`$ECHO "$path" | $GREP " "`
43140      if test "x$has_space" != x; then
43141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43142$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43143        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43144      fi
43145
43146      # Use eval to expand a potential ~
43147      eval path="$path"
43148      if test ! -f "$path" && test ! -d "$path"; then
43149        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43150      fi
43151
43152      if test -d "$path"; then
43153        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43154      else
43155        dir="`$DIRNAME "$path"`"
43156        base="`$BASENAME "$path"`"
43157        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43158      fi
43159    fi
43160  fi
43161
43162        BUILD_DEVKIT_ROOT="$with_build_devkit"
43163        # Check for a meta data info file in the root of the devkit
43164        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43165          # Process devkit.info so that existing devkit variables are not
43166          # modified by this
43167          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43168              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43169              -e "s/\$host/\$build/g" \
43170              $BUILD_DEVKIT_ROOT/devkit.info \
43171              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43172          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43173          # This potentially sets the following:
43174          # A descriptive name of the devkit
43175
43176  if test "x$BUILD_DEVKIT_NAME" = x; then
43177    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43178  fi
43179
43180          # Corresponds to --with-extra-path
43181
43182  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43183    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43184  fi
43185
43186          # Corresponds to --with-toolchain-path
43187
43188  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43189    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43190  fi
43191
43192          # Corresponds to --with-sysroot
43193
43194  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43195    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43196  fi
43197
43198          # Skip the Window specific parts
43199        fi
43200
43201        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43202$as_echo_n "checking for build platform devkit... " >&6; }
43203        if test "x$BUILD_DEVKIT_NAME" != x; then
43204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43205$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43206        else
43207          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43208$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43209        fi
43210
43211        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43212
43213  if test "x$BUILD_SYSROOT" != "x"; then
43214    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43215      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43216        # Solaris Studio does not have a concept of sysroot. Instead we must
43217        # make sure the default include and lib dirs are appended to each
43218        # compile and link command line.
43219        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
43220        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43221            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43222            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43223      fi
43224    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43225      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43226      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43227    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43228      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43229      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43230    fi
43231    # Propagate the sysroot args to hotspot
43232    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43233    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43234    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43235    # The global CFLAGS and LDFLAGS variables need these for configure to function
43236    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43237    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43238    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43239    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43240  fi
43241
43242  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43243    # We also need -iframework<path>/System/Library/Frameworks
43244    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43245    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43246    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43247    # set this here so it doesn't have to be peppered throughout the forest
43248    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43249    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43250  fi
43251
43252
43253
43254
43255
43256         # Fallback default of just /bin if DEVKIT_PATH is not defined
43257        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43258          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43259        fi
43260        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43261      fi
43262    fi
43263
43264    # FIXME: we should list the discovered compilers as an exclude pattern!
43265    # If we do that, we can do this detection before POST_DETECTION, and still
43266    # find the build compilers in the tools dir, if needed.
43267
43268
43269
43270  # Publish this variable in the help.
43271
43272
43273  if [ -z "${BUILD_CC+x}" ]; then
43274    # The variable is not set by user, try to locate tool using the code snippet
43275    for ac_prog in cl cc gcc
43276do
43277  # Extract the first word of "$ac_prog", so it can be a program name with args.
43278set dummy $ac_prog; ac_word=$2
43279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43280$as_echo_n "checking for $ac_word... " >&6; }
43281if ${ac_cv_path_BUILD_CC+:} false; then :
43282  $as_echo_n "(cached) " >&6
43283else
43284  case $BUILD_CC in
43285  [\\/]* | ?:[\\/]*)
43286  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43287  ;;
43288  *)
43289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43290for as_dir in $PATH
43291do
43292  IFS=$as_save_IFS
43293  test -z "$as_dir" && as_dir=.
43294    for ac_exec_ext in '' $ac_executable_extensions; do
43295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43296    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43298    break 2
43299  fi
43300done
43301  done
43302IFS=$as_save_IFS
43303
43304  ;;
43305esac
43306fi
43307BUILD_CC=$ac_cv_path_BUILD_CC
43308if test -n "$BUILD_CC"; then
43309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43310$as_echo "$BUILD_CC" >&6; }
43311else
43312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43313$as_echo "no" >&6; }
43314fi
43315
43316
43317  test -n "$BUILD_CC" && break
43318done
43319
43320  else
43321    # The variable is set, but is it from the command line or the environment?
43322
43323    # Try to remove the string !BUILD_CC! from our list.
43324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43326      # If it failed, the variable was not from the command line. Ignore it,
43327      # but warn the user (except for BASH, which is always set by the calling BASH).
43328      if test "xBUILD_CC" != xBASH; then
43329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43330$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43331      fi
43332      # Try to locate tool using the code snippet
43333      for ac_prog in cl cc gcc
43334do
43335  # Extract the first word of "$ac_prog", so it can be a program name with args.
43336set dummy $ac_prog; ac_word=$2
43337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43338$as_echo_n "checking for $ac_word... " >&6; }
43339if ${ac_cv_path_BUILD_CC+:} false; then :
43340  $as_echo_n "(cached) " >&6
43341else
43342  case $BUILD_CC in
43343  [\\/]* | ?:[\\/]*)
43344  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43345  ;;
43346  *)
43347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43348for as_dir in $PATH
43349do
43350  IFS=$as_save_IFS
43351  test -z "$as_dir" && as_dir=.
43352    for ac_exec_ext in '' $ac_executable_extensions; do
43353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43354    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43356    break 2
43357  fi
43358done
43359  done
43360IFS=$as_save_IFS
43361
43362  ;;
43363esac
43364fi
43365BUILD_CC=$ac_cv_path_BUILD_CC
43366if test -n "$BUILD_CC"; then
43367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43368$as_echo "$BUILD_CC" >&6; }
43369else
43370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43371$as_echo "no" >&6; }
43372fi
43373
43374
43375  test -n "$BUILD_CC" && break
43376done
43377
43378    else
43379      # If it succeeded, then it was overridden by the user. We will use it
43380      # for the tool.
43381
43382      # First remove it from the list of overridden variables, so we can test
43383      # for unknown variables in the end.
43384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43385
43386      # Check if we try to supply an empty value
43387      if test "x$BUILD_CC" = x; then
43388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43389$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43391$as_echo_n "checking for BUILD_CC... " >&6; }
43392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43393$as_echo "disabled" >&6; }
43394      else
43395        # Check if the provided tool contains a complete path.
43396        tool_specified="$BUILD_CC"
43397        tool_basename="${tool_specified##*/}"
43398        if test "x$tool_basename" = "x$tool_specified"; then
43399          # A command without a complete path is provided, search $PATH.
43400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43401$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43402          # Extract the first word of "$tool_basename", so it can be a program name with args.
43403set dummy $tool_basename; ac_word=$2
43404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43405$as_echo_n "checking for $ac_word... " >&6; }
43406if ${ac_cv_path_BUILD_CC+:} false; then :
43407  $as_echo_n "(cached) " >&6
43408else
43409  case $BUILD_CC in
43410  [\\/]* | ?:[\\/]*)
43411  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43412  ;;
43413  *)
43414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43415for as_dir in $PATH
43416do
43417  IFS=$as_save_IFS
43418  test -z "$as_dir" && as_dir=.
43419    for ac_exec_ext in '' $ac_executable_extensions; do
43420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43421    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43423    break 2
43424  fi
43425done
43426  done
43427IFS=$as_save_IFS
43428
43429  ;;
43430esac
43431fi
43432BUILD_CC=$ac_cv_path_BUILD_CC
43433if test -n "$BUILD_CC"; then
43434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43435$as_echo "$BUILD_CC" >&6; }
43436else
43437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43438$as_echo "no" >&6; }
43439fi
43440
43441
43442          if test "x$BUILD_CC" = x; then
43443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43444          fi
43445        else
43446          # Otherwise we believe it is a complete path. Use it as it is.
43447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43448$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43450$as_echo_n "checking for BUILD_CC... " >&6; }
43451          if test ! -x "$tool_specified"; then
43452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43453$as_echo "not found" >&6; }
43454            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43455          fi
43456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43457$as_echo "$tool_specified" >&6; }
43458        fi
43459      fi
43460    fi
43461
43462  fi
43463
43464
43465
43466  if test "x$BUILD_CC" = x; then
43467    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43468  fi
43469
43470
43471
43472  # Only process if variable expands to non-empty
43473
43474  if test "x$BUILD_CC" != x; then
43475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43476
43477  # First separate the path from the arguments. This will split at the first
43478  # space.
43479  complete="$BUILD_CC"
43480  path="${complete%% *}"
43481  tmp="$complete EOL"
43482  arguments="${tmp#* }"
43483
43484  # Input might be given as Windows format, start by converting to
43485  # unix format.
43486  new_path=`$CYGPATH -u "$path"`
43487
43488  # Now try to locate executable using which
43489  new_path=`$WHICH "$new_path" 2> /dev/null`
43490  # bat and cmd files are not always considered executable in cygwin causing which
43491  # to not find them
43492  if test "x$new_path" = x \
43493      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43494      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43495    new_path=`$CYGPATH -u "$path"`
43496  fi
43497  if test "x$new_path" = x; then
43498    # Oops. Which didn't find the executable.
43499    # The splitting of arguments from the executable at a space might have been incorrect,
43500    # since paths with space are more likely in Windows. Give it another try with the whole
43501    # argument.
43502    path="$complete"
43503    arguments="EOL"
43504    new_path=`$CYGPATH -u "$path"`
43505    new_path=`$WHICH "$new_path" 2> /dev/null`
43506    # bat and cmd files are not always considered executable in cygwin causing which
43507    # to not find them
43508    if test "x$new_path" = x \
43509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43511      new_path=`$CYGPATH -u "$path"`
43512    fi
43513    if test "x$new_path" = x; then
43514      # It's still not found. Now this is an unrecoverable error.
43515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43516$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43517      has_space=`$ECHO "$complete" | $GREP " "`
43518      if test "x$has_space" != x; then
43519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43521      fi
43522      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43523    fi
43524  fi
43525
43526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43529  # "foo.exe" is OK but "foo" is an error.
43530  #
43531  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43532  # It is also a way to make sure we got the proper file name for the real test later on.
43533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43534  if test "x$test_shortpath" = x; then
43535    # Short path failed, file does not exist as specified.
43536    # Try adding .exe or .cmd
43537    if test -f "${new_path}.exe"; then
43538      input_to_shortpath="${new_path}.exe"
43539    elif test -f "${new_path}.cmd"; then
43540      input_to_shortpath="${new_path}.cmd"
43541    else
43542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43543$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43544      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43545$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43546      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43547    fi
43548  else
43549    input_to_shortpath="$new_path"
43550  fi
43551
43552  # Call helper function which possibly converts this using DOS-style short mode.
43553  # If so, the updated path is stored in $new_path.
43554  new_path="$input_to_shortpath"
43555
43556  input_path="$input_to_shortpath"
43557  # Check if we need to convert this using DOS-style short mode. If the path
43558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43559  # take no chances and rewrite it.
43560  # Note: m4 eats our [], so we need to use [ and ] instead.
43561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43562  if test "x$has_forbidden_chars" != x; then
43563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43567      # Going to short mode and back again did indeed matter. Since short mode is
43568      # case insensitive, let's make it lowercase to improve readability.
43569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43570      # Now convert it back to Unix-style (cygpath)
43571      input_path=`$CYGPATH -u "$shortmode_path"`
43572      new_path="$input_path"
43573    fi
43574  fi
43575
43576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43577  if test "x$test_cygdrive_prefix" = x; then
43578    # As a simple fix, exclude /usr/bin since it's not a real path.
43579    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43581      # a path prefixed by /cygdrive for fixpath to work.
43582      new_path="$CYGWIN_ROOT_PATH$input_path"
43583    fi
43584  fi
43585
43586  # remove trailing .exe if any
43587  new_path="${new_path/%.exe/}"
43588
43589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43590
43591  # First separate the path from the arguments. This will split at the first
43592  # space.
43593  complete="$BUILD_CC"
43594  path="${complete%% *}"
43595  tmp="$complete EOL"
43596  arguments="${tmp#* }"
43597
43598  # Input might be given as Windows format, start by converting to
43599  # unix format.
43600  new_path="$path"
43601
43602  windows_path="$new_path"
43603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43604    unix_path=`$CYGPATH -u "$windows_path"`
43605    new_path="$unix_path"
43606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43608    new_path="$unix_path"
43609  fi
43610
43611
43612  # Now try to locate executable using which
43613  new_path=`$WHICH "$new_path" 2> /dev/null`
43614
43615  if test "x$new_path" = x; then
43616    # Oops. Which didn't find the executable.
43617    # The splitting of arguments from the executable at a space might have been incorrect,
43618    # since paths with space are more likely in Windows. Give it another try with the whole
43619    # argument.
43620    path="$complete"
43621    arguments="EOL"
43622    new_path="$path"
43623
43624  windows_path="$new_path"
43625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43626    unix_path=`$CYGPATH -u "$windows_path"`
43627    new_path="$unix_path"
43628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43630    new_path="$unix_path"
43631  fi
43632
43633
43634    new_path=`$WHICH "$new_path" 2> /dev/null`
43635    # bat and cmd files are not always considered executable in MSYS causing which
43636    # to not find them
43637    if test "x$new_path" = x \
43638        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43639        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43640      new_path="$path"
43641
43642  windows_path="$new_path"
43643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43644    unix_path=`$CYGPATH -u "$windows_path"`
43645    new_path="$unix_path"
43646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43648    new_path="$unix_path"
43649  fi
43650
43651    fi
43652
43653    if test "x$new_path" = x; then
43654      # It's still not found. Now this is an unrecoverable error.
43655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43656$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43657      has_space=`$ECHO "$complete" | $GREP " "`
43658      if test "x$has_space" != x; then
43659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43661      fi
43662      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43663    fi
43664  fi
43665
43666  # Now new_path has a complete unix path to the binary
43667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43668    # Keep paths in /bin as-is, but remove trailing .exe if any
43669    new_path="${new_path/%.exe/}"
43670    # Do not save /bin paths to all_fixpath_prefixes!
43671  else
43672    # Not in mixed or Windows style, start by that.
43673    new_path=`cmd //c echo $new_path`
43674
43675  input_path="$new_path"
43676  # Check if we need to convert this using DOS-style short mode. If the path
43677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43678  # take no chances and rewrite it.
43679  # Note: m4 eats our [], so we need to use [ and ] instead.
43680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43681  if test "x$has_forbidden_chars" != x; then
43682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43684  fi
43685
43686    # Output is in $new_path
43687
43688  windows_path="$new_path"
43689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43690    unix_path=`$CYGPATH -u "$windows_path"`
43691    new_path="$unix_path"
43692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43694    new_path="$unix_path"
43695  fi
43696
43697    # remove trailing .exe if any
43698    new_path="${new_path/%.exe/}"
43699
43700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43702  fi
43703
43704    else
43705      # We're on a unix platform. Hooray! :)
43706      # First separate the path from the arguments. This will split at the first
43707      # space.
43708      complete="$BUILD_CC"
43709      path="${complete%% *}"
43710      tmp="$complete EOL"
43711      arguments="${tmp#* }"
43712
43713      # Cannot rely on the command "which" here since it doesn't always work.
43714      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43715      if test -z "$is_absolute_path"; then
43716        # Path to executable is not absolute. Find it.
43717        IFS_save="$IFS"
43718        IFS=:
43719        for p in $PATH; do
43720          if test -f "$p/$path" && test -x "$p/$path"; then
43721            new_path="$p/$path"
43722            break
43723          fi
43724        done
43725        IFS="$IFS_save"
43726      else
43727        # This is an absolute path, we can use it without further modifications.
43728        new_path="$path"
43729      fi
43730
43731      if test "x$new_path" = x; then
43732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43733$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43734        has_space=`$ECHO "$complete" | $GREP " "`
43735        if test "x$has_space" != x; then
43736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43738        fi
43739        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43740      fi
43741    fi
43742
43743    # Now join together the path and the arguments once again
43744    if test "x$arguments" != xEOL; then
43745      new_complete="$new_path ${arguments% *}"
43746    else
43747      new_complete="$new_path"
43748    fi
43749
43750    if test "x$complete" != "x$new_complete"; then
43751      BUILD_CC="$new_complete"
43752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43753$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43754    fi
43755  fi
43756
43757
43758
43759
43760  # Publish this variable in the help.
43761
43762
43763  if [ -z "${BUILD_CXX+x}" ]; then
43764    # The variable is not set by user, try to locate tool using the code snippet
43765    for ac_prog in cl CC g++
43766do
43767  # Extract the first word of "$ac_prog", so it can be a program name with args.
43768set dummy $ac_prog; ac_word=$2
43769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43770$as_echo_n "checking for $ac_word... " >&6; }
43771if ${ac_cv_path_BUILD_CXX+:} false; then :
43772  $as_echo_n "(cached) " >&6
43773else
43774  case $BUILD_CXX in
43775  [\\/]* | ?:[\\/]*)
43776  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43777  ;;
43778  *)
43779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43780for as_dir in $PATH
43781do
43782  IFS=$as_save_IFS
43783  test -z "$as_dir" && as_dir=.
43784    for ac_exec_ext in '' $ac_executable_extensions; do
43785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43786    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43788    break 2
43789  fi
43790done
43791  done
43792IFS=$as_save_IFS
43793
43794  ;;
43795esac
43796fi
43797BUILD_CXX=$ac_cv_path_BUILD_CXX
43798if test -n "$BUILD_CXX"; then
43799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43800$as_echo "$BUILD_CXX" >&6; }
43801else
43802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43803$as_echo "no" >&6; }
43804fi
43805
43806
43807  test -n "$BUILD_CXX" && break
43808done
43809
43810  else
43811    # The variable is set, but is it from the command line or the environment?
43812
43813    # Try to remove the string !BUILD_CXX! from our list.
43814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43816      # If it failed, the variable was not from the command line. Ignore it,
43817      # but warn the user (except for BASH, which is always set by the calling BASH).
43818      if test "xBUILD_CXX" != xBASH; then
43819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43820$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43821      fi
43822      # Try to locate tool using the code snippet
43823      for ac_prog in cl CC g++
43824do
43825  # Extract the first word of "$ac_prog", so it can be a program name with args.
43826set dummy $ac_prog; ac_word=$2
43827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43828$as_echo_n "checking for $ac_word... " >&6; }
43829if ${ac_cv_path_BUILD_CXX+:} false; then :
43830  $as_echo_n "(cached) " >&6
43831else
43832  case $BUILD_CXX in
43833  [\\/]* | ?:[\\/]*)
43834  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43835  ;;
43836  *)
43837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43838for as_dir in $PATH
43839do
43840  IFS=$as_save_IFS
43841  test -z "$as_dir" && as_dir=.
43842    for ac_exec_ext in '' $ac_executable_extensions; do
43843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43844    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43846    break 2
43847  fi
43848done
43849  done
43850IFS=$as_save_IFS
43851
43852  ;;
43853esac
43854fi
43855BUILD_CXX=$ac_cv_path_BUILD_CXX
43856if test -n "$BUILD_CXX"; then
43857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43858$as_echo "$BUILD_CXX" >&6; }
43859else
43860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43861$as_echo "no" >&6; }
43862fi
43863
43864
43865  test -n "$BUILD_CXX" && break
43866done
43867
43868    else
43869      # If it succeeded, then it was overridden by the user. We will use it
43870      # for the tool.
43871
43872      # First remove it from the list of overridden variables, so we can test
43873      # for unknown variables in the end.
43874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43875
43876      # Check if we try to supply an empty value
43877      if test "x$BUILD_CXX" = x; then
43878        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43879$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43880        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43881$as_echo_n "checking for BUILD_CXX... " >&6; }
43882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43883$as_echo "disabled" >&6; }
43884      else
43885        # Check if the provided tool contains a complete path.
43886        tool_specified="$BUILD_CXX"
43887        tool_basename="${tool_specified##*/}"
43888        if test "x$tool_basename" = "x$tool_specified"; then
43889          # A command without a complete path is provided, search $PATH.
43890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43891$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43892          # Extract the first word of "$tool_basename", so it can be a program name with args.
43893set dummy $tool_basename; ac_word=$2
43894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43895$as_echo_n "checking for $ac_word... " >&6; }
43896if ${ac_cv_path_BUILD_CXX+:} false; then :
43897  $as_echo_n "(cached) " >&6
43898else
43899  case $BUILD_CXX in
43900  [\\/]* | ?:[\\/]*)
43901  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43902  ;;
43903  *)
43904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43905for as_dir in $PATH
43906do
43907  IFS=$as_save_IFS
43908  test -z "$as_dir" && as_dir=.
43909    for ac_exec_ext in '' $ac_executable_extensions; do
43910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43911    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43913    break 2
43914  fi
43915done
43916  done
43917IFS=$as_save_IFS
43918
43919  ;;
43920esac
43921fi
43922BUILD_CXX=$ac_cv_path_BUILD_CXX
43923if test -n "$BUILD_CXX"; then
43924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43925$as_echo "$BUILD_CXX" >&6; }
43926else
43927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43928$as_echo "no" >&6; }
43929fi
43930
43931
43932          if test "x$BUILD_CXX" = x; then
43933            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43934          fi
43935        else
43936          # Otherwise we believe it is a complete path. Use it as it is.
43937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43938$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43939          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43940$as_echo_n "checking for BUILD_CXX... " >&6; }
43941          if test ! -x "$tool_specified"; then
43942            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43943$as_echo "not found" >&6; }
43944            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43945          fi
43946          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43947$as_echo "$tool_specified" >&6; }
43948        fi
43949      fi
43950    fi
43951
43952  fi
43953
43954
43955
43956  if test "x$BUILD_CXX" = x; then
43957    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43958  fi
43959
43960
43961
43962  # Only process if variable expands to non-empty
43963
43964  if test "x$BUILD_CXX" != x; then
43965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43966
43967  # First separate the path from the arguments. This will split at the first
43968  # space.
43969  complete="$BUILD_CXX"
43970  path="${complete%% *}"
43971  tmp="$complete EOL"
43972  arguments="${tmp#* }"
43973
43974  # Input might be given as Windows format, start by converting to
43975  # unix format.
43976  new_path=`$CYGPATH -u "$path"`
43977
43978  # Now try to locate executable using which
43979  new_path=`$WHICH "$new_path" 2> /dev/null`
43980  # bat and cmd files are not always considered executable in cygwin causing which
43981  # to not find them
43982  if test "x$new_path" = x \
43983      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43984      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43985    new_path=`$CYGPATH -u "$path"`
43986  fi
43987  if test "x$new_path" = x; then
43988    # Oops. Which didn't find the executable.
43989    # The splitting of arguments from the executable at a space might have been incorrect,
43990    # since paths with space are more likely in Windows. Give it another try with the whole
43991    # argument.
43992    path="$complete"
43993    arguments="EOL"
43994    new_path=`$CYGPATH -u "$path"`
43995    new_path=`$WHICH "$new_path" 2> /dev/null`
43996    # bat and cmd files are not always considered executable in cygwin causing which
43997    # to not find them
43998    if test "x$new_path" = x \
43999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44001      new_path=`$CYGPATH -u "$path"`
44002    fi
44003    if test "x$new_path" = x; then
44004      # It's still not found. Now this is an unrecoverable error.
44005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44006$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44007      has_space=`$ECHO "$complete" | $GREP " "`
44008      if test "x$has_space" != x; then
44009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44011      fi
44012      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44013    fi
44014  fi
44015
44016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44019  # "foo.exe" is OK but "foo" is an error.
44020  #
44021  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44022  # It is also a way to make sure we got the proper file name for the real test later on.
44023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44024  if test "x$test_shortpath" = x; then
44025    # Short path failed, file does not exist as specified.
44026    # Try adding .exe or .cmd
44027    if test -f "${new_path}.exe"; then
44028      input_to_shortpath="${new_path}.exe"
44029    elif test -f "${new_path}.cmd"; then
44030      input_to_shortpath="${new_path}.cmd"
44031    else
44032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44033$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44036      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44037    fi
44038  else
44039    input_to_shortpath="$new_path"
44040  fi
44041
44042  # Call helper function which possibly converts this using DOS-style short mode.
44043  # If so, the updated path is stored in $new_path.
44044  new_path="$input_to_shortpath"
44045
44046  input_path="$input_to_shortpath"
44047  # Check if we need to convert this using DOS-style short mode. If the path
44048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44049  # take no chances and rewrite it.
44050  # Note: m4 eats our [], so we need to use [ and ] instead.
44051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44052  if test "x$has_forbidden_chars" != x; then
44053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44057      # Going to short mode and back again did indeed matter. Since short mode is
44058      # case insensitive, let's make it lowercase to improve readability.
44059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44060      # Now convert it back to Unix-style (cygpath)
44061      input_path=`$CYGPATH -u "$shortmode_path"`
44062      new_path="$input_path"
44063    fi
44064  fi
44065
44066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44067  if test "x$test_cygdrive_prefix" = x; then
44068    # As a simple fix, exclude /usr/bin since it's not a real path.
44069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44071      # a path prefixed by /cygdrive for fixpath to work.
44072      new_path="$CYGWIN_ROOT_PATH$input_path"
44073    fi
44074  fi
44075
44076  # remove trailing .exe if any
44077  new_path="${new_path/%.exe/}"
44078
44079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44080
44081  # First separate the path from the arguments. This will split at the first
44082  # space.
44083  complete="$BUILD_CXX"
44084  path="${complete%% *}"
44085  tmp="$complete EOL"
44086  arguments="${tmp#* }"
44087
44088  # Input might be given as Windows format, start by converting to
44089  # unix format.
44090  new_path="$path"
44091
44092  windows_path="$new_path"
44093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44094    unix_path=`$CYGPATH -u "$windows_path"`
44095    new_path="$unix_path"
44096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44098    new_path="$unix_path"
44099  fi
44100
44101
44102  # Now try to locate executable using which
44103  new_path=`$WHICH "$new_path" 2> /dev/null`
44104
44105  if test "x$new_path" = x; then
44106    # Oops. Which didn't find the executable.
44107    # The splitting of arguments from the executable at a space might have been incorrect,
44108    # since paths with space are more likely in Windows. Give it another try with the whole
44109    # argument.
44110    path="$complete"
44111    arguments="EOL"
44112    new_path="$path"
44113
44114  windows_path="$new_path"
44115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44116    unix_path=`$CYGPATH -u "$windows_path"`
44117    new_path="$unix_path"
44118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44120    new_path="$unix_path"
44121  fi
44122
44123
44124    new_path=`$WHICH "$new_path" 2> /dev/null`
44125    # bat and cmd files are not always considered executable in MSYS causing which
44126    # to not find them
44127    if test "x$new_path" = x \
44128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44130      new_path="$path"
44131
44132  windows_path="$new_path"
44133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44134    unix_path=`$CYGPATH -u "$windows_path"`
44135    new_path="$unix_path"
44136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44138    new_path="$unix_path"
44139  fi
44140
44141    fi
44142
44143    if test "x$new_path" = x; then
44144      # It's still not found. Now this is an unrecoverable error.
44145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44146$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44147      has_space=`$ECHO "$complete" | $GREP " "`
44148      if test "x$has_space" != x; then
44149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44151      fi
44152      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44153    fi
44154  fi
44155
44156  # Now new_path has a complete unix path to the binary
44157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44158    # Keep paths in /bin as-is, but remove trailing .exe if any
44159    new_path="${new_path/%.exe/}"
44160    # Do not save /bin paths to all_fixpath_prefixes!
44161  else
44162    # Not in mixed or Windows style, start by that.
44163    new_path=`cmd //c echo $new_path`
44164
44165  input_path="$new_path"
44166  # Check if we need to convert this using DOS-style short mode. If the path
44167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44168  # take no chances and rewrite it.
44169  # Note: m4 eats our [], so we need to use [ and ] instead.
44170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44171  if test "x$has_forbidden_chars" != x; then
44172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44174  fi
44175
44176    # Output is in $new_path
44177
44178  windows_path="$new_path"
44179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44180    unix_path=`$CYGPATH -u "$windows_path"`
44181    new_path="$unix_path"
44182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44184    new_path="$unix_path"
44185  fi
44186
44187    # remove trailing .exe if any
44188    new_path="${new_path/%.exe/}"
44189
44190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44192  fi
44193
44194    else
44195      # We're on a unix platform. Hooray! :)
44196      # First separate the path from the arguments. This will split at the first
44197      # space.
44198      complete="$BUILD_CXX"
44199      path="${complete%% *}"
44200      tmp="$complete EOL"
44201      arguments="${tmp#* }"
44202
44203      # Cannot rely on the command "which" here since it doesn't always work.
44204      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44205      if test -z "$is_absolute_path"; then
44206        # Path to executable is not absolute. Find it.
44207        IFS_save="$IFS"
44208        IFS=:
44209        for p in $PATH; do
44210          if test -f "$p/$path" && test -x "$p/$path"; then
44211            new_path="$p/$path"
44212            break
44213          fi
44214        done
44215        IFS="$IFS_save"
44216      else
44217        # This is an absolute path, we can use it without further modifications.
44218        new_path="$path"
44219      fi
44220
44221      if test "x$new_path" = x; then
44222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44223$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44224        has_space=`$ECHO "$complete" | $GREP " "`
44225        if test "x$has_space" != x; then
44226          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44228        fi
44229        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44230      fi
44231    fi
44232
44233    # Now join together the path and the arguments once again
44234    if test "x$arguments" != xEOL; then
44235      new_complete="$new_path ${arguments% *}"
44236    else
44237      new_complete="$new_path"
44238    fi
44239
44240    if test "x$complete" != "x$new_complete"; then
44241      BUILD_CXX="$new_complete"
44242      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44243$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44244    fi
44245  fi
44246
44247
44248
44249  # Publish this variable in the help.
44250
44251
44252  if [ -z "${BUILD_NM+x}" ]; then
44253    # The variable is not set by user, try to locate tool using the code snippet
44254    for ac_prog in nm gcc-nm
44255do
44256  # Extract the first word of "$ac_prog", so it can be a program name with args.
44257set dummy $ac_prog; ac_word=$2
44258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44259$as_echo_n "checking for $ac_word... " >&6; }
44260if ${ac_cv_path_BUILD_NM+:} false; then :
44261  $as_echo_n "(cached) " >&6
44262else
44263  case $BUILD_NM in
44264  [\\/]* | ?:[\\/]*)
44265  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44266  ;;
44267  *)
44268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44269for as_dir in $PATH
44270do
44271  IFS=$as_save_IFS
44272  test -z "$as_dir" && as_dir=.
44273    for ac_exec_ext in '' $ac_executable_extensions; do
44274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44275    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44277    break 2
44278  fi
44279done
44280  done
44281IFS=$as_save_IFS
44282
44283  ;;
44284esac
44285fi
44286BUILD_NM=$ac_cv_path_BUILD_NM
44287if test -n "$BUILD_NM"; then
44288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44289$as_echo "$BUILD_NM" >&6; }
44290else
44291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44292$as_echo "no" >&6; }
44293fi
44294
44295
44296  test -n "$BUILD_NM" && break
44297done
44298
44299  else
44300    # The variable is set, but is it from the command line or the environment?
44301
44302    # Try to remove the string !BUILD_NM! from our list.
44303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44305      # If it failed, the variable was not from the command line. Ignore it,
44306      # but warn the user (except for BASH, which is always set by the calling BASH).
44307      if test "xBUILD_NM" != xBASH; then
44308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44309$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44310      fi
44311      # Try to locate tool using the code snippet
44312      for ac_prog in nm gcc-nm
44313do
44314  # Extract the first word of "$ac_prog", so it can be a program name with args.
44315set dummy $ac_prog; ac_word=$2
44316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44317$as_echo_n "checking for $ac_word... " >&6; }
44318if ${ac_cv_path_BUILD_NM+:} false; then :
44319  $as_echo_n "(cached) " >&6
44320else
44321  case $BUILD_NM in
44322  [\\/]* | ?:[\\/]*)
44323  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44324  ;;
44325  *)
44326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44327for as_dir in $PATH
44328do
44329  IFS=$as_save_IFS
44330  test -z "$as_dir" && as_dir=.
44331    for ac_exec_ext in '' $ac_executable_extensions; do
44332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44333    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44335    break 2
44336  fi
44337done
44338  done
44339IFS=$as_save_IFS
44340
44341  ;;
44342esac
44343fi
44344BUILD_NM=$ac_cv_path_BUILD_NM
44345if test -n "$BUILD_NM"; then
44346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44347$as_echo "$BUILD_NM" >&6; }
44348else
44349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44350$as_echo "no" >&6; }
44351fi
44352
44353
44354  test -n "$BUILD_NM" && break
44355done
44356
44357    else
44358      # If it succeeded, then it was overridden by the user. We will use it
44359      # for the tool.
44360
44361      # First remove it from the list of overridden variables, so we can test
44362      # for unknown variables in the end.
44363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44364
44365      # Check if we try to supply an empty value
44366      if test "x$BUILD_NM" = x; then
44367        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44368$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44369        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44370$as_echo_n "checking for BUILD_NM... " >&6; }
44371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44372$as_echo "disabled" >&6; }
44373      else
44374        # Check if the provided tool contains a complete path.
44375        tool_specified="$BUILD_NM"
44376        tool_basename="${tool_specified##*/}"
44377        if test "x$tool_basename" = "x$tool_specified"; then
44378          # A command without a complete path is provided, search $PATH.
44379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44380$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44381          # Extract the first word of "$tool_basename", so it can be a program name with args.
44382set dummy $tool_basename; ac_word=$2
44383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44384$as_echo_n "checking for $ac_word... " >&6; }
44385if ${ac_cv_path_BUILD_NM+:} false; then :
44386  $as_echo_n "(cached) " >&6
44387else
44388  case $BUILD_NM in
44389  [\\/]* | ?:[\\/]*)
44390  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44391  ;;
44392  *)
44393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44394for as_dir in $PATH
44395do
44396  IFS=$as_save_IFS
44397  test -z "$as_dir" && as_dir=.
44398    for ac_exec_ext in '' $ac_executable_extensions; do
44399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44400    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44402    break 2
44403  fi
44404done
44405  done
44406IFS=$as_save_IFS
44407
44408  ;;
44409esac
44410fi
44411BUILD_NM=$ac_cv_path_BUILD_NM
44412if test -n "$BUILD_NM"; then
44413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44414$as_echo "$BUILD_NM" >&6; }
44415else
44416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44417$as_echo "no" >&6; }
44418fi
44419
44420
44421          if test "x$BUILD_NM" = x; then
44422            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44423          fi
44424        else
44425          # Otherwise we believe it is a complete path. Use it as it is.
44426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44427$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44428          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44429$as_echo_n "checking for BUILD_NM... " >&6; }
44430          if test ! -x "$tool_specified"; then
44431            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44432$as_echo "not found" >&6; }
44433            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44434          fi
44435          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44436$as_echo "$tool_specified" >&6; }
44437        fi
44438      fi
44439    fi
44440
44441  fi
44442
44443
44444
44445  # Only process if variable expands to non-empty
44446
44447  if test "x$BUILD_NM" != x; then
44448    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44449
44450  # First separate the path from the arguments. This will split at the first
44451  # space.
44452  complete="$BUILD_NM"
44453  path="${complete%% *}"
44454  tmp="$complete EOL"
44455  arguments="${tmp#* }"
44456
44457  # Input might be given as Windows format, start by converting to
44458  # unix format.
44459  new_path=`$CYGPATH -u "$path"`
44460
44461  # Now try to locate executable using which
44462  new_path=`$WHICH "$new_path" 2> /dev/null`
44463  # bat and cmd files are not always considered executable in cygwin causing which
44464  # to not find them
44465  if test "x$new_path" = x \
44466      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44467      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44468    new_path=`$CYGPATH -u "$path"`
44469  fi
44470  if test "x$new_path" = x; then
44471    # Oops. Which didn't find the executable.
44472    # The splitting of arguments from the executable at a space might have been incorrect,
44473    # since paths with space are more likely in Windows. Give it another try with the whole
44474    # argument.
44475    path="$complete"
44476    arguments="EOL"
44477    new_path=`$CYGPATH -u "$path"`
44478    new_path=`$WHICH "$new_path" 2> /dev/null`
44479    # bat and cmd files are not always considered executable in cygwin causing which
44480    # to not find them
44481    if test "x$new_path" = x \
44482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44484      new_path=`$CYGPATH -u "$path"`
44485    fi
44486    if test "x$new_path" = x; then
44487      # It's still not found. Now this is an unrecoverable error.
44488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44489$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44490      has_space=`$ECHO "$complete" | $GREP " "`
44491      if test "x$has_space" != x; then
44492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44494      fi
44495      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44496    fi
44497  fi
44498
44499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44502  # "foo.exe" is OK but "foo" is an error.
44503  #
44504  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44505  # It is also a way to make sure we got the proper file name for the real test later on.
44506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44507  if test "x$test_shortpath" = x; then
44508    # Short path failed, file does not exist as specified.
44509    # Try adding .exe or .cmd
44510    if test -f "${new_path}.exe"; then
44511      input_to_shortpath="${new_path}.exe"
44512    elif test -f "${new_path}.cmd"; then
44513      input_to_shortpath="${new_path}.cmd"
44514    else
44515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44516$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44517      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44518$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44519      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44520    fi
44521  else
44522    input_to_shortpath="$new_path"
44523  fi
44524
44525  # Call helper function which possibly converts this using DOS-style short mode.
44526  # If so, the updated path is stored in $new_path.
44527  new_path="$input_to_shortpath"
44528
44529  input_path="$input_to_shortpath"
44530  # Check if we need to convert this using DOS-style short mode. If the path
44531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44532  # take no chances and rewrite it.
44533  # Note: m4 eats our [], so we need to use [ and ] instead.
44534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44535  if test "x$has_forbidden_chars" != x; then
44536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44540      # Going to short mode and back again did indeed matter. Since short mode is
44541      # case insensitive, let's make it lowercase to improve readability.
44542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44543      # Now convert it back to Unix-style (cygpath)
44544      input_path=`$CYGPATH -u "$shortmode_path"`
44545      new_path="$input_path"
44546    fi
44547  fi
44548
44549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44550  if test "x$test_cygdrive_prefix" = x; then
44551    # As a simple fix, exclude /usr/bin since it's not a real path.
44552    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44554      # a path prefixed by /cygdrive for fixpath to work.
44555      new_path="$CYGWIN_ROOT_PATH$input_path"
44556    fi
44557  fi
44558
44559  # remove trailing .exe if any
44560  new_path="${new_path/%.exe/}"
44561
44562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44563
44564  # First separate the path from the arguments. This will split at the first
44565  # space.
44566  complete="$BUILD_NM"
44567  path="${complete%% *}"
44568  tmp="$complete EOL"
44569  arguments="${tmp#* }"
44570
44571  # Input might be given as Windows format, start by converting to
44572  # unix format.
44573  new_path="$path"
44574
44575  windows_path="$new_path"
44576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44577    unix_path=`$CYGPATH -u "$windows_path"`
44578    new_path="$unix_path"
44579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44581    new_path="$unix_path"
44582  fi
44583
44584
44585  # Now try to locate executable using which
44586  new_path=`$WHICH "$new_path" 2> /dev/null`
44587
44588  if test "x$new_path" = x; then
44589    # Oops. Which didn't find the executable.
44590    # The splitting of arguments from the executable at a space might have been incorrect,
44591    # since paths with space are more likely in Windows. Give it another try with the whole
44592    # argument.
44593    path="$complete"
44594    arguments="EOL"
44595    new_path="$path"
44596
44597  windows_path="$new_path"
44598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44599    unix_path=`$CYGPATH -u "$windows_path"`
44600    new_path="$unix_path"
44601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44603    new_path="$unix_path"
44604  fi
44605
44606
44607    new_path=`$WHICH "$new_path" 2> /dev/null`
44608    # bat and cmd files are not always considered executable in MSYS causing which
44609    # to not find them
44610    if test "x$new_path" = x \
44611        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44612        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44613      new_path="$path"
44614
44615  windows_path="$new_path"
44616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44617    unix_path=`$CYGPATH -u "$windows_path"`
44618    new_path="$unix_path"
44619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44621    new_path="$unix_path"
44622  fi
44623
44624    fi
44625
44626    if test "x$new_path" = x; then
44627      # It's still not found. Now this is an unrecoverable error.
44628      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44629$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44630      has_space=`$ECHO "$complete" | $GREP " "`
44631      if test "x$has_space" != x; then
44632        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44633$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44634      fi
44635      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44636    fi
44637  fi
44638
44639  # Now new_path has a complete unix path to the binary
44640  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44641    # Keep paths in /bin as-is, but remove trailing .exe if any
44642    new_path="${new_path/%.exe/}"
44643    # Do not save /bin paths to all_fixpath_prefixes!
44644  else
44645    # Not in mixed or Windows style, start by that.
44646    new_path=`cmd //c echo $new_path`
44647
44648  input_path="$new_path"
44649  # Check if we need to convert this using DOS-style short mode. If the path
44650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44651  # take no chances and rewrite it.
44652  # Note: m4 eats our [], so we need to use [ and ] instead.
44653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44654  if test "x$has_forbidden_chars" != x; then
44655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44657  fi
44658
44659    # Output is in $new_path
44660
44661  windows_path="$new_path"
44662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44663    unix_path=`$CYGPATH -u "$windows_path"`
44664    new_path="$unix_path"
44665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44667    new_path="$unix_path"
44668  fi
44669
44670    # remove trailing .exe if any
44671    new_path="${new_path/%.exe/}"
44672
44673    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44674    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44675  fi
44676
44677    else
44678      # We're on a unix platform. Hooray! :)
44679      # First separate the path from the arguments. This will split at the first
44680      # space.
44681      complete="$BUILD_NM"
44682      path="${complete%% *}"
44683      tmp="$complete EOL"
44684      arguments="${tmp#* }"
44685
44686      # Cannot rely on the command "which" here since it doesn't always work.
44687      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44688      if test -z "$is_absolute_path"; then
44689        # Path to executable is not absolute. Find it.
44690        IFS_save="$IFS"
44691        IFS=:
44692        for p in $PATH; do
44693          if test -f "$p/$path" && test -x "$p/$path"; then
44694            new_path="$p/$path"
44695            break
44696          fi
44697        done
44698        IFS="$IFS_save"
44699      else
44700        # This is an absolute path, we can use it without further modifications.
44701        new_path="$path"
44702      fi
44703
44704      if test "x$new_path" = x; then
44705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44706$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44707        has_space=`$ECHO "$complete" | $GREP " "`
44708        if test "x$has_space" != x; then
44709          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44710$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44711        fi
44712        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44713      fi
44714    fi
44715
44716    # Now join together the path and the arguments once again
44717    if test "x$arguments" != xEOL; then
44718      new_complete="$new_path ${arguments% *}"
44719    else
44720      new_complete="$new_path"
44721    fi
44722
44723    if test "x$complete" != "x$new_complete"; then
44724      BUILD_NM="$new_complete"
44725      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44726$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44727    fi
44728  fi
44729
44730
44731
44732  # Publish this variable in the help.
44733
44734
44735  if [ -z "${BUILD_AR+x}" ]; then
44736    # The variable is not set by user, try to locate tool using the code snippet
44737    for ac_prog in ar gcc-ar
44738do
44739  # Extract the first word of "$ac_prog", so it can be a program name with args.
44740set dummy $ac_prog; ac_word=$2
44741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44742$as_echo_n "checking for $ac_word... " >&6; }
44743if ${ac_cv_path_BUILD_AR+:} false; then :
44744  $as_echo_n "(cached) " >&6
44745else
44746  case $BUILD_AR in
44747  [\\/]* | ?:[\\/]*)
44748  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44749  ;;
44750  *)
44751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44752for as_dir in $PATH
44753do
44754  IFS=$as_save_IFS
44755  test -z "$as_dir" && as_dir=.
44756    for ac_exec_ext in '' $ac_executable_extensions; do
44757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44758    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44760    break 2
44761  fi
44762done
44763  done
44764IFS=$as_save_IFS
44765
44766  ;;
44767esac
44768fi
44769BUILD_AR=$ac_cv_path_BUILD_AR
44770if test -n "$BUILD_AR"; then
44771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44772$as_echo "$BUILD_AR" >&6; }
44773else
44774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44775$as_echo "no" >&6; }
44776fi
44777
44778
44779  test -n "$BUILD_AR" && break
44780done
44781
44782  else
44783    # The variable is set, but is it from the command line or the environment?
44784
44785    # Try to remove the string !BUILD_AR! from our list.
44786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44788      # If it failed, the variable was not from the command line. Ignore it,
44789      # but warn the user (except for BASH, which is always set by the calling BASH).
44790      if test "xBUILD_AR" != xBASH; then
44791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44792$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44793      fi
44794      # Try to locate tool using the code snippet
44795      for ac_prog in ar gcc-ar
44796do
44797  # Extract the first word of "$ac_prog", so it can be a program name with args.
44798set dummy $ac_prog; ac_word=$2
44799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44800$as_echo_n "checking for $ac_word... " >&6; }
44801if ${ac_cv_path_BUILD_AR+:} false; then :
44802  $as_echo_n "(cached) " >&6
44803else
44804  case $BUILD_AR in
44805  [\\/]* | ?:[\\/]*)
44806  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44807  ;;
44808  *)
44809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44810for as_dir in $PATH
44811do
44812  IFS=$as_save_IFS
44813  test -z "$as_dir" && as_dir=.
44814    for ac_exec_ext in '' $ac_executable_extensions; do
44815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44816    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44818    break 2
44819  fi
44820done
44821  done
44822IFS=$as_save_IFS
44823
44824  ;;
44825esac
44826fi
44827BUILD_AR=$ac_cv_path_BUILD_AR
44828if test -n "$BUILD_AR"; then
44829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44830$as_echo "$BUILD_AR" >&6; }
44831else
44832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44833$as_echo "no" >&6; }
44834fi
44835
44836
44837  test -n "$BUILD_AR" && break
44838done
44839
44840    else
44841      # If it succeeded, then it was overridden by the user. We will use it
44842      # for the tool.
44843
44844      # First remove it from the list of overridden variables, so we can test
44845      # for unknown variables in the end.
44846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44847
44848      # Check if we try to supply an empty value
44849      if test "x$BUILD_AR" = x; then
44850        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44851$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44852        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44853$as_echo_n "checking for BUILD_AR... " >&6; }
44854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44855$as_echo "disabled" >&6; }
44856      else
44857        # Check if the provided tool contains a complete path.
44858        tool_specified="$BUILD_AR"
44859        tool_basename="${tool_specified##*/}"
44860        if test "x$tool_basename" = "x$tool_specified"; then
44861          # A command without a complete path is provided, search $PATH.
44862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44863$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44864          # Extract the first word of "$tool_basename", so it can be a program name with args.
44865set dummy $tool_basename; ac_word=$2
44866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44867$as_echo_n "checking for $ac_word... " >&6; }
44868if ${ac_cv_path_BUILD_AR+:} false; then :
44869  $as_echo_n "(cached) " >&6
44870else
44871  case $BUILD_AR in
44872  [\\/]* | ?:[\\/]*)
44873  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44874  ;;
44875  *)
44876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44877for as_dir in $PATH
44878do
44879  IFS=$as_save_IFS
44880  test -z "$as_dir" && as_dir=.
44881    for ac_exec_ext in '' $ac_executable_extensions; do
44882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44883    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44885    break 2
44886  fi
44887done
44888  done
44889IFS=$as_save_IFS
44890
44891  ;;
44892esac
44893fi
44894BUILD_AR=$ac_cv_path_BUILD_AR
44895if test -n "$BUILD_AR"; then
44896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44897$as_echo "$BUILD_AR" >&6; }
44898else
44899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44900$as_echo "no" >&6; }
44901fi
44902
44903
44904          if test "x$BUILD_AR" = x; then
44905            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44906          fi
44907        else
44908          # Otherwise we believe it is a complete path. Use it as it is.
44909          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44910$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44912$as_echo_n "checking for BUILD_AR... " >&6; }
44913          if test ! -x "$tool_specified"; then
44914            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44915$as_echo "not found" >&6; }
44916            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44917          fi
44918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44919$as_echo "$tool_specified" >&6; }
44920        fi
44921      fi
44922    fi
44923
44924  fi
44925
44926
44927
44928  # Only process if variable expands to non-empty
44929
44930  if test "x$BUILD_AR" != x; then
44931    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44932
44933  # First separate the path from the arguments. This will split at the first
44934  # space.
44935  complete="$BUILD_AR"
44936  path="${complete%% *}"
44937  tmp="$complete EOL"
44938  arguments="${tmp#* }"
44939
44940  # Input might be given as Windows format, start by converting to
44941  # unix format.
44942  new_path=`$CYGPATH -u "$path"`
44943
44944  # Now try to locate executable using which
44945  new_path=`$WHICH "$new_path" 2> /dev/null`
44946  # bat and cmd files are not always considered executable in cygwin causing which
44947  # to not find them
44948  if test "x$new_path" = x \
44949      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44950      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44951    new_path=`$CYGPATH -u "$path"`
44952  fi
44953  if test "x$new_path" = x; then
44954    # Oops. Which didn't find the executable.
44955    # The splitting of arguments from the executable at a space might have been incorrect,
44956    # since paths with space are more likely in Windows. Give it another try with the whole
44957    # argument.
44958    path="$complete"
44959    arguments="EOL"
44960    new_path=`$CYGPATH -u "$path"`
44961    new_path=`$WHICH "$new_path" 2> /dev/null`
44962    # bat and cmd files are not always considered executable in cygwin causing which
44963    # to not find them
44964    if test "x$new_path" = x \
44965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44967      new_path=`$CYGPATH -u "$path"`
44968    fi
44969    if test "x$new_path" = x; then
44970      # It's still not found. Now this is an unrecoverable error.
44971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44972$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44973      has_space=`$ECHO "$complete" | $GREP " "`
44974      if test "x$has_space" != x; then
44975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44977      fi
44978      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44979    fi
44980  fi
44981
44982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44985  # "foo.exe" is OK but "foo" is an error.
44986  #
44987  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44988  # It is also a way to make sure we got the proper file name for the real test later on.
44989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44990  if test "x$test_shortpath" = x; then
44991    # Short path failed, file does not exist as specified.
44992    # Try adding .exe or .cmd
44993    if test -f "${new_path}.exe"; then
44994      input_to_shortpath="${new_path}.exe"
44995    elif test -f "${new_path}.cmd"; then
44996      input_to_shortpath="${new_path}.cmd"
44997    else
44998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44999$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45000      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45001$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45002      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45003    fi
45004  else
45005    input_to_shortpath="$new_path"
45006  fi
45007
45008  # Call helper function which possibly converts this using DOS-style short mode.
45009  # If so, the updated path is stored in $new_path.
45010  new_path="$input_to_shortpath"
45011
45012  input_path="$input_to_shortpath"
45013  # Check if we need to convert this using DOS-style short mode. If the path
45014  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45015  # take no chances and rewrite it.
45016  # Note: m4 eats our [], so we need to use [ and ] instead.
45017  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45018  if test "x$has_forbidden_chars" != x; then
45019    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45020    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45021    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45022    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45023      # Going to short mode and back again did indeed matter. Since short mode is
45024      # case insensitive, let's make it lowercase to improve readability.
45025      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45026      # Now convert it back to Unix-style (cygpath)
45027      input_path=`$CYGPATH -u "$shortmode_path"`
45028      new_path="$input_path"
45029    fi
45030  fi
45031
45032  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45033  if test "x$test_cygdrive_prefix" = x; then
45034    # As a simple fix, exclude /usr/bin since it's not a real path.
45035    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45036      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45037      # a path prefixed by /cygdrive for fixpath to work.
45038      new_path="$CYGWIN_ROOT_PATH$input_path"
45039    fi
45040  fi
45041
45042  # remove trailing .exe if any
45043  new_path="${new_path/%.exe/}"
45044
45045    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45046
45047  # First separate the path from the arguments. This will split at the first
45048  # space.
45049  complete="$BUILD_AR"
45050  path="${complete%% *}"
45051  tmp="$complete EOL"
45052  arguments="${tmp#* }"
45053
45054  # Input might be given as Windows format, start by converting to
45055  # unix format.
45056  new_path="$path"
45057
45058  windows_path="$new_path"
45059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45060    unix_path=`$CYGPATH -u "$windows_path"`
45061    new_path="$unix_path"
45062  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45063    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45064    new_path="$unix_path"
45065  fi
45066
45067
45068  # Now try to locate executable using which
45069  new_path=`$WHICH "$new_path" 2> /dev/null`
45070
45071  if test "x$new_path" = x; then
45072    # Oops. Which didn't find the executable.
45073    # The splitting of arguments from the executable at a space might have been incorrect,
45074    # since paths with space are more likely in Windows. Give it another try with the whole
45075    # argument.
45076    path="$complete"
45077    arguments="EOL"
45078    new_path="$path"
45079
45080  windows_path="$new_path"
45081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45082    unix_path=`$CYGPATH -u "$windows_path"`
45083    new_path="$unix_path"
45084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45086    new_path="$unix_path"
45087  fi
45088
45089
45090    new_path=`$WHICH "$new_path" 2> /dev/null`
45091    # bat and cmd files are not always considered executable in MSYS causing which
45092    # to not find them
45093    if test "x$new_path" = x \
45094        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45095        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45096      new_path="$path"
45097
45098  windows_path="$new_path"
45099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45100    unix_path=`$CYGPATH -u "$windows_path"`
45101    new_path="$unix_path"
45102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45104    new_path="$unix_path"
45105  fi
45106
45107    fi
45108
45109    if test "x$new_path" = x; then
45110      # It's still not found. Now this is an unrecoverable error.
45111      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45112$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45113      has_space=`$ECHO "$complete" | $GREP " "`
45114      if test "x$has_space" != x; then
45115        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45116$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45117      fi
45118      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45119    fi
45120  fi
45121
45122  # Now new_path has a complete unix path to the binary
45123  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45124    # Keep paths in /bin as-is, but remove trailing .exe if any
45125    new_path="${new_path/%.exe/}"
45126    # Do not save /bin paths to all_fixpath_prefixes!
45127  else
45128    # Not in mixed or Windows style, start by that.
45129    new_path=`cmd //c echo $new_path`
45130
45131  input_path="$new_path"
45132  # Check if we need to convert this using DOS-style short mode. If the path
45133  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45134  # take no chances and rewrite it.
45135  # Note: m4 eats our [], so we need to use [ and ] instead.
45136  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45137  if test "x$has_forbidden_chars" != x; then
45138    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45139    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45140  fi
45141
45142    # Output is in $new_path
45143
45144  windows_path="$new_path"
45145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45146    unix_path=`$CYGPATH -u "$windows_path"`
45147    new_path="$unix_path"
45148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45150    new_path="$unix_path"
45151  fi
45152
45153    # remove trailing .exe if any
45154    new_path="${new_path/%.exe/}"
45155
45156    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45157    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45158  fi
45159
45160    else
45161      # We're on a unix platform. Hooray! :)
45162      # First separate the path from the arguments. This will split at the first
45163      # space.
45164      complete="$BUILD_AR"
45165      path="${complete%% *}"
45166      tmp="$complete EOL"
45167      arguments="${tmp#* }"
45168
45169      # Cannot rely on the command "which" here since it doesn't always work.
45170      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45171      if test -z "$is_absolute_path"; then
45172        # Path to executable is not absolute. Find it.
45173        IFS_save="$IFS"
45174        IFS=:
45175        for p in $PATH; do
45176          if test -f "$p/$path" && test -x "$p/$path"; then
45177            new_path="$p/$path"
45178            break
45179          fi
45180        done
45181        IFS="$IFS_save"
45182      else
45183        # This is an absolute path, we can use it without further modifications.
45184        new_path="$path"
45185      fi
45186
45187      if test "x$new_path" = x; then
45188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45189$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45190        has_space=`$ECHO "$complete" | $GREP " "`
45191        if test "x$has_space" != x; then
45192          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45193$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45194        fi
45195        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45196      fi
45197    fi
45198
45199    # Now join together the path and the arguments once again
45200    if test "x$arguments" != xEOL; then
45201      new_complete="$new_path ${arguments% *}"
45202    else
45203      new_complete="$new_path"
45204    fi
45205
45206    if test "x$complete" != "x$new_complete"; then
45207      BUILD_AR="$new_complete"
45208      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45209$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45210    fi
45211  fi
45212
45213    # Assume the C compiler is the assembler
45214    BUILD_AS="$BUILD_CC -c"
45215    # Just like for the target compiler, use the compiler as linker
45216    BUILD_LD="$BUILD_CC"
45217
45218    PATH="$OLDPATH"
45219  else
45220    # If we are not cross compiling, use the normal target compilers for
45221    # building the build platform executables.
45222    BUILD_CC="$CC"
45223    BUILD_CXX="$CXX"
45224    BUILD_LD="$LD"
45225    BUILD_NM="$NM"
45226    BUILD_AS="$AS"
45227    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
45228    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
45229    BUILD_AR="$AR"
45230  fi
45231
45232
45233
45234
45235
45236
45237
45238
45239
45240
45241
45242  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45243    # For hotspot, we need these in Windows mixed path,
45244    # so rewrite them all. Need added .exe suffix.
45245    HOTSPOT_CXX="$CXX.exe"
45246    HOTSPOT_LD="$LD.exe"
45247    HOTSPOT_MT="$MT.exe"
45248    HOTSPOT_RC="$RC.exe"
45249
45250  unix_path="$HOTSPOT_CXX"
45251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45252    windows_path=`$CYGPATH -m "$unix_path"`
45253    HOTSPOT_CXX="$windows_path"
45254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45255    windows_path=`cmd //c echo $unix_path`
45256    HOTSPOT_CXX="$windows_path"
45257  fi
45258
45259
45260  unix_path="$HOTSPOT_LD"
45261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45262    windows_path=`$CYGPATH -m "$unix_path"`
45263    HOTSPOT_LD="$windows_path"
45264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45265    windows_path=`cmd //c echo $unix_path`
45266    HOTSPOT_LD="$windows_path"
45267  fi
45268
45269
45270  unix_path="$HOTSPOT_MT"
45271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45272    windows_path=`$CYGPATH -m "$unix_path"`
45273    HOTSPOT_MT="$windows_path"
45274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45275    windows_path=`cmd //c echo $unix_path`
45276    HOTSPOT_MT="$windows_path"
45277  fi
45278
45279
45280  unix_path="$HOTSPOT_RC"
45281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45282    windows_path=`$CYGPATH -m "$unix_path"`
45283    HOTSPOT_RC="$windows_path"
45284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45285    windows_path=`cmd //c echo $unix_path`
45286    HOTSPOT_RC="$windows_path"
45287  fi
45288
45289
45290
45291  else
45292    HOTSPOT_CXX="$CXX"
45293    HOTSPOT_LD="$LD"
45294  fi
45295
45296
45297
45298  if test  "x$TOOLCHAIN_TYPE" = xclang; then
45299    USE_CLANG=true
45300  fi
45301
45302
45303
45304
45305
45306  # The package path is used only on macosx?
45307  # FIXME: clean this up, and/or move it elsewhere.
45308  PACKAGE_PATH=/opt/local
45309
45310
45311  # Check for extra potential brokenness.
45312  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45313    # On Windows, double-check that we got the right compiler.
45314    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
45315    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
45316    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
45317      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
45318        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
45319      fi
45320    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
45321      if test "x$COMPILER_CPU_TEST" != "xx64"; then
45322        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
45323      fi
45324    fi
45325  fi
45326
45327  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45328    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45329    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
45330    # This is later checked when setting flags.
45331
45332    # "-Og" suppported for GCC 4.8 and later
45333    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
45334
45335  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
45336$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
45337  supports=yes
45338
45339  saved_cflags="$CFLAGS"
45340  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
45341  ac_ext=c
45342ac_cpp='$CPP $CPPFLAGS'
45343ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45344ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45345ac_compiler_gnu=$ac_cv_c_compiler_gnu
45346
45347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45348/* end confdefs.h.  */
45349int i;
45350_ACEOF
45351if ac_fn_c_try_compile "$LINENO"; then :
45352
45353else
45354  supports=no
45355fi
45356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45357  ac_ext=cpp
45358ac_cpp='$CXXCPP $CPPFLAGS'
45359ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45360ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45361ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45362
45363  CFLAGS="$saved_cflags"
45364
45365  saved_cxxflags="$CXXFLAGS"
45366  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
45367  ac_ext=cpp
45368ac_cpp='$CXXCPP $CPPFLAGS'
45369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45372
45373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45374/* end confdefs.h.  */
45375int i;
45376_ACEOF
45377if ac_fn_cxx_try_compile "$LINENO"; then :
45378
45379else
45380  supports=no
45381fi
45382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45383  ac_ext=cpp
45384ac_cpp='$CXXCPP $CPPFLAGS'
45385ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45386ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45387ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45388
45389  CXXFLAGS="$saved_cxxflags"
45390
45391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45392$as_echo "$supports" >&6; }
45393  if test "x$supports" = "xyes" ; then
45394    HAS_CFLAG_OPTIMIZE_DEBUG=true
45395  else
45396    HAS_CFLAG_OPTIMIZE_DEBUG=false
45397  fi
45398
45399
45400    # "-z relro" supported in GNU binutils 2.17 and later
45401    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
45402
45403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
45404$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
45405  supports=yes
45406
45407  saved_ldflags="$LDFLAGS"
45408  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
45409  ac_ext=c
45410ac_cpp='$CPP $CPPFLAGS'
45411ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45412ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45413ac_compiler_gnu=$ac_cv_c_compiler_gnu
45414
45415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45416/* end confdefs.h.  */
45417
45418int
45419main ()
45420{
45421
45422  ;
45423  return 0;
45424}
45425_ACEOF
45426if ac_fn_c_try_link "$LINENO"; then :
45427
45428else
45429  supports=no
45430fi
45431rm -f core conftest.err conftest.$ac_objext \
45432    conftest$ac_exeext conftest.$ac_ext
45433  ac_ext=cpp
45434ac_cpp='$CXXCPP $CPPFLAGS'
45435ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45436ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45437ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45438
45439  LDFLAGS="$saved_ldflags"
45440
45441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45442$as_echo "$supports" >&6; }
45443  if test "x$supports" = "xyes" ; then
45444    HAS_LINKER_RELRO=true
45445  else
45446    HAS_LINKER_RELRO=false
45447  fi
45448
45449
45450    # "-z now" supported in GNU binutils 2.11 and later
45451    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
45452
45453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
45454$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
45455  supports=yes
45456
45457  saved_ldflags="$LDFLAGS"
45458  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
45459  ac_ext=c
45460ac_cpp='$CPP $CPPFLAGS'
45461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45463ac_compiler_gnu=$ac_cv_c_compiler_gnu
45464
45465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45466/* end confdefs.h.  */
45467
45468int
45469main ()
45470{
45471
45472  ;
45473  return 0;
45474}
45475_ACEOF
45476if ac_fn_c_try_link "$LINENO"; then :
45477
45478else
45479  supports=no
45480fi
45481rm -f core conftest.err conftest.$ac_objext \
45482    conftest$ac_exeext conftest.$ac_ext
45483  ac_ext=cpp
45484ac_cpp='$CXXCPP $CPPFLAGS'
45485ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45486ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45487ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45488
45489  LDFLAGS="$saved_ldflags"
45490
45491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45492$as_echo "$supports" >&6; }
45493  if test "x$supports" = "xyes" ; then
45494    HAS_LINKER_NOW=true
45495  else
45496    HAS_LINKER_NOW=false
45497  fi
45498
45499  fi
45500
45501  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
45502  # in executable.'
45503  USING_BROKEN_SUSE_LD=no
45504  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
45505    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
45506$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
45507    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
45508    $ECHO "int main() { }" > main.c
45509    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
45510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45511$as_echo "no" >&6; }
45512      USING_BROKEN_SUSE_LD=no
45513    else
45514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45515$as_echo "yes" >&6; }
45516      USING_BROKEN_SUSE_LD=yes
45517    fi
45518    rm -rf version-script.map main.c a.out
45519  fi
45520
45521
45522
45523# Setup the JTReg Regression Test Harness.
45524
45525
45526# Check whether --with-jtreg was given.
45527if test "${with_jtreg+set}" = set; then :
45528  withval=$with_jtreg;
45529else
45530  with_jtreg=no
45531fi
45532
45533
45534  if test "x$with_jtreg" = xno; then
45535    # jtreg disabled
45536    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45537$as_echo_n "checking for jtreg... " >&6; }
45538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45539$as_echo "no" >&6; }
45540  else
45541    if test "x$with_jtreg" != xyes; then
45542      # with path specified.
45543      JT_HOME="$with_jtreg"
45544    fi
45545
45546    if test "x$JT_HOME" != x; then
45547      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45548$as_echo_n "checking for jtreg... " >&6; }
45549
45550      # use JT_HOME enviroment var.
45551
45552  # Only process if variable expands to non-empty
45553
45554  if test "x$JT_HOME" != x; then
45555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45556
45557  # Input might be given as Windows format, start by converting to
45558  # unix format.
45559  path="$JT_HOME"
45560  new_path=`$CYGPATH -u "$path"`
45561
45562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45565  # "foo.exe" is OK but "foo" is an error.
45566  #
45567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45568  # It is also a way to make sure we got the proper file name for the real test later on.
45569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45570  if test "x$test_shortpath" = x; then
45571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45572$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45573    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45574  fi
45575
45576  # Call helper function which possibly converts this using DOS-style short mode.
45577  # If so, the updated path is stored in $new_path.
45578
45579  input_path="$new_path"
45580  # Check if we need to convert this using DOS-style short mode. If the path
45581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45582  # take no chances and rewrite it.
45583  # Note: m4 eats our [], so we need to use [ and ] instead.
45584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45585  if test "x$has_forbidden_chars" != x; then
45586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45590      # Going to short mode and back again did indeed matter. Since short mode is
45591      # case insensitive, let's make it lowercase to improve readability.
45592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45593      # Now convert it back to Unix-style (cygpath)
45594      input_path=`$CYGPATH -u "$shortmode_path"`
45595      new_path="$input_path"
45596    fi
45597  fi
45598
45599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45600  if test "x$test_cygdrive_prefix" = x; then
45601    # As a simple fix, exclude /usr/bin since it's not a real path.
45602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45604      # a path prefixed by /cygdrive for fixpath to work.
45605      new_path="$CYGWIN_ROOT_PATH$input_path"
45606    fi
45607  fi
45608
45609
45610  if test "x$path" != "x$new_path"; then
45611    JT_HOME="$new_path"
45612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45613$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45614  fi
45615
45616    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45617
45618  path="$JT_HOME"
45619  has_colon=`$ECHO $path | $GREP ^.:`
45620  new_path="$path"
45621  if test "x$has_colon" = x; then
45622    # Not in mixed or Windows style, start by that.
45623    new_path=`cmd //c echo $path`
45624  fi
45625
45626
45627  input_path="$new_path"
45628  # Check if we need to convert this using DOS-style short mode. If the path
45629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45630  # take no chances and rewrite it.
45631  # Note: m4 eats our [], so we need to use [ and ] instead.
45632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45633  if test "x$has_forbidden_chars" != x; then
45634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45636  fi
45637
45638
45639  windows_path="$new_path"
45640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45641    unix_path=`$CYGPATH -u "$windows_path"`
45642    new_path="$unix_path"
45643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45645    new_path="$unix_path"
45646  fi
45647
45648  if test "x$path" != "x$new_path"; then
45649    JT_HOME="$new_path"
45650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45651$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45652  fi
45653
45654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45656
45657    else
45658      # We're on a unix platform. Hooray! :)
45659      path="$JT_HOME"
45660      has_space=`$ECHO "$path" | $GREP " "`
45661      if test "x$has_space" != x; then
45662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45663$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45664        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45665      fi
45666
45667      # Use eval to expand a potential ~
45668      eval path="$path"
45669      if test ! -f "$path" && test ! -d "$path"; then
45670        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45671      fi
45672
45673      if test -d "$path"; then
45674        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45675      else
45676        dir="`$DIRNAME "$path"`"
45677        base="`$BASENAME "$path"`"
45678        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45679      fi
45680    fi
45681  fi
45682
45683
45684      # jtreg win32 script works for everybody
45685      JTREGEXE="$JT_HOME/bin/jtreg"
45686
45687      if test ! -f "$JTREGEXE"; then
45688        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45689      fi
45690
45691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45692$as_echo "$JTREGEXE" >&6; }
45693    else
45694      # try to find jtreg on path
45695
45696
45697
45698  # Publish this variable in the help.
45699
45700
45701  if [ -z "${JTREGEXE+x}" ]; then
45702    # The variable is not set by user, try to locate tool using the code snippet
45703    for ac_prog in jtreg
45704do
45705  # Extract the first word of "$ac_prog", so it can be a program name with args.
45706set dummy $ac_prog; ac_word=$2
45707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45708$as_echo_n "checking for $ac_word... " >&6; }
45709if ${ac_cv_path_JTREGEXE+:} false; then :
45710  $as_echo_n "(cached) " >&6
45711else
45712  case $JTREGEXE in
45713  [\\/]* | ?:[\\/]*)
45714  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45715  ;;
45716  *)
45717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45718for as_dir in $PATH
45719do
45720  IFS=$as_save_IFS
45721  test -z "$as_dir" && as_dir=.
45722    for ac_exec_ext in '' $ac_executable_extensions; do
45723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45724    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45726    break 2
45727  fi
45728done
45729  done
45730IFS=$as_save_IFS
45731
45732  ;;
45733esac
45734fi
45735JTREGEXE=$ac_cv_path_JTREGEXE
45736if test -n "$JTREGEXE"; then
45737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45738$as_echo "$JTREGEXE" >&6; }
45739else
45740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45741$as_echo "no" >&6; }
45742fi
45743
45744
45745  test -n "$JTREGEXE" && break
45746done
45747
45748  else
45749    # The variable is set, but is it from the command line or the environment?
45750
45751    # Try to remove the string !JTREGEXE! from our list.
45752    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45753    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45754      # If it failed, the variable was not from the command line. Ignore it,
45755      # but warn the user (except for BASH, which is always set by the calling BASH).
45756      if test "xJTREGEXE" != xBASH; then
45757        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45758$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45759      fi
45760      # Try to locate tool using the code snippet
45761      for ac_prog in jtreg
45762do
45763  # Extract the first word of "$ac_prog", so it can be a program name with args.
45764set dummy $ac_prog; ac_word=$2
45765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45766$as_echo_n "checking for $ac_word... " >&6; }
45767if ${ac_cv_path_JTREGEXE+:} false; then :
45768  $as_echo_n "(cached) " >&6
45769else
45770  case $JTREGEXE in
45771  [\\/]* | ?:[\\/]*)
45772  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45773  ;;
45774  *)
45775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45776for as_dir in $PATH
45777do
45778  IFS=$as_save_IFS
45779  test -z "$as_dir" && as_dir=.
45780    for ac_exec_ext in '' $ac_executable_extensions; do
45781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45782    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45784    break 2
45785  fi
45786done
45787  done
45788IFS=$as_save_IFS
45789
45790  ;;
45791esac
45792fi
45793JTREGEXE=$ac_cv_path_JTREGEXE
45794if test -n "$JTREGEXE"; then
45795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45796$as_echo "$JTREGEXE" >&6; }
45797else
45798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45799$as_echo "no" >&6; }
45800fi
45801
45802
45803  test -n "$JTREGEXE" && break
45804done
45805
45806    else
45807      # If it succeeded, then it was overridden by the user. We will use it
45808      # for the tool.
45809
45810      # First remove it from the list of overridden variables, so we can test
45811      # for unknown variables in the end.
45812      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45813
45814      # Check if we try to supply an empty value
45815      if test "x$JTREGEXE" = x; then
45816        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45817$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45819$as_echo_n "checking for JTREGEXE... " >&6; }
45820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45821$as_echo "disabled" >&6; }
45822      else
45823        # Check if the provided tool contains a complete path.
45824        tool_specified="$JTREGEXE"
45825        tool_basename="${tool_specified##*/}"
45826        if test "x$tool_basename" = "x$tool_specified"; then
45827          # A command without a complete path is provided, search $PATH.
45828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45829$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45830          # Extract the first word of "$tool_basename", so it can be a program name with args.
45831set dummy $tool_basename; ac_word=$2
45832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45833$as_echo_n "checking for $ac_word... " >&6; }
45834if ${ac_cv_path_JTREGEXE+:} false; then :
45835  $as_echo_n "(cached) " >&6
45836else
45837  case $JTREGEXE in
45838  [\\/]* | ?:[\\/]*)
45839  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45840  ;;
45841  *)
45842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45843for as_dir in $PATH
45844do
45845  IFS=$as_save_IFS
45846  test -z "$as_dir" && as_dir=.
45847    for ac_exec_ext in '' $ac_executable_extensions; do
45848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45849    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45851    break 2
45852  fi
45853done
45854  done
45855IFS=$as_save_IFS
45856
45857  ;;
45858esac
45859fi
45860JTREGEXE=$ac_cv_path_JTREGEXE
45861if test -n "$JTREGEXE"; then
45862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45863$as_echo "$JTREGEXE" >&6; }
45864else
45865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45866$as_echo "no" >&6; }
45867fi
45868
45869
45870          if test "x$JTREGEXE" = x; then
45871            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45872          fi
45873        else
45874          # Otherwise we believe it is a complete path. Use it as it is.
45875          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45876$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45877          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45878$as_echo_n "checking for JTREGEXE... " >&6; }
45879          if test ! -x "$tool_specified"; then
45880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45881$as_echo "not found" >&6; }
45882            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45883          fi
45884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45885$as_echo "$tool_specified" >&6; }
45886        fi
45887      fi
45888    fi
45889
45890  fi
45891
45892
45893
45894  if test "x$JTREGEXE" = x; then
45895    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45896  fi
45897
45898
45899      JT_HOME="`$DIRNAME $JTREGEXE`"
45900    fi
45901  fi
45902
45903
45904
45905
45906
45907
45908  # Option used to tell the compiler whether to create 32- or 64-bit executables
45909  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45910    COMPILER_TARGET_BITS_FLAG="-q"
45911  else
45912    COMPILER_TARGET_BITS_FLAG="-m"
45913  fi
45914
45915
45916  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45917  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45918    ARFLAGS="-r"
45919  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45920    ARFLAGS="-X64"
45921  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45922    # lib.exe is used as AR to create static libraries.
45923    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45924  else
45925    ARFLAGS=""
45926  fi
45927
45928
45929  ## Setup strip.
45930  # FIXME: should this really be per platform, or should it be per toolchain type?
45931  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45932  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45933  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45934    STRIPFLAGS="-g"
45935  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45936    STRIPFLAGS="-x"
45937  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45938    STRIPFLAGS="-S"
45939  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45940    STRIPFLAGS="-X32_64"
45941  fi
45942
45943
45944
45945  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45946    CC_OUT_OPTION=-Fo
45947    EXE_OUT_OPTION=-out:
45948    LD_OUT_OPTION=-out:
45949    AR_OUT_OPTION=-out:
45950  else
45951    # The option used to specify the target .o,.a or .so file.
45952    # When compiling, how to specify the to be created object file.
45953    CC_OUT_OPTION='-o$(SPACE)'
45954    # When linking, how to specify the to be created executable.
45955    EXE_OUT_OPTION='-o$(SPACE)'
45956    # When linking, how to specify the to be created dynamically linkable library.
45957    LD_OUT_OPTION='-o$(SPACE)'
45958    # When archiving, how to specify the to be create static archive for object files.
45959    AR_OUT_OPTION='rcs$(SPACE)'
45960  fi
45961
45962
45963
45964
45965
45966  # On Windows, we need to set RC flags.
45967  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45968    RC_FLAGS="-nologo -l0x409"
45969    if test "x$VARIANT" = xOPT; then
45970      RC_FLAGS="$RC_FLAGS -DNDEBUG"
45971    fi
45972
45973    # The version variables used to create RC_FLAGS may be overridden
45974    # in a custom configure script, or possibly the command line.
45975    # Let those variables be expanded at make time in spec.gmk.
45976    # The \$ are escaped to the shell, and the $(...) variables
45977    # are evaluated by make.
45978    RC_FLAGS="$RC_FLAGS \
45979        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
45980        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45981        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45982        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
45983        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45984        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
45985        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
45986  fi
45987
45988
45989  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45990    # silence copyright notice and other headers.
45991    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45992  fi
45993
45994
45995# FIXME: Currently we must test this after toolchain but before flags. Fix!
45996
45997# Now we can test some aspects on the target using configure macros.
45998
45999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
46000$as_echo_n "checking for ANSI C header files... " >&6; }
46001if ${ac_cv_header_stdc+:} false; then :
46002  $as_echo_n "(cached) " >&6
46003else
46004  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46005/* end confdefs.h.  */
46006#include <stdlib.h>
46007#include <stdarg.h>
46008#include <string.h>
46009#include <float.h>
46010
46011int
46012main ()
46013{
46014
46015  ;
46016  return 0;
46017}
46018_ACEOF
46019if ac_fn_cxx_try_compile "$LINENO"; then :
46020  ac_cv_header_stdc=yes
46021else
46022  ac_cv_header_stdc=no
46023fi
46024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46025
46026if test $ac_cv_header_stdc = yes; then
46027  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
46028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46029/* end confdefs.h.  */
46030#include <string.h>
46031
46032_ACEOF
46033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46034  $EGREP "memchr" >/dev/null 2>&1; then :
46035
46036else
46037  ac_cv_header_stdc=no
46038fi
46039rm -f conftest*
46040
46041fi
46042
46043if test $ac_cv_header_stdc = yes; then
46044  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
46045  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46046/* end confdefs.h.  */
46047#include <stdlib.h>
46048
46049_ACEOF
46050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46051  $EGREP "free" >/dev/null 2>&1; then :
46052
46053else
46054  ac_cv_header_stdc=no
46055fi
46056rm -f conftest*
46057
46058fi
46059
46060if test $ac_cv_header_stdc = yes; then
46061  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
46062  if test "$cross_compiling" = yes; then :
46063  :
46064else
46065  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46066/* end confdefs.h.  */
46067#include <ctype.h>
46068#include <stdlib.h>
46069#if ((' ' & 0x0FF) == 0x020)
46070# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
46071# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
46072#else
46073# define ISLOWER(c) \
46074		   (('a' <= (c) && (c) <= 'i') \
46075		     || ('j' <= (c) && (c) <= 'r') \
46076		     || ('s' <= (c) && (c) <= 'z'))
46077# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
46078#endif
46079
46080#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
46081int
46082main ()
46083{
46084  int i;
46085  for (i = 0; i < 256; i++)
46086    if (XOR (islower (i), ISLOWER (i))
46087	|| toupper (i) != TOUPPER (i))
46088      return 2;
46089  return 0;
46090}
46091_ACEOF
46092if ac_fn_cxx_try_run "$LINENO"; then :
46093
46094else
46095  ac_cv_header_stdc=no
46096fi
46097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46098  conftest.$ac_objext conftest.beam conftest.$ac_ext
46099fi
46100
46101fi
46102fi
46103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
46104$as_echo "$ac_cv_header_stdc" >&6; }
46105if test $ac_cv_header_stdc = yes; then
46106
46107$as_echo "#define STDC_HEADERS 1" >>confdefs.h
46108
46109fi
46110
46111# On IRIX 5.3, sys/types and inttypes.h are conflicting.
46112for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
46113		  inttypes.h stdint.h unistd.h
46114do :
46115  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
46116ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
46117"
46118if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
46119  cat >>confdefs.h <<_ACEOF
46120#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
46121_ACEOF
46122
46123fi
46124
46125done
46126
46127
46128
46129  ###############################################################################
46130  #
46131  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
46132  # (The JVM can use 32 or 64 bit Java pointers but that decision
46133  # is made at runtime.)
46134  #
46135
46136  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
46137    # Always specify -m flag on Solaris
46138    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
46139
46140  # When we add flags to the "official" CFLAGS etc, we need to
46141  # keep track of these additions in ADDED_CFLAGS etc. These
46142  # will later be checked to make sure only controlled additions
46143  # have been made to CFLAGS etc.
46144  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46145  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46146  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46147
46148  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46149  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46150  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46151
46152  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46153  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46154  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46155
46156  elif test "x$COMPILE_TYPE" = xreduced; then
46157    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
46158      # Specify -m if running reduced on unix platforms
46159
46160  # When we add flags to the "official" CFLAGS etc, we need to
46161  # keep track of these additions in ADDED_CFLAGS etc. These
46162  # will later be checked to make sure only controlled additions
46163  # have been made to CFLAGS etc.
46164  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46165  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46166  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46167
46168  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46169  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46170  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46171
46172  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46173  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46174  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46175
46176    fi
46177  fi
46178
46179  # Make compilation sanity check
46180  for ac_header in stdio.h
46181do :
46182  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
46183if test "x$ac_cv_header_stdio_h" = xyes; then :
46184  cat >>confdefs.h <<_ACEOF
46185#define HAVE_STDIO_H 1
46186_ACEOF
46187
46188else
46189
46190    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
46191$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
46192    if test "x$COMPILE_TYPE" = xreduced; then
46193
46194  # Print a helpful message on how to acquire the necessary build dependency.
46195  # reduced is the help tag: freetype, cups, alsa etc
46196  MISSING_DEPENDENCY=reduced
46197
46198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46199    cygwin_help $MISSING_DEPENDENCY
46200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46201    msys_help $MISSING_DEPENDENCY
46202  else
46203    PKGHANDLER_COMMAND=
46204
46205    case $PKGHANDLER in
46206      apt-get)
46207        apt_help     $MISSING_DEPENDENCY ;;
46208      yum)
46209        yum_help     $MISSING_DEPENDENCY ;;
46210      port)
46211        port_help    $MISSING_DEPENDENCY ;;
46212      pkgutil)
46213        pkgutil_help $MISSING_DEPENDENCY ;;
46214      pkgadd)
46215        pkgadd_help  $MISSING_DEPENDENCY ;;
46216    esac
46217
46218    if test "x$PKGHANDLER_COMMAND" != x; then
46219      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46220    fi
46221  fi
46222
46223      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46224$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46225    elif test "x$COMPILE_TYPE" = xcross; then
46226      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46227$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46228    fi
46229    as_fn_error $? "Cannot continue." "$LINENO" 5
46230
46231fi
46232
46233done
46234
46235
46236  # The cast to long int works around a bug in the HP C Compiler
46237# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46238# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46239# This bug is HP SR number 8606223364.
46240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46241$as_echo_n "checking size of int *... " >&6; }
46242if ${ac_cv_sizeof_int_p+:} false; then :
46243  $as_echo_n "(cached) " >&6
46244else
46245  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46246
46247else
46248  if test "$ac_cv_type_int_p" = yes; then
46249     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46251as_fn_error 77 "cannot compute sizeof (int *)
46252See \`config.log' for more details" "$LINENO" 5; }
46253   else
46254     ac_cv_sizeof_int_p=0
46255   fi
46256fi
46257
46258fi
46259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46260$as_echo "$ac_cv_sizeof_int_p" >&6; }
46261
46262
46263
46264cat >>confdefs.h <<_ACEOF
46265#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46266_ACEOF
46267
46268
46269
46270  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
46271  if test "x$ac_cv_sizeof_int_p" = x; then
46272    # The test failed, lets stick to the assumed value.
46273    { $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
46274$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
46275  else
46276    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46277
46278    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46279      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
46280      # Let's try to implicitely set the compilers target architecture and retry the test
46281      { $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
46282$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;}
46283      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
46284$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
46285
46286  # When we add flags to the "official" CFLAGS etc, we need to
46287  # keep track of these additions in ADDED_CFLAGS etc. These
46288  # will later be checked to make sure only controlled additions
46289  # have been made to CFLAGS etc.
46290  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46291  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46292  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46293
46294  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46295  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46296  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46297
46298  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46299  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46300  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46301
46302
46303      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
46304      unset ac_cv_sizeof_int_p
46305      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
46306      cat >>confdefs.h <<_ACEOF
46307#undef SIZEOF_INT_P
46308_ACEOF
46309
46310      # The cast to long int works around a bug in the HP C Compiler
46311# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46312# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46313# This bug is HP SR number 8606223364.
46314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46315$as_echo_n "checking size of int *... " >&6; }
46316if ${ac_cv_sizeof_int_p+:} false; then :
46317  $as_echo_n "(cached) " >&6
46318else
46319  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46320
46321else
46322  if test "$ac_cv_type_int_p" = yes; then
46323     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46324$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46325as_fn_error 77 "cannot compute sizeof (int *)
46326See \`config.log' for more details" "$LINENO" 5; }
46327   else
46328     ac_cv_sizeof_int_p=0
46329   fi
46330fi
46331
46332fi
46333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46334$as_echo "$ac_cv_sizeof_int_p" >&6; }
46335
46336
46337
46338cat >>confdefs.h <<_ACEOF
46339#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46340_ACEOF
46341
46342
46343
46344      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46345
46346      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46347        { $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
46348$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;}
46349        if test "x$COMPILE_TYPE" = xreduced; then
46350
46351  # Print a helpful message on how to acquire the necessary build dependency.
46352  # reduced is the help tag: freetype, cups, alsa etc
46353  MISSING_DEPENDENCY=reduced
46354
46355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46356    cygwin_help $MISSING_DEPENDENCY
46357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46358    msys_help $MISSING_DEPENDENCY
46359  else
46360    PKGHANDLER_COMMAND=
46361
46362    case $PKGHANDLER in
46363      apt-get)
46364        apt_help     $MISSING_DEPENDENCY ;;
46365      yum)
46366        yum_help     $MISSING_DEPENDENCY ;;
46367      port)
46368        port_help    $MISSING_DEPENDENCY ;;
46369      pkgutil)
46370        pkgutil_help $MISSING_DEPENDENCY ;;
46371      pkgadd)
46372        pkgadd_help  $MISSING_DEPENDENCY ;;
46373    esac
46374
46375    if test "x$PKGHANDLER_COMMAND" != x; then
46376      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46377    fi
46378  fi
46379
46380          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46381$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46382        elif test "x$COMPILE_TYPE" = xcross; then
46383          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46384$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46385        fi
46386        as_fn_error $? "Cannot continue." "$LINENO" 5
46387      fi
46388    fi
46389  fi
46390
46391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
46392$as_echo_n "checking for target address size... " >&6; }
46393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
46394$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
46395
46396
46397  ###############################################################################
46398  #
46399  # Is the target little of big endian?
46400  #
46401   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
46402$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
46403if ${ac_cv_c_bigendian+:} false; then :
46404  $as_echo_n "(cached) " >&6
46405else
46406  ac_cv_c_bigendian=unknown
46407    # See if we're dealing with a universal compiler.
46408    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46409/* end confdefs.h.  */
46410#ifndef __APPLE_CC__
46411	       not a universal capable compiler
46412	     #endif
46413	     typedef int dummy;
46414
46415_ACEOF
46416if ac_fn_cxx_try_compile "$LINENO"; then :
46417
46418	# Check for potential -arch flags.  It is not universal unless
46419	# there are at least two -arch flags with different values.
46420	ac_arch=
46421	ac_prev=
46422	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
46423	 if test -n "$ac_prev"; then
46424	   case $ac_word in
46425	     i?86 | x86_64 | ppc | ppc64)
46426	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
46427		 ac_arch=$ac_word
46428	       else
46429		 ac_cv_c_bigendian=universal
46430		 break
46431	       fi
46432	       ;;
46433	   esac
46434	   ac_prev=
46435	 elif test "x$ac_word" = "x-arch"; then
46436	   ac_prev=arch
46437	 fi
46438       done
46439fi
46440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46441    if test $ac_cv_c_bigendian = unknown; then
46442      # See if sys/param.h defines the BYTE_ORDER macro.
46443      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46444/* end confdefs.h.  */
46445#include <sys/types.h>
46446	     #include <sys/param.h>
46447
46448int
46449main ()
46450{
46451#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
46452		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
46453		     && LITTLE_ENDIAN)
46454	      bogus endian macros
46455	     #endif
46456
46457  ;
46458  return 0;
46459}
46460_ACEOF
46461if ac_fn_cxx_try_compile "$LINENO"; then :
46462  # It does; now see whether it defined to BIG_ENDIAN or not.
46463	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46464/* end confdefs.h.  */
46465#include <sys/types.h>
46466		#include <sys/param.h>
46467
46468int
46469main ()
46470{
46471#if BYTE_ORDER != BIG_ENDIAN
46472		 not big endian
46473		#endif
46474
46475  ;
46476  return 0;
46477}
46478_ACEOF
46479if ac_fn_cxx_try_compile "$LINENO"; then :
46480  ac_cv_c_bigendian=yes
46481else
46482  ac_cv_c_bigendian=no
46483fi
46484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46485fi
46486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46487    fi
46488    if test $ac_cv_c_bigendian = unknown; then
46489      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46490      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46491/* end confdefs.h.  */
46492#include <limits.h>
46493
46494int
46495main ()
46496{
46497#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46498	      bogus endian macros
46499	     #endif
46500
46501  ;
46502  return 0;
46503}
46504_ACEOF
46505if ac_fn_cxx_try_compile "$LINENO"; then :
46506  # It does; now see whether it defined to _BIG_ENDIAN or not.
46507	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46508/* end confdefs.h.  */
46509#include <limits.h>
46510
46511int
46512main ()
46513{
46514#ifndef _BIG_ENDIAN
46515		 not big endian
46516		#endif
46517
46518  ;
46519  return 0;
46520}
46521_ACEOF
46522if ac_fn_cxx_try_compile "$LINENO"; then :
46523  ac_cv_c_bigendian=yes
46524else
46525  ac_cv_c_bigendian=no
46526fi
46527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46528fi
46529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46530    fi
46531    if test $ac_cv_c_bigendian = unknown; then
46532      # Compile a test program.
46533      if test "$cross_compiling" = yes; then :
46534  # Try to guess by grepping values from an object file.
46535	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46536/* end confdefs.h.  */
46537short int ascii_mm[] =
46538		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46539		short int ascii_ii[] =
46540		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46541		int use_ascii (int i) {
46542		  return ascii_mm[i] + ascii_ii[i];
46543		}
46544		short int ebcdic_ii[] =
46545		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46546		short int ebcdic_mm[] =
46547		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46548		int use_ebcdic (int i) {
46549		  return ebcdic_mm[i] + ebcdic_ii[i];
46550		}
46551		extern int foo;
46552
46553int
46554main ()
46555{
46556return use_ascii (foo) == use_ebcdic (foo);
46557  ;
46558  return 0;
46559}
46560_ACEOF
46561if ac_fn_cxx_try_compile "$LINENO"; then :
46562  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46563	      ac_cv_c_bigendian=yes
46564	    fi
46565	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46566	      if test "$ac_cv_c_bigendian" = unknown; then
46567		ac_cv_c_bigendian=no
46568	      else
46569		# finding both strings is unlikely to happen, but who knows?
46570		ac_cv_c_bigendian=unknown
46571	      fi
46572	    fi
46573fi
46574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46575else
46576  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46577/* end confdefs.h.  */
46578$ac_includes_default
46579int
46580main ()
46581{
46582
46583	     /* Are we little or big endian?  From Harbison&Steele.  */
46584	     union
46585	     {
46586	       long int l;
46587	       char c[sizeof (long int)];
46588	     } u;
46589	     u.l = 1;
46590	     return u.c[sizeof (long int) - 1] == 1;
46591
46592  ;
46593  return 0;
46594}
46595_ACEOF
46596if ac_fn_cxx_try_run "$LINENO"; then :
46597  ac_cv_c_bigendian=no
46598else
46599  ac_cv_c_bigendian=yes
46600fi
46601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46602  conftest.$ac_objext conftest.beam conftest.$ac_ext
46603fi
46604
46605    fi
46606fi
46607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46608$as_echo "$ac_cv_c_bigendian" >&6; }
46609 case $ac_cv_c_bigendian in #(
46610   yes)
46611     ENDIAN="big";; #(
46612   no)
46613     ENDIAN="little" ;; #(
46614   universal)
46615     ENDIAN="universal_endianness"
46616     ;; #(
46617   *)
46618     ENDIAN="unknown" ;;
46619 esac
46620
46621
46622  if test "x$ENDIAN" = xuniversal_endianness; then
46623    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46624  fi
46625  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46626    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
46627  fi
46628
46629
46630# Configure flags for the tools
46631
46632  ###############################################################################
46633  #
46634  # How to compile shared libraries.
46635  #
46636
46637  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46638    PICFLAG="-fPIC"
46639    C_FLAG_REORDER=''
46640    CXX_FLAG_REORDER=''
46641
46642    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46643      # Linking is different on MacOSX
46644      if test "x$STATIC_BUILD" = xtrue; then
46645        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46646      else
46647        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46648      fi
46649      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46650      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46651      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46652      SET_SHARED_LIBRARY_MAPFILE=''
46653    else
46654      # Default works for linux, might work on other platforms as well.
46655      SHARED_LIBRARY_FLAGS='-shared'
46656      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46657      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46658      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46659      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46660    fi
46661  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46662    PICFLAG=''
46663    C_FLAG_REORDER=''
46664    CXX_FLAG_REORDER=''
46665
46666    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46667      # Linking is different on MacOSX
46668      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46669      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46670      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46671      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46672      SET_SHARED_LIBRARY_MAPFILE=''
46673    else
46674      # Default works for linux, might work on other platforms as well.
46675      SHARED_LIBRARY_FLAGS='-shared'
46676      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46677      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46678      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46679      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46680    fi
46681  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46682    PICFLAG="-KPIC"
46683    C_FLAG_REORDER='-xF'
46684    CXX_FLAG_REORDER='-xF'
46685    SHARED_LIBRARY_FLAGS="-G"
46686    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46687    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46688    SET_SHARED_LIBRARY_NAME=''
46689    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46690  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46691    PICFLAG="-qpic=large"
46692    C_FLAG_REORDER=''
46693    CXX_FLAG_REORDER=''
46694    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46695    SET_EXECUTABLE_ORIGIN=""
46696    SET_SHARED_LIBRARY_ORIGIN=''
46697    SET_SHARED_LIBRARY_NAME=''
46698    SET_SHARED_LIBRARY_MAPFILE=''
46699  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46700    PICFLAG=""
46701    C_FLAG_REORDER=''
46702    CXX_FLAG_REORDER=''
46703    SHARED_LIBRARY_FLAGS="-LD"
46704    SET_EXECUTABLE_ORIGIN=''
46705    SET_SHARED_LIBRARY_ORIGIN=''
46706    SET_SHARED_LIBRARY_NAME=''
46707    SET_SHARED_LIBRARY_MAPFILE=''
46708  fi
46709
46710
46711
46712
46713
46714
46715
46716
46717  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46718    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46719    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46720    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46721  fi
46722  # The (cross) compiler is now configured, we can now test capabilities
46723  # of the target platform.
46724
46725
46726
46727  ###############################################################################
46728  #
46729  # Setup the opt flags for different compilers
46730  # and different operating systems.
46731  #
46732
46733  # FIXME: this was indirectly the old default, but just inherited.
46734  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46735  #   C_FLAG_DEPS="-MMD -MF"
46736  # fi
46737
46738  # Generate make dependency files
46739  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46740    C_FLAG_DEPS="-MMD -MF"
46741  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46742    C_FLAG_DEPS="-MMD -MF"
46743  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46744    C_FLAG_DEPS="-xMMD -xMF"
46745  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46746    C_FLAG_DEPS="-qmakedep=gcc -MF"
46747  fi
46748  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46749
46750
46751
46752  # Debug symbols
46753  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46754    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46755      # reduce from default "-g2" option to save space
46756      CFLAGS_DEBUG_SYMBOLS="-g1"
46757      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46758    else
46759      CFLAGS_DEBUG_SYMBOLS="-g"
46760      CXXFLAGS_DEBUG_SYMBOLS="-g"
46761    fi
46762  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46763    CFLAGS_DEBUG_SYMBOLS="-g"
46764    CXXFLAGS_DEBUG_SYMBOLS="-g"
46765  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46766    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46767    # FIXME: likely a bug, this disables debug symbols rather than enables them
46768    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46769  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46770    CFLAGS_DEBUG_SYMBOLS="-g"
46771    CXXFLAGS_DEBUG_SYMBOLS="-g"
46772  fi
46773
46774
46775
46776  # bounds, memory and behavior checking options
46777  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46778    case $DEBUG_LEVEL in
46779    release )
46780      # no adjustment
46781      ;;
46782    fastdebug )
46783      # no adjustment
46784      ;;
46785    slowdebug )
46786      # Add runtime stack smashing and undefined behavior checks.
46787      # Not all versions of gcc support -fstack-protector
46788      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46789
46790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46791$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46792  supports=yes
46793
46794  saved_cflags="$CFLAGS"
46795  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46796  ac_ext=c
46797ac_cpp='$CPP $CPPFLAGS'
46798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46800ac_compiler_gnu=$ac_cv_c_compiler_gnu
46801
46802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46803/* end confdefs.h.  */
46804int i;
46805_ACEOF
46806if ac_fn_c_try_compile "$LINENO"; then :
46807
46808else
46809  supports=no
46810fi
46811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46812  ac_ext=cpp
46813ac_cpp='$CXXCPP $CPPFLAGS'
46814ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46815ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46816ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46817
46818  CFLAGS="$saved_cflags"
46819
46820  saved_cxxflags="$CXXFLAGS"
46821  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46822  ac_ext=cpp
46823ac_cpp='$CXXCPP $CPPFLAGS'
46824ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46825ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46826ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46827
46828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46829/* end confdefs.h.  */
46830int i;
46831_ACEOF
46832if ac_fn_cxx_try_compile "$LINENO"; then :
46833
46834else
46835  supports=no
46836fi
46837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46838  ac_ext=cpp
46839ac_cpp='$CXXCPP $CPPFLAGS'
46840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46843
46844  CXXFLAGS="$saved_cxxflags"
46845
46846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46847$as_echo "$supports" >&6; }
46848  if test "x$supports" = "xyes" ; then
46849    :
46850  else
46851    STACK_PROTECTOR_CFLAG=""
46852  fi
46853
46854
46855      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46856      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46857      ;;
46858    esac
46859  fi
46860
46861  # Optimization levels
46862  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46863    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46864
46865    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46866      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46867      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46868      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46869      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46870      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46871      C_O_FLAG_NONE="-xregs=no%frameptr"
46872      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46873      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46874      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46875      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46876      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46877      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46878        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46879        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46880      fi
46881    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46882      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46883      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46884      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46885      C_O_FLAG_DEBUG=""
46886      C_O_FLAG_NONE=""
46887      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46888      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46889      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46890      C_O_FLAG_DEBUG=""
46891      CXX_O_FLAG_NONE=""
46892    fi
46893  else
46894    # The remaining toolchains share opt flags between CC and CXX;
46895    # setup for C and duplicate afterwards.
46896    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46897      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46898        # On MacOSX we optimize for size, something
46899        # we should do for all platforms?
46900        C_O_FLAG_HIGHEST="-Os"
46901        C_O_FLAG_HI="-Os"
46902        C_O_FLAG_NORM="-Os"
46903      else
46904        C_O_FLAG_HIGHEST="-O3"
46905        C_O_FLAG_HI="-O3"
46906        C_O_FLAG_NORM="-O2"
46907      fi
46908      C_O_FLAG_DEBUG="-O0"
46909      C_O_FLAG_NONE="-O0"
46910    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46911      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46912        # On MacOSX we optimize for size, something
46913        # we should do for all platforms?
46914        C_O_FLAG_HIGHEST="-Os"
46915        C_O_FLAG_HI="-Os"
46916        C_O_FLAG_NORM="-Os"
46917      else
46918        C_O_FLAG_HIGHEST="-O3"
46919        C_O_FLAG_HI="-O3"
46920        C_O_FLAG_NORM="-O2"
46921      fi
46922      C_O_FLAG_DEBUG="-O0"
46923      C_O_FLAG_NONE="-O0"
46924    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46925      C_O_FLAG_HIGHEST="-O3"
46926      C_O_FLAG_HI="-O3 -qstrict"
46927      C_O_FLAG_NORM="-O2"
46928      C_O_FLAG_DEBUG="-qnoopt"
46929      C_O_FLAG_NONE="-qnoop"
46930    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46931      C_O_FLAG_HIGHEST="-O2"
46932      C_O_FLAG_HI="-O1"
46933      C_O_FLAG_NORM="-O1"
46934      C_O_FLAG_DEBUG="-Od"
46935      C_O_FLAG_NONE="-Od"
46936    fi
46937    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46938    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46939    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46940    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46941    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46942  fi
46943
46944  # Adjust optimization flags according to debug level.
46945  case $DEBUG_LEVEL in
46946    release )
46947      # no adjustment
46948      ;;
46949    fastdebug )
46950      # Not quite so much optimization
46951      C_O_FLAG_HI="$C_O_FLAG_NORM"
46952      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46953      ;;
46954    slowdebug )
46955      # Disable optimization
46956      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46957      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46958      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46959      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46960      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46961      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46962      ;;
46963  esac
46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977  # Special extras...
46978  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46979    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46980      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46981      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46982    fi
46983    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46984    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46985  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46986    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46987    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46988  fi
46989
46990  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46991  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46992  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46993
46994  ###############################################################################
46995  #
46996  # Now setup the CFLAGS and LDFLAGS for the JDK build.
46997  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46998  #
46999
47000  # Setup compiler/platform specific flags into
47001  #    CFLAGS_JDK    - C Compiler flags
47002  #    CXXFLAGS_JDK  - C++ Compiler flags
47003  #    COMMON_CCXXFLAGS_JDK - common to C and C++
47004  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47005    if test "x$OPENJDK_TARGET_CPU" = xx86; then
47006      # Force compatibility with i586 on 32 bit intel platforms.
47007      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
47008    fi
47009    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47010        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47011    case $OPENJDK_TARGET_CPU_ARCH in
47012      arm )
47013        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47014        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47015        ;;
47016      ppc )
47017        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47018        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47019        ;;
47020      * )
47021        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47022        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47023        ;;
47024    esac
47025  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47026    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
47027    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
47028      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
47029    fi
47030
47031    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
47032    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
47033  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47034    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47035    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47036  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47037    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
47038        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
47039        -DWIN32_LEAN_AND_MEAN \
47040        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
47041        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
47042        -DWIN32 -DIAL"
47043    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
47044      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
47045    else
47046      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
47047    fi
47048    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
47049    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
47050    # studio.
47051    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
47052      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47053          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
47054    fi
47055  fi
47056
47057  ###############################################################################
47058
47059  # Adjust flags according to debug level.
47060  case $DEBUG_LEVEL in
47061    fastdebug | slowdebug )
47062      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
47063      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
47064      JAVAC_FLAGS="$JAVAC_FLAGS -g"
47065      ;;
47066    release )
47067      ;;
47068    * )
47069      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47070      ;;
47071  esac
47072
47073  # Setup LP64
47074  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
47075
47076  # Set some common defines. These works for all compilers, but assume
47077  # -D is universally accepted.
47078
47079  # Setup endianness
47080  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
47081    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
47082    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
47083    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
47084    #   Note: -Dmacro         is the same as    #define macro 1
47085    #         -Dmacro=        is the same as    #define macro
47086    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47087      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
47088    else
47089      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
47090    fi
47091  else
47092    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
47093    # are defined in the system?
47094    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47095      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
47096    else
47097      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
47098    fi
47099  fi
47100
47101  # Setup target OS define. Use OS target name but in upper case.
47102  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
47103  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
47104
47105  # Setup target CPU
47106  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
47107
47108  # Setup debug/release defines
47109  if test "x$DEBUG_LEVEL" = xrelease; then
47110    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
47111    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47112      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
47113    fi
47114  else
47115    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
47116  fi
47117
47118  # Set some additional per-OS defines.
47119  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47120    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
47121  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47122    # FIXME: PPC64 should not be here.
47123    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
47124  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
47125    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
47126  fi
47127
47128  # Additional macosx handling
47129  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47130    # Setting these parameters makes it an error to link to macosx APIs that are
47131    # newer than the given OS version and makes the linked binaries compatible
47132    # even if built on a newer version of the OS.
47133    # The expected format is X.Y.Z
47134    MACOSX_VERSION_MIN=10.7.0
47135
47136
47137    # The macro takes the version with no dots, ex: 1070
47138    # Let the flags variables get resolved in make for easier override on make
47139    # command line.
47140    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47141    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47142  fi
47143
47144  # Setup some hard coded includes
47145  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47146      -I${JDK_TOPDIR}/src/java.base/share/native/include \
47147      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
47148      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
47149      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
47150      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
47151
47152  # The shared libraries are compiled using the picflag.
47153  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47154  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47155
47156  # Executable flags
47157  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47158  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47159
47160
47161
47162
47163
47164
47165  # Flags for compiling test libraries
47166  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47167  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47168
47169  # Flags for compiling test executables
47170  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47171  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47172
47173
47174
47175
47176
47177
47178  # Setup LDFLAGS et al.
47179  #
47180
47181  # Now this is odd. The JDK native libraries have to link against libjvm.so
47182  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
47183  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
47184  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
47185  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
47186  # libraries will link to whatever is in memory. Yuck.
47187  #
47188  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
47189  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47190    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
47191    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47192      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
47193    fi
47194    # TODO: make -debug optional "--disable-full-debug-symbols"
47195    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
47196  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
47197    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47198    # We have previously set HAS_GNU_HASH if this is the case
47199    if test -n "$HAS_GNU_HASH"; then
47200      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
47201    fi
47202    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47203      # And since we now know that the linker is gnu, then add -z defs, to forbid
47204      # undefined symbols in object files.
47205      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
47206      case $DEBUG_LEVEL in
47207        release )
47208          # tell linker to optimize libraries.
47209          # Should this be supplied to the OSS linker as well?
47210          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
47211          ;;
47212        slowdebug )
47213          if test "x$HAS_LINKER_NOW" = "xtrue"; then
47214            # do relocations at load
47215            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
47216            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
47217          fi
47218          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47219            # mark relocations read only
47220            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47221            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47222          fi
47223          ;;
47224        fastdebug )
47225          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47226            # mark relocations read only
47227            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47228            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47229          fi
47230          ;;
47231        * )
47232          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47233          ;;
47234        esac
47235    fi
47236  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47237    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
47238    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
47239  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47240    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
47241  fi
47242
47243  # Customize LDFLAGS for executables
47244
47245  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
47246
47247  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47248    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
47249      LDFLAGS_STACK_SIZE=1048576
47250    else
47251      LDFLAGS_STACK_SIZE=327680
47252    fi
47253    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
47254  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
47255    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
47256  fi
47257
47258  # Customize LDFLAGS for libs
47259  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
47260
47261  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47262    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
47263    JDKLIB_LIBS=""
47264  else
47265    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
47266        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
47267
47268    # On some platforms (mac) the linker warns about non existing -L dirs.
47269    # Add server first if available. Linking aginst client does not always produce the same results.
47270    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
47271    # Default to server for other variants.
47272    if test "x$JVM_VARIANT_SERVER" = xtrue; then
47273      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47274    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
47275      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
47276    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
47277      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
47278    else
47279      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47280    fi
47281
47282    JDKLIB_LIBS="-ljava -ljvm"
47283    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47284      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
47285    fi
47286  fi
47287
47288
47289
47290
47291
47292
47293
47294  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
47295  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
47296
47297
47298
47299
47300
47301  # Some Zero and Shark settings.
47302  # ZERO_ARCHFLAG tells the compiler which mode to build for
47303  case "${OPENJDK_TARGET_CPU}" in
47304    s390)
47305      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
47306      ;;
47307    *)
47308      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47309  esac
47310
47311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
47312$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
47313  supports=yes
47314
47315  saved_cflags="$CFLAGS"
47316  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
47317  ac_ext=c
47318ac_cpp='$CPP $CPPFLAGS'
47319ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47320ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47321ac_compiler_gnu=$ac_cv_c_compiler_gnu
47322
47323  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47324/* end confdefs.h.  */
47325int i;
47326_ACEOF
47327if ac_fn_c_try_compile "$LINENO"; then :
47328
47329else
47330  supports=no
47331fi
47332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47333  ac_ext=cpp
47334ac_cpp='$CXXCPP $CPPFLAGS'
47335ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47336ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47337ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47338
47339  CFLAGS="$saved_cflags"
47340
47341  saved_cxxflags="$CXXFLAGS"
47342  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
47343  ac_ext=cpp
47344ac_cpp='$CXXCPP $CPPFLAGS'
47345ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47346ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47347ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47348
47349  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47350/* end confdefs.h.  */
47351int i;
47352_ACEOF
47353if ac_fn_cxx_try_compile "$LINENO"; then :
47354
47355else
47356  supports=no
47357fi
47358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47359  ac_ext=cpp
47360ac_cpp='$CXXCPP $CPPFLAGS'
47361ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47362ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47363ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47364
47365  CXXFLAGS="$saved_cxxflags"
47366
47367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47368$as_echo "$supports" >&6; }
47369  if test "x$supports" = "xyes" ; then
47370    :
47371  else
47372    ZERO_ARCHFLAG=""
47373  fi
47374
47375
47376
47377  # Check that the compiler supports -mX (or -qX on AIX) flags
47378  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47379
47380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47381$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47382  supports=yes
47383
47384  saved_cflags="$CFLAGS"
47385  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47386  ac_ext=c
47387ac_cpp='$CPP $CPPFLAGS'
47388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47390ac_compiler_gnu=$ac_cv_c_compiler_gnu
47391
47392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47393/* end confdefs.h.  */
47394int i;
47395_ACEOF
47396if ac_fn_c_try_compile "$LINENO"; then :
47397
47398else
47399  supports=no
47400fi
47401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47402  ac_ext=cpp
47403ac_cpp='$CXXCPP $CPPFLAGS'
47404ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47405ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47406ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47407
47408  CFLAGS="$saved_cflags"
47409
47410  saved_cxxflags="$CXXFLAGS"
47411  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47412  ac_ext=cpp
47413ac_cpp='$CXXCPP $CPPFLAGS'
47414ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47415ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47416ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47417
47418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47419/* end confdefs.h.  */
47420int i;
47421_ACEOF
47422if ac_fn_cxx_try_compile "$LINENO"; then :
47423
47424else
47425  supports=no
47426fi
47427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47428  ac_ext=cpp
47429ac_cpp='$CXXCPP $CPPFLAGS'
47430ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47431ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47432ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47433
47434  CXXFLAGS="$saved_cxxflags"
47435
47436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47437$as_echo "$supports" >&6; }
47438  if test "x$supports" = "xyes" ; then
47439    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47440  else
47441    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47442  fi
47443
47444
47445
47446  # Check whether --enable-warnings-as-errors was given.
47447if test "${enable_warnings_as_errors+set}" = set; then :
47448  enableval=$enable_warnings_as_errors;
47449fi
47450
47451
47452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47453$as_echo_n "checking if native warnings are errors... " >&6; }
47454  if test "x$enable_warnings_as_errors" = "xyes"; then
47455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47456$as_echo "yes (explicitely set)" >&6; }
47457    WARNINGS_AS_ERRORS=true
47458  elif test "x$enable_warnings_as_errors" = "xno"; then
47459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47460$as_echo "no" >&6; }
47461    WARNINGS_AS_ERRORS=false
47462  elif test "x$enable_warnings_as_errors" = "x"; then
47463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47464$as_echo "yes (default)" >&6; }
47465    WARNINGS_AS_ERRORS=true
47466  else
47467    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47468  fi
47469
47470  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47471    # Set legacy hotspot variable
47472    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47473  else
47474    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47475  fi
47476
47477
47478
47479
47480  case "${TOOLCHAIN_TYPE}" in
47481    microsoft)
47482      DISABLE_WARNING_PREFIX="-wd"
47483      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47484      ;;
47485    solstudio)
47486      DISABLE_WARNING_PREFIX="-erroff="
47487      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47488      ;;
47489    gcc)
47490      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47491
47492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47493$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47494  supports=yes
47495
47496  saved_cflags="$CFLAGS"
47497  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47498  ac_ext=c
47499ac_cpp='$CPP $CPPFLAGS'
47500ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47501ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47502ac_compiler_gnu=$ac_cv_c_compiler_gnu
47503
47504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47505/* end confdefs.h.  */
47506int i;
47507_ACEOF
47508if ac_fn_c_try_compile "$LINENO"; then :
47509
47510else
47511  supports=no
47512fi
47513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47514  ac_ext=cpp
47515ac_cpp='$CXXCPP $CPPFLAGS'
47516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47519
47520  CFLAGS="$saved_cflags"
47521
47522  saved_cxxflags="$CXXFLAGS"
47523  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47524  ac_ext=cpp
47525ac_cpp='$CXXCPP $CPPFLAGS'
47526ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47527ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47528ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47529
47530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47531/* end confdefs.h.  */
47532int i;
47533_ACEOF
47534if ac_fn_cxx_try_compile "$LINENO"; then :
47535
47536else
47537  supports=no
47538fi
47539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47540  ac_ext=cpp
47541ac_cpp='$CXXCPP $CPPFLAGS'
47542ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47543ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47544ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47545
47546  CXXFLAGS="$saved_cxxflags"
47547
47548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47549$as_echo "$supports" >&6; }
47550  if test "x$supports" = "xyes" ; then
47551    GCC_CAN_DISABLE_WARNINGS=true
47552  else
47553    GCC_CAN_DISABLE_WARNINGS=false
47554
47555  fi
47556
47557      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47558        DISABLE_WARNING_PREFIX="-Wno-"
47559      else
47560        DISABLE_WARNING_PREFIX=
47561      fi
47562      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47563      # Repeate the check for the BUILD_CC
47564      CC_OLD="$CC"
47565      CC="$BUILD_CC"
47566
47567  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47568$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47569  supports=yes
47570
47571  saved_cflags="$CFLAGS"
47572  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47573  ac_ext=c
47574ac_cpp='$CPP $CPPFLAGS'
47575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47577ac_compiler_gnu=$ac_cv_c_compiler_gnu
47578
47579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47580/* end confdefs.h.  */
47581int i;
47582_ACEOF
47583if ac_fn_c_try_compile "$LINENO"; then :
47584
47585else
47586  supports=no
47587fi
47588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47589  ac_ext=cpp
47590ac_cpp='$CXXCPP $CPPFLAGS'
47591ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47592ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47593ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47594
47595  CFLAGS="$saved_cflags"
47596
47597  saved_cxxflags="$CXXFLAGS"
47598  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47599  ac_ext=cpp
47600ac_cpp='$CXXCPP $CPPFLAGS'
47601ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47602ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47603ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47604
47605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47606/* end confdefs.h.  */
47607int i;
47608_ACEOF
47609if ac_fn_cxx_try_compile "$LINENO"; then :
47610
47611else
47612  supports=no
47613fi
47614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47615  ac_ext=cpp
47616ac_cpp='$CXXCPP $CPPFLAGS'
47617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47620
47621  CXXFLAGS="$saved_cxxflags"
47622
47623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47624$as_echo "$supports" >&6; }
47625  if test "x$supports" = "xyes" ; then
47626    BUILD_CC_CAN_DISABLE_WARNINGS=true
47627  else
47628    BUILD_CC_CAN_DISABLE_WARNINGS=false
47629
47630  fi
47631
47632      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47633        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47634      else
47635        BUILD_CC_DISABLE_WARNING_PREFIX=
47636      fi
47637      CC="$CC_OLD"
47638      ;;
47639    clang)
47640      DISABLE_WARNING_PREFIX="-Wno-"
47641      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47642      ;;
47643  esac
47644
47645
47646
47647
47648# Setup debug symbols (need objcopy from the toolchain for that)
47649
47650  #
47651  # NATIVE_DEBUG_SYMBOLS
47652  # This must be done after the toolchain is setup, since we're looking at objcopy.
47653  #
47654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
47655$as_echo_n "checking what type of native debug symbols to use... " >&6; }
47656
47657# Check whether --with-native-debug-symbols was given.
47658if test "${with_native_debug_symbols+set}" = set; then :
47659  withval=$with_native_debug_symbols;
47660else
47661  with_native_debug_symbols="zipped"
47662fi
47663
47664  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
47665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
47666$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
47667
47668  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
47669
47670    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47671      if test "x$OBJCOPY" = x; then
47672        # enabling of enable-debug-symbols and can't find objcopy
47673        # this is an error
47674        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47675      fi
47676    fi
47677
47678    ENABLE_DEBUG_SYMBOLS=true
47679    ZIP_DEBUGINFO_FILES=true
47680    DEBUG_BINARIES=true
47681    STRIP_POLICY=min_strip
47682  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
47683    ENABLE_DEBUG_SYMBOLS=false
47684    ZIP_DEBUGINFO_FILES=false
47685    DEBUG_BINARIES=false
47686    STRIP_POLICY=no_strip
47687  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
47688    ENABLE_DEBUG_SYMBOLS=false  # -g option only
47689    ZIP_DEBUGINFO_FILES=false
47690    DEBUG_BINARIES=true
47691    STRIP_POLICY=no_strip
47692    STRIP=""
47693  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
47694
47695    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
47696      if test "x$OBJCOPY" = x; then
47697        # enabling of enable-debug-symbols and can't find objcopy
47698        # this is an error
47699        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
47700      fi
47701    fi
47702
47703    ENABLE_DEBUG_SYMBOLS=true
47704    ZIP_DEBUGINFO_FILES=false
47705    DEBUG_BINARIES=true
47706    STRIP_POLICY=min_strip
47707  else
47708    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
47709  fi
47710
47711  # --enable-debug-symbols is deprecated.
47712  # Please use --with-native-debug-symbols=[internal,external,zipped] .
47713
47714  # Check whether --enable-debug-symbols was given.
47715if test "${enable_debug_symbols+set}" = set; then :
47716  enableval=$enable_debug_symbols;
47717fi
47718
47719  if test "x$enable_debug_symbols" != x; then
47720    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
47721$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
47722
47723    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
47724      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
47725$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
47726    fi
47727
47728  fi
47729
47730
47731  # --enable-zip-debug-info is deprecated.
47732  # Please use --with-native-debug-symbols=zipped .
47733
47734  # Check whether --enable-zip-debug-info was given.
47735if test "${enable_zip_debug_info+set}" = set; then :
47736  enableval=$enable_zip_debug_info;
47737fi
47738
47739  if test "x$enable_zip_debug_info" != x; then
47740    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
47741$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
47742
47743    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
47744      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
47745$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
47746    fi
47747
47748  fi
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758  # Check whether --enable-native-coverage was given.
47759if test "${enable_native_coverage+set}" = set; then :
47760  enableval=$enable_native_coverage;
47761fi
47762
47763  GCOV_ENABLED="false"
47764  if test "x$enable_native_coverage" = "xyes"; then
47765    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47766      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47767$as_echo_n "checking if native coverage is enabled... " >&6; }
47768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47769$as_echo "yes" >&6; }
47770      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47771      GCOV_LDFLAGS="-fprofile-arcs"
47772      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47773      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47774      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47775      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47776      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47777      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47778      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47779      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47780      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47781      GCOV_ENABLED="true"
47782    else
47783      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47784    fi
47785  elif test "x$enable_native_coverage" = "xno"; then
47786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47787$as_echo_n "checking if native coverage is enabled... " >&6; }
47788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47789$as_echo "no" >&6; }
47790  elif test "x$enable_native_coverage" != "x"; then
47791    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47792  fi
47793
47794
47795
47796
47797###############################################################################
47798#
47799# Check dependencies for external and internal libraries.
47800#
47801###############################################################################
47802
47803# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47804
47805  # When using cygwin or msys, we need a wrapper binary that renames
47806  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47807  # @files and rewrites these too! This wrapper binary is
47808  # called fixpath.
47809  FIXPATH=
47810  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47812$as_echo_n "checking if fixpath can be created... " >&6; }
47813    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47814    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47815    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47816    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47817      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47818      FIXPATH="$FIXPATH_BIN -c"
47819    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47820      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47821      # @ was chosen as separator to minimize risk of other tools messing around with it
47822      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47823          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47824      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47825      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47826    fi
47827    FIXPATH_SRC_W="$FIXPATH_SRC"
47828    FIXPATH_BIN_W="$FIXPATH_BIN"
47829
47830  unix_path="$FIXPATH_SRC_W"
47831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47832    windows_path=`$CYGPATH -m "$unix_path"`
47833    FIXPATH_SRC_W="$windows_path"
47834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47835    windows_path=`cmd //c echo $unix_path`
47836    FIXPATH_SRC_W="$windows_path"
47837  fi
47838
47839
47840  unix_path="$FIXPATH_BIN_W"
47841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47842    windows_path=`$CYGPATH -m "$unix_path"`
47843    FIXPATH_BIN_W="$windows_path"
47844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47845    windows_path=`cmd //c echo $unix_path`
47846    FIXPATH_BIN_W="$windows_path"
47847  fi
47848
47849    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47850    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47851    cd $FIXPATH_DIR
47852    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47853    cd $CURDIR
47854
47855    if test ! -x $FIXPATH_BIN; then
47856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47857$as_echo "no" >&6; }
47858      cat $FIXPATH_DIR/fixpath1.log
47859      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47860    fi
47861    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47862$as_echo "yes" >&6; }
47863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47864$as_echo_n "checking if fixpath.exe works... " >&6; }
47865    cd $FIXPATH_DIR
47866    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47867        > $FIXPATH_DIR/fixpath2.log 2>&1
47868    cd $CURDIR
47869    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47870      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47871$as_echo "no" >&6; }
47872      cat $FIXPATH_DIR/fixpath2.log
47873      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47874    fi
47875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47876$as_echo "yes" >&6; }
47877
47878    FIXPATH_DETACH_FLAG="--detach"
47879  fi
47880
47881
47882
47883
47884
47885
47886  # Check if X11 is needed
47887  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47888    # No X11 support on windows or macosx
47889    NEEDS_LIB_X11=false
47890  else
47891    if test "x$SUPPORT_HEADFUL" = xno; then
47892      # No X11 support if building headless-only
47893      NEEDS_LIB_X11=false
47894    else
47895      # All other instances need X11
47896      NEEDS_LIB_X11=true
47897    fi
47898  fi
47899
47900  # Check if cups is needed
47901  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47902    # Windows have a separate print system
47903    NEEDS_LIB_CUPS=false
47904  else
47905    NEEDS_LIB_CUPS=true
47906  fi
47907
47908  # Check if freetype is needed
47909  if test "x$OPENJDK" = "xtrue"; then
47910    NEEDS_LIB_FREETYPE=true
47911  else
47912    NEEDS_LIB_FREETYPE=false
47913  fi
47914
47915  # Check if alsa is needed
47916  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47917    NEEDS_LIB_ALSA=true
47918  else
47919    NEEDS_LIB_ALSA=false
47920  fi
47921
47922  # Check if ffi is needed
47923  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47924    NEEDS_LIB_FFI=true
47925  else
47926    NEEDS_LIB_FFI=false
47927  fi
47928
47929
47930  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47931  # dynamic build is configured on command line.
47932
47933# Check whether --with-stdc++lib was given.
47934if test "${with_stdc__lib+set}" = set; then :
47935  withval=$with_stdc__lib;
47936        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47937                && test "x$with_stdc__lib" != xdefault; then
47938          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47939        fi
47940
47941else
47942  with_stdc__lib=default
47943
47944fi
47945
47946
47947  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47948    # Test if -lstdc++ works.
47949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47950$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47951    ac_ext=cpp
47952ac_cpp='$CXXCPP $CPPFLAGS'
47953ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47954ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47955ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47956
47957    OLD_CXXFLAGS="$CXXFLAGS"
47958    CXXFLAGS="$CXXFLAGS -lstdc++"
47959    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47960/* end confdefs.h.  */
47961
47962int
47963main ()
47964{
47965return 0;
47966  ;
47967  return 0;
47968}
47969_ACEOF
47970if ac_fn_cxx_try_link "$LINENO"; then :
47971  has_dynamic_libstdcxx=yes
47972else
47973  has_dynamic_libstdcxx=no
47974fi
47975rm -f core conftest.err conftest.$ac_objext \
47976    conftest$ac_exeext conftest.$ac_ext
47977    CXXFLAGS="$OLD_CXXFLAGS"
47978    ac_ext=cpp
47979ac_cpp='$CXXCPP $CPPFLAGS'
47980ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47981ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47982ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47983
47984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47985$as_echo "$has_dynamic_libstdcxx" >&6; }
47986
47987    # Test if stdc++ can be linked statically.
47988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47989$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47990    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47991    ac_ext=cpp
47992ac_cpp='$CXXCPP $CPPFLAGS'
47993ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47994ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47995ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47996
47997    OLD_LIBS="$LIBS"
47998    OLD_CXX="$CXX"
47999    LIBS="$STATIC_STDCXX_FLAGS"
48000    CXX="$CC"
48001    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48002/* end confdefs.h.  */
48003
48004int
48005main ()
48006{
48007return 0;
48008  ;
48009  return 0;
48010}
48011_ACEOF
48012if ac_fn_cxx_try_link "$LINENO"; then :
48013  has_static_libstdcxx=yes
48014else
48015  has_static_libstdcxx=no
48016fi
48017rm -f core conftest.err conftest.$ac_objext \
48018    conftest$ac_exeext conftest.$ac_ext
48019    LIBS="$OLD_LIBS"
48020    CXX="$OLD_CXX"
48021    ac_ext=cpp
48022ac_cpp='$CXXCPP $CPPFLAGS'
48023ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48024ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48025ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48026
48027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48028$as_echo "$has_static_libstdcxx" >&6; }
48029
48030    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48031      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48032    fi
48033
48034    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48035      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48036    fi
48037
48038    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48039      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48040    fi
48041
48042    # If dynamic was requested, it's available since it would fail above otherwise.
48043    # If dynamic wasn't requested, go with static unless it isn't available.
48044    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48045$as_echo_n "checking how to link with libstdc++... " >&6; }
48046    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48047      LIBCXX="$LIBCXX -lstdc++"
48048      LDCXX="$CXX"
48049      STATIC_CXX_SETTING="STATIC_CXX=false"
48050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48051$as_echo "dynamic" >&6; }
48052    else
48053      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48054      LDCXX="$CC"
48055      STATIC_CXX_SETTING="STATIC_CXX=true"
48056      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48057$as_echo "static" >&6; }
48058    fi
48059  fi
48060
48061
48062  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48063  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48064    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48065  fi
48066
48067  # TODO better (platform agnostic) test
48068  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48069    LIBCXX="-lstdc++"
48070  fi
48071
48072
48073  # Setup Windows runtime dlls
48074  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48075
48076
48077# Check whether --with-msvcr-dll was given.
48078if test "${with_msvcr_dll+set}" = set; then :
48079  withval=$with_msvcr_dll;
48080fi
48081
48082
48083  if test "x$with_msvcr_dll" != x; then
48084    # If given explicitely by user, do not probe. If not present, fail directly.
48085
48086  DLL_NAME="$MSVCR_NAME"
48087  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
48088  METHOD="--with-msvcr-dll"
48089  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48090    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48091$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48092
48093    # Need to check if the found msvcr is correct architecture
48094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48095$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48096    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48097    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48098      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48099      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48100      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48101        CORRECT_MSVCR_ARCH="PE32 executable"
48102      else
48103        CORRECT_MSVCR_ARCH="PE32+ executable"
48104      fi
48105    else
48106      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48107        CORRECT_MSVCR_ARCH=386
48108      else
48109        CORRECT_MSVCR_ARCH=x86-64
48110      fi
48111    fi
48112    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48114$as_echo "ok" >&6; }
48115      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48116
48117  # Only process if variable expands to non-empty
48118
48119  if test "x$MSVC_DLL" != x; then
48120    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48121
48122  # Input might be given as Windows format, start by converting to
48123  # unix format.
48124  path="$MSVC_DLL"
48125  new_path=`$CYGPATH -u "$path"`
48126
48127  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48128  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48129  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48130  # "foo.exe" is OK but "foo" is an error.
48131  #
48132  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48133  # It is also a way to make sure we got the proper file name for the real test later on.
48134  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48135  if test "x$test_shortpath" = x; then
48136    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48137$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48138    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48139  fi
48140
48141  # Call helper function which possibly converts this using DOS-style short mode.
48142  # If so, the updated path is stored in $new_path.
48143
48144  input_path="$new_path"
48145  # Check if we need to convert this using DOS-style short mode. If the path
48146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48147  # take no chances and rewrite it.
48148  # Note: m4 eats our [], so we need to use [ and ] instead.
48149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48150  if test "x$has_forbidden_chars" != x; then
48151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48155      # Going to short mode and back again did indeed matter. Since short mode is
48156      # case insensitive, let's make it lowercase to improve readability.
48157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48158      # Now convert it back to Unix-style (cygpath)
48159      input_path=`$CYGPATH -u "$shortmode_path"`
48160      new_path="$input_path"
48161    fi
48162  fi
48163
48164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48165  if test "x$test_cygdrive_prefix" = x; then
48166    # As a simple fix, exclude /usr/bin since it's not a real path.
48167    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48169      # a path prefixed by /cygdrive for fixpath to work.
48170      new_path="$CYGWIN_ROOT_PATH$input_path"
48171    fi
48172  fi
48173
48174
48175  if test "x$path" != "x$new_path"; then
48176    MSVC_DLL="$new_path"
48177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48178$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48179  fi
48180
48181    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48182
48183  path="$MSVC_DLL"
48184  has_colon=`$ECHO $path | $GREP ^.:`
48185  new_path="$path"
48186  if test "x$has_colon" = x; then
48187    # Not in mixed or Windows style, start by that.
48188    new_path=`cmd //c echo $path`
48189  fi
48190
48191
48192  input_path="$new_path"
48193  # Check if we need to convert this using DOS-style short mode. If the path
48194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48195  # take no chances and rewrite it.
48196  # Note: m4 eats our [], so we need to use [ and ] instead.
48197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48198  if test "x$has_forbidden_chars" != x; then
48199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48201  fi
48202
48203
48204  windows_path="$new_path"
48205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48206    unix_path=`$CYGPATH -u "$windows_path"`
48207    new_path="$unix_path"
48208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48210    new_path="$unix_path"
48211  fi
48212
48213  if test "x$path" != "x$new_path"; then
48214    MSVC_DLL="$new_path"
48215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48216$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48217  fi
48218
48219  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48220  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48221
48222    else
48223      # We're on a unix platform. Hooray! :)
48224      path="$MSVC_DLL"
48225      has_space=`$ECHO "$path" | $GREP " "`
48226      if test "x$has_space" != x; then
48227        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48228$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48229        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48230      fi
48231
48232      # Use eval to expand a potential ~
48233      eval path="$path"
48234      if test ! -f "$path" && test ! -d "$path"; then
48235        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48236      fi
48237
48238      if test -d "$path"; then
48239        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48240      else
48241        dir="`$DIRNAME "$path"`"
48242        base="`$BASENAME "$path"`"
48243        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48244      fi
48245    fi
48246  fi
48247
48248      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48249$as_echo_n "checking for $DLL_NAME... " >&6; }
48250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48251$as_echo "$MSVC_DLL" >&6; }
48252    else
48253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48254$as_echo "incorrect, ignoring" >&6; }
48255      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48256$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48257    fi
48258  fi
48259
48260    if test "x$MSVC_DLL" = x; then
48261      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48262    fi
48263    MSVCR_DLL="$MSVC_DLL"
48264  elif test "x$DEVKIT_MSVCR_DLL" != x; then
48265
48266  DLL_NAME="$MSVCR_NAME"
48267  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48268  METHOD="devkit"
48269  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48270    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48271$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48272
48273    # Need to check if the found msvcr is correct architecture
48274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48275$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48276    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48277    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48278      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48279      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48280      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48281        CORRECT_MSVCR_ARCH="PE32 executable"
48282      else
48283        CORRECT_MSVCR_ARCH="PE32+ executable"
48284      fi
48285    else
48286      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48287        CORRECT_MSVCR_ARCH=386
48288      else
48289        CORRECT_MSVCR_ARCH=x86-64
48290      fi
48291    fi
48292    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48293      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48294$as_echo "ok" >&6; }
48295      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48296
48297  # Only process if variable expands to non-empty
48298
48299  if test "x$MSVC_DLL" != x; then
48300    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48301
48302  # Input might be given as Windows format, start by converting to
48303  # unix format.
48304  path="$MSVC_DLL"
48305  new_path=`$CYGPATH -u "$path"`
48306
48307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48310  # "foo.exe" is OK but "foo" is an error.
48311  #
48312  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48313  # It is also a way to make sure we got the proper file name for the real test later on.
48314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48315  if test "x$test_shortpath" = x; then
48316    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48317$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48318    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48319  fi
48320
48321  # Call helper function which possibly converts this using DOS-style short mode.
48322  # If so, the updated path is stored in $new_path.
48323
48324  input_path="$new_path"
48325  # Check if we need to convert this using DOS-style short mode. If the path
48326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48327  # take no chances and rewrite it.
48328  # Note: m4 eats our [], so we need to use [ and ] instead.
48329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48330  if test "x$has_forbidden_chars" != x; then
48331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48335      # Going to short mode and back again did indeed matter. Since short mode is
48336      # case insensitive, let's make it lowercase to improve readability.
48337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48338      # Now convert it back to Unix-style (cygpath)
48339      input_path=`$CYGPATH -u "$shortmode_path"`
48340      new_path="$input_path"
48341    fi
48342  fi
48343
48344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48345  if test "x$test_cygdrive_prefix" = x; then
48346    # As a simple fix, exclude /usr/bin since it's not a real path.
48347    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48349      # a path prefixed by /cygdrive for fixpath to work.
48350      new_path="$CYGWIN_ROOT_PATH$input_path"
48351    fi
48352  fi
48353
48354
48355  if test "x$path" != "x$new_path"; then
48356    MSVC_DLL="$new_path"
48357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48358$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48359  fi
48360
48361    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48362
48363  path="$MSVC_DLL"
48364  has_colon=`$ECHO $path | $GREP ^.:`
48365  new_path="$path"
48366  if test "x$has_colon" = x; then
48367    # Not in mixed or Windows style, start by that.
48368    new_path=`cmd //c echo $path`
48369  fi
48370
48371
48372  input_path="$new_path"
48373  # Check if we need to convert this using DOS-style short mode. If the path
48374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48375  # take no chances and rewrite it.
48376  # Note: m4 eats our [], so we need to use [ and ] instead.
48377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48378  if test "x$has_forbidden_chars" != x; then
48379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48380    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48381  fi
48382
48383
48384  windows_path="$new_path"
48385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48386    unix_path=`$CYGPATH -u "$windows_path"`
48387    new_path="$unix_path"
48388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48390    new_path="$unix_path"
48391  fi
48392
48393  if test "x$path" != "x$new_path"; then
48394    MSVC_DLL="$new_path"
48395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48396$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48397  fi
48398
48399  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48400  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48401
48402    else
48403      # We're on a unix platform. Hooray! :)
48404      path="$MSVC_DLL"
48405      has_space=`$ECHO "$path" | $GREP " "`
48406      if test "x$has_space" != x; then
48407        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48408$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48409        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48410      fi
48411
48412      # Use eval to expand a potential ~
48413      eval path="$path"
48414      if test ! -f "$path" && test ! -d "$path"; then
48415        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48416      fi
48417
48418      if test -d "$path"; then
48419        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48420      else
48421        dir="`$DIRNAME "$path"`"
48422        base="`$BASENAME "$path"`"
48423        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48424      fi
48425    fi
48426  fi
48427
48428      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48429$as_echo_n "checking for $DLL_NAME... " >&6; }
48430      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48431$as_echo "$MSVC_DLL" >&6; }
48432    else
48433      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48434$as_echo "incorrect, ignoring" >&6; }
48435      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48436$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48437    fi
48438  fi
48439
48440    if test "x$MSVC_DLL" = x; then
48441      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48442    fi
48443    MSVCR_DLL="$MSVC_DLL"
48444  else
48445
48446  DLL_NAME="${MSVCR_NAME}"
48447  MSVC_DLL=
48448
48449  if test "x$MSVC_DLL" = x; then
48450    # Probe: Using well-known location from Visual Studio 10.0
48451    if test "x$VCINSTALLDIR" != x; then
48452      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48453
48454  windows_path="$CYGWIN_VC_INSTALL_DIR"
48455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48456    unix_path=`$CYGPATH -u "$windows_path"`
48457    CYGWIN_VC_INSTALL_DIR="$unix_path"
48458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48460    CYGWIN_VC_INSTALL_DIR="$unix_path"
48461  fi
48462
48463      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48464        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48465      else
48466        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48467      fi
48468      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48469
48470  DLL_NAME="$DLL_NAME"
48471  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48472  METHOD="well-known location in VCINSTALLDIR"
48473  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48474    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48475$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48476
48477    # Need to check if the found msvcr is correct architecture
48478    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48479$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48480    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48482      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48483      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48484      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48485        CORRECT_MSVCR_ARCH="PE32 executable"
48486      else
48487        CORRECT_MSVCR_ARCH="PE32+ executable"
48488      fi
48489    else
48490      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48491        CORRECT_MSVCR_ARCH=386
48492      else
48493        CORRECT_MSVCR_ARCH=x86-64
48494      fi
48495    fi
48496    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48498$as_echo "ok" >&6; }
48499      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48500
48501  # Only process if variable expands to non-empty
48502
48503  if test "x$MSVC_DLL" != x; then
48504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48505
48506  # Input might be given as Windows format, start by converting to
48507  # unix format.
48508  path="$MSVC_DLL"
48509  new_path=`$CYGPATH -u "$path"`
48510
48511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48514  # "foo.exe" is OK but "foo" is an error.
48515  #
48516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48517  # It is also a way to make sure we got the proper file name for the real test later on.
48518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48519  if test "x$test_shortpath" = x; then
48520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48521$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48522    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48523  fi
48524
48525  # Call helper function which possibly converts this using DOS-style short mode.
48526  # If so, the updated path is stored in $new_path.
48527
48528  input_path="$new_path"
48529  # Check if we need to convert this using DOS-style short mode. If the path
48530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48531  # take no chances and rewrite it.
48532  # Note: m4 eats our [], so we need to use [ and ] instead.
48533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48534  if test "x$has_forbidden_chars" != x; then
48535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48539      # Going to short mode and back again did indeed matter. Since short mode is
48540      # case insensitive, let's make it lowercase to improve readability.
48541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48542      # Now convert it back to Unix-style (cygpath)
48543      input_path=`$CYGPATH -u "$shortmode_path"`
48544      new_path="$input_path"
48545    fi
48546  fi
48547
48548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48549  if test "x$test_cygdrive_prefix" = x; then
48550    # As a simple fix, exclude /usr/bin since it's not a real path.
48551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48553      # a path prefixed by /cygdrive for fixpath to work.
48554      new_path="$CYGWIN_ROOT_PATH$input_path"
48555    fi
48556  fi
48557
48558
48559  if test "x$path" != "x$new_path"; then
48560    MSVC_DLL="$new_path"
48561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48562$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48563  fi
48564
48565    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48566
48567  path="$MSVC_DLL"
48568  has_colon=`$ECHO $path | $GREP ^.:`
48569  new_path="$path"
48570  if test "x$has_colon" = x; then
48571    # Not in mixed or Windows style, start by that.
48572    new_path=`cmd //c echo $path`
48573  fi
48574
48575
48576  input_path="$new_path"
48577  # Check if we need to convert this using DOS-style short mode. If the path
48578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48579  # take no chances and rewrite it.
48580  # Note: m4 eats our [], so we need to use [ and ] instead.
48581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48582  if test "x$has_forbidden_chars" != x; then
48583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48585  fi
48586
48587
48588  windows_path="$new_path"
48589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48590    unix_path=`$CYGPATH -u "$windows_path"`
48591    new_path="$unix_path"
48592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48594    new_path="$unix_path"
48595  fi
48596
48597  if test "x$path" != "x$new_path"; then
48598    MSVC_DLL="$new_path"
48599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48600$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48601  fi
48602
48603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48605
48606    else
48607      # We're on a unix platform. Hooray! :)
48608      path="$MSVC_DLL"
48609      has_space=`$ECHO "$path" | $GREP " "`
48610      if test "x$has_space" != x; then
48611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48612$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48613        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48614      fi
48615
48616      # Use eval to expand a potential ~
48617      eval path="$path"
48618      if test ! -f "$path" && test ! -d "$path"; then
48619        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48620      fi
48621
48622      if test -d "$path"; then
48623        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48624      else
48625        dir="`$DIRNAME "$path"`"
48626        base="`$BASENAME "$path"`"
48627        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48628      fi
48629    fi
48630  fi
48631
48632      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48633$as_echo_n "checking for $DLL_NAME... " >&6; }
48634      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48635$as_echo "$MSVC_DLL" >&6; }
48636    else
48637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48638$as_echo "incorrect, ignoring" >&6; }
48639      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48640$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48641    fi
48642  fi
48643
48644    fi
48645  fi
48646
48647  if test "x$MSVC_DLL" = x; then
48648    # Probe: Check in the Boot JDK directory.
48649    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48650
48651  DLL_NAME="$DLL_NAME"
48652  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48653  METHOD="well-known location in Boot JDK"
48654  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48655    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48656$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48657
48658    # Need to check if the found msvcr is correct architecture
48659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48660$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48661    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48663      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48664      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48665      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48666        CORRECT_MSVCR_ARCH="PE32 executable"
48667      else
48668        CORRECT_MSVCR_ARCH="PE32+ executable"
48669      fi
48670    else
48671      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48672        CORRECT_MSVCR_ARCH=386
48673      else
48674        CORRECT_MSVCR_ARCH=x86-64
48675      fi
48676    fi
48677    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48679$as_echo "ok" >&6; }
48680      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48681
48682  # Only process if variable expands to non-empty
48683
48684  if test "x$MSVC_DLL" != x; then
48685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48686
48687  # Input might be given as Windows format, start by converting to
48688  # unix format.
48689  path="$MSVC_DLL"
48690  new_path=`$CYGPATH -u "$path"`
48691
48692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48695  # "foo.exe" is OK but "foo" is an error.
48696  #
48697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48698  # It is also a way to make sure we got the proper file name for the real test later on.
48699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48700  if test "x$test_shortpath" = x; then
48701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48702$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48703    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48704  fi
48705
48706  # Call helper function which possibly converts this using DOS-style short mode.
48707  # If so, the updated path is stored in $new_path.
48708
48709  input_path="$new_path"
48710  # Check if we need to convert this using DOS-style short mode. If the path
48711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48712  # take no chances and rewrite it.
48713  # Note: m4 eats our [], so we need to use [ and ] instead.
48714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48715  if test "x$has_forbidden_chars" != x; then
48716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48720      # Going to short mode and back again did indeed matter. Since short mode is
48721      # case insensitive, let's make it lowercase to improve readability.
48722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48723      # Now convert it back to Unix-style (cygpath)
48724      input_path=`$CYGPATH -u "$shortmode_path"`
48725      new_path="$input_path"
48726    fi
48727  fi
48728
48729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48730  if test "x$test_cygdrive_prefix" = x; then
48731    # As a simple fix, exclude /usr/bin since it's not a real path.
48732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48734      # a path prefixed by /cygdrive for fixpath to work.
48735      new_path="$CYGWIN_ROOT_PATH$input_path"
48736    fi
48737  fi
48738
48739
48740  if test "x$path" != "x$new_path"; then
48741    MSVC_DLL="$new_path"
48742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48743$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48744  fi
48745
48746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48747
48748  path="$MSVC_DLL"
48749  has_colon=`$ECHO $path | $GREP ^.:`
48750  new_path="$path"
48751  if test "x$has_colon" = x; then
48752    # Not in mixed or Windows style, start by that.
48753    new_path=`cmd //c echo $path`
48754  fi
48755
48756
48757  input_path="$new_path"
48758  # Check if we need to convert this using DOS-style short mode. If the path
48759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48760  # take no chances and rewrite it.
48761  # Note: m4 eats our [], so we need to use [ and ] instead.
48762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48763  if test "x$has_forbidden_chars" != x; then
48764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48766  fi
48767
48768
48769  windows_path="$new_path"
48770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48771    unix_path=`$CYGPATH -u "$windows_path"`
48772    new_path="$unix_path"
48773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48775    new_path="$unix_path"
48776  fi
48777
48778  if test "x$path" != "x$new_path"; then
48779    MSVC_DLL="$new_path"
48780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48781$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48782  fi
48783
48784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48786
48787    else
48788      # We're on a unix platform. Hooray! :)
48789      path="$MSVC_DLL"
48790      has_space=`$ECHO "$path" | $GREP " "`
48791      if test "x$has_space" != x; then
48792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48793$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48795      fi
48796
48797      # Use eval to expand a potential ~
48798      eval path="$path"
48799      if test ! -f "$path" && test ! -d "$path"; then
48800        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48801      fi
48802
48803      if test -d "$path"; then
48804        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48805      else
48806        dir="`$DIRNAME "$path"`"
48807        base="`$BASENAME "$path"`"
48808        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48809      fi
48810    fi
48811  fi
48812
48813      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48814$as_echo_n "checking for $DLL_NAME... " >&6; }
48815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48816$as_echo "$MSVC_DLL" >&6; }
48817    else
48818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48819$as_echo "incorrect, ignoring" >&6; }
48820      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48821$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48822    fi
48823  fi
48824
48825  fi
48826
48827  if test "x$MSVC_DLL" = x; then
48828    # Probe: Look in the Windows system32 directory
48829    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48830
48831  windows_path="$CYGWIN_SYSTEMROOT"
48832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48833    unix_path=`$CYGPATH -u "$windows_path"`
48834    CYGWIN_SYSTEMROOT="$unix_path"
48835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48837    CYGWIN_SYSTEMROOT="$unix_path"
48838  fi
48839
48840    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48841
48842  DLL_NAME="$DLL_NAME"
48843  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48844  METHOD="well-known location in SYSTEMROOT"
48845  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48846    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48847$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48848
48849    # Need to check if the found msvcr is correct architecture
48850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48851$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48852    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48854      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48855      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48856      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48857        CORRECT_MSVCR_ARCH="PE32 executable"
48858      else
48859        CORRECT_MSVCR_ARCH="PE32+ executable"
48860      fi
48861    else
48862      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48863        CORRECT_MSVCR_ARCH=386
48864      else
48865        CORRECT_MSVCR_ARCH=x86-64
48866      fi
48867    fi
48868    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48870$as_echo "ok" >&6; }
48871      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48872
48873  # Only process if variable expands to non-empty
48874
48875  if test "x$MSVC_DLL" != x; then
48876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48877
48878  # Input might be given as Windows format, start by converting to
48879  # unix format.
48880  path="$MSVC_DLL"
48881  new_path=`$CYGPATH -u "$path"`
48882
48883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48886  # "foo.exe" is OK but "foo" is an error.
48887  #
48888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48889  # It is also a way to make sure we got the proper file name for the real test later on.
48890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48891  if test "x$test_shortpath" = x; then
48892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48893$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48894    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48895  fi
48896
48897  # Call helper function which possibly converts this using DOS-style short mode.
48898  # If so, the updated path is stored in $new_path.
48899
48900  input_path="$new_path"
48901  # Check if we need to convert this using DOS-style short mode. If the path
48902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48903  # take no chances and rewrite it.
48904  # Note: m4 eats our [], so we need to use [ and ] instead.
48905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48906  if test "x$has_forbidden_chars" != x; then
48907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48911      # Going to short mode and back again did indeed matter. Since short mode is
48912      # case insensitive, let's make it lowercase to improve readability.
48913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48914      # Now convert it back to Unix-style (cygpath)
48915      input_path=`$CYGPATH -u "$shortmode_path"`
48916      new_path="$input_path"
48917    fi
48918  fi
48919
48920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48921  if test "x$test_cygdrive_prefix" = x; then
48922    # As a simple fix, exclude /usr/bin since it's not a real path.
48923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48925      # a path prefixed by /cygdrive for fixpath to work.
48926      new_path="$CYGWIN_ROOT_PATH$input_path"
48927    fi
48928  fi
48929
48930
48931  if test "x$path" != "x$new_path"; then
48932    MSVC_DLL="$new_path"
48933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48934$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48935  fi
48936
48937    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48938
48939  path="$MSVC_DLL"
48940  has_colon=`$ECHO $path | $GREP ^.:`
48941  new_path="$path"
48942  if test "x$has_colon" = x; then
48943    # Not in mixed or Windows style, start by that.
48944    new_path=`cmd //c echo $path`
48945  fi
48946
48947
48948  input_path="$new_path"
48949  # Check if we need to convert this using DOS-style short mode. If the path
48950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48951  # take no chances and rewrite it.
48952  # Note: m4 eats our [], so we need to use [ and ] instead.
48953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48954  if test "x$has_forbidden_chars" != x; then
48955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48957  fi
48958
48959
48960  windows_path="$new_path"
48961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48962    unix_path=`$CYGPATH -u "$windows_path"`
48963    new_path="$unix_path"
48964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48966    new_path="$unix_path"
48967  fi
48968
48969  if test "x$path" != "x$new_path"; then
48970    MSVC_DLL="$new_path"
48971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48972$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48973  fi
48974
48975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48977
48978    else
48979      # We're on a unix platform. Hooray! :)
48980      path="$MSVC_DLL"
48981      has_space=`$ECHO "$path" | $GREP " "`
48982      if test "x$has_space" != x; then
48983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48984$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48985        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48986      fi
48987
48988      # Use eval to expand a potential ~
48989      eval path="$path"
48990      if test ! -f "$path" && test ! -d "$path"; then
48991        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48992      fi
48993
48994      if test -d "$path"; then
48995        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48996      else
48997        dir="`$DIRNAME "$path"`"
48998        base="`$BASENAME "$path"`"
48999        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49000      fi
49001    fi
49002  fi
49003
49004      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49005$as_echo_n "checking for $DLL_NAME... " >&6; }
49006      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49007$as_echo "$MSVC_DLL" >&6; }
49008    else
49009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49010$as_echo "incorrect, ignoring" >&6; }
49011      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49012$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49013    fi
49014  fi
49015
49016  fi
49017
49018  if test "x$MSVC_DLL" = x; then
49019    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49020    if test "x$VS100COMNTOOLS" != x; then
49021      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49022
49023  windows_path="$CYGWIN_VS_TOOLS_DIR"
49024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49025    unix_path=`$CYGPATH -u "$windows_path"`
49026    CYGWIN_VS_TOOLS_DIR="$unix_path"
49027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49029    CYGWIN_VS_TOOLS_DIR="$unix_path"
49030  fi
49031
49032      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49033        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49034	    | $GREP -i /x64/ | $HEAD --lines 1`
49035      else
49036        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49037	    | $GREP -i /x86/ | $HEAD --lines 1`
49038      fi
49039
49040  DLL_NAME="$DLL_NAME"
49041  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49042  METHOD="search of VS100COMNTOOLS"
49043  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49044    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49045$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49046
49047    # Need to check if the found msvcr is correct architecture
49048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49049$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49050    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49052      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49053      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49054      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49055        CORRECT_MSVCR_ARCH="PE32 executable"
49056      else
49057        CORRECT_MSVCR_ARCH="PE32+ executable"
49058      fi
49059    else
49060      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49061        CORRECT_MSVCR_ARCH=386
49062      else
49063        CORRECT_MSVCR_ARCH=x86-64
49064      fi
49065    fi
49066    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49068$as_echo "ok" >&6; }
49069      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49070
49071  # Only process if variable expands to non-empty
49072
49073  if test "x$MSVC_DLL" != x; then
49074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49075
49076  # Input might be given as Windows format, start by converting to
49077  # unix format.
49078  path="$MSVC_DLL"
49079  new_path=`$CYGPATH -u "$path"`
49080
49081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49084  # "foo.exe" is OK but "foo" is an error.
49085  #
49086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49087  # It is also a way to make sure we got the proper file name for the real test later on.
49088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49089  if test "x$test_shortpath" = x; then
49090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49091$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49092    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49093  fi
49094
49095  # Call helper function which possibly converts this using DOS-style short mode.
49096  # If so, the updated path is stored in $new_path.
49097
49098  input_path="$new_path"
49099  # Check if we need to convert this using DOS-style short mode. If the path
49100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49101  # take no chances and rewrite it.
49102  # Note: m4 eats our [], so we need to use [ and ] instead.
49103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49104  if test "x$has_forbidden_chars" != x; then
49105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49109      # Going to short mode and back again did indeed matter. Since short mode is
49110      # case insensitive, let's make it lowercase to improve readability.
49111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49112      # Now convert it back to Unix-style (cygpath)
49113      input_path=`$CYGPATH -u "$shortmode_path"`
49114      new_path="$input_path"
49115    fi
49116  fi
49117
49118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49119  if test "x$test_cygdrive_prefix" = x; then
49120    # As a simple fix, exclude /usr/bin since it's not a real path.
49121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49123      # a path prefixed by /cygdrive for fixpath to work.
49124      new_path="$CYGWIN_ROOT_PATH$input_path"
49125    fi
49126  fi
49127
49128
49129  if test "x$path" != "x$new_path"; then
49130    MSVC_DLL="$new_path"
49131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49132$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49133  fi
49134
49135    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49136
49137  path="$MSVC_DLL"
49138  has_colon=`$ECHO $path | $GREP ^.:`
49139  new_path="$path"
49140  if test "x$has_colon" = x; then
49141    # Not in mixed or Windows style, start by that.
49142    new_path=`cmd //c echo $path`
49143  fi
49144
49145
49146  input_path="$new_path"
49147  # Check if we need to convert this using DOS-style short mode. If the path
49148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49149  # take no chances and rewrite it.
49150  # Note: m4 eats our [], so we need to use [ and ] instead.
49151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49152  if test "x$has_forbidden_chars" != x; then
49153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49155  fi
49156
49157
49158  windows_path="$new_path"
49159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49160    unix_path=`$CYGPATH -u "$windows_path"`
49161    new_path="$unix_path"
49162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49164    new_path="$unix_path"
49165  fi
49166
49167  if test "x$path" != "x$new_path"; then
49168    MSVC_DLL="$new_path"
49169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49170$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49171  fi
49172
49173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49175
49176    else
49177      # We're on a unix platform. Hooray! :)
49178      path="$MSVC_DLL"
49179      has_space=`$ECHO "$path" | $GREP " "`
49180      if test "x$has_space" != x; then
49181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49182$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49183        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49184      fi
49185
49186      # Use eval to expand a potential ~
49187      eval path="$path"
49188      if test ! -f "$path" && test ! -d "$path"; then
49189        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49190      fi
49191
49192      if test -d "$path"; then
49193        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49194      else
49195        dir="`$DIRNAME "$path"`"
49196        base="`$BASENAME "$path"`"
49197        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49198      fi
49199    fi
49200  fi
49201
49202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49203$as_echo_n "checking for $DLL_NAME... " >&6; }
49204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49205$as_echo "$MSVC_DLL" >&6; }
49206    else
49207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49208$as_echo "incorrect, ignoring" >&6; }
49209      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49210$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49211    fi
49212  fi
49213
49214    fi
49215  fi
49216
49217  if test "x$MSVC_DLL" = x; then
49218    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49219    # (This was the original behaviour; kept since it might turn something up)
49220    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49221      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49222        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49223	    | $GREP x64 | $HEAD --lines 1`
49224      else
49225        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49226	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49227        if test "x$POSSIBLE_MSVC_DLL" = x; then
49228          # We're grasping at straws now...
49229          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49230	      | $HEAD --lines 1`
49231        fi
49232      fi
49233
49234
49235  DLL_NAME="$DLL_NAME"
49236  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49237  METHOD="search of VCINSTALLDIR"
49238  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49239    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49240$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49241
49242    # Need to check if the found msvcr is correct architecture
49243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49244$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49245    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49247      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49248      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49249      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49250        CORRECT_MSVCR_ARCH="PE32 executable"
49251      else
49252        CORRECT_MSVCR_ARCH="PE32+ executable"
49253      fi
49254    else
49255      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49256        CORRECT_MSVCR_ARCH=386
49257      else
49258        CORRECT_MSVCR_ARCH=x86-64
49259      fi
49260    fi
49261    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49262      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49263$as_echo "ok" >&6; }
49264      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49265
49266  # Only process if variable expands to non-empty
49267
49268  if test "x$MSVC_DLL" != x; then
49269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49270
49271  # Input might be given as Windows format, start by converting to
49272  # unix format.
49273  path="$MSVC_DLL"
49274  new_path=`$CYGPATH -u "$path"`
49275
49276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49279  # "foo.exe" is OK but "foo" is an error.
49280  #
49281  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49282  # It is also a way to make sure we got the proper file name for the real test later on.
49283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49284  if test "x$test_shortpath" = x; then
49285    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49286$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49287    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49288  fi
49289
49290  # Call helper function which possibly converts this using DOS-style short mode.
49291  # If so, the updated path is stored in $new_path.
49292
49293  input_path="$new_path"
49294  # Check if we need to convert this using DOS-style short mode. If the path
49295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49296  # take no chances and rewrite it.
49297  # Note: m4 eats our [], so we need to use [ and ] instead.
49298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49299  if test "x$has_forbidden_chars" != x; then
49300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49304      # Going to short mode and back again did indeed matter. Since short mode is
49305      # case insensitive, let's make it lowercase to improve readability.
49306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49307      # Now convert it back to Unix-style (cygpath)
49308      input_path=`$CYGPATH -u "$shortmode_path"`
49309      new_path="$input_path"
49310    fi
49311  fi
49312
49313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49314  if test "x$test_cygdrive_prefix" = x; then
49315    # As a simple fix, exclude /usr/bin since it's not a real path.
49316    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49318      # a path prefixed by /cygdrive for fixpath to work.
49319      new_path="$CYGWIN_ROOT_PATH$input_path"
49320    fi
49321  fi
49322
49323
49324  if test "x$path" != "x$new_path"; then
49325    MSVC_DLL="$new_path"
49326    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49327$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49328  fi
49329
49330    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49331
49332  path="$MSVC_DLL"
49333  has_colon=`$ECHO $path | $GREP ^.:`
49334  new_path="$path"
49335  if test "x$has_colon" = x; then
49336    # Not in mixed or Windows style, start by that.
49337    new_path=`cmd //c echo $path`
49338  fi
49339
49340
49341  input_path="$new_path"
49342  # Check if we need to convert this using DOS-style short mode. If the path
49343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49344  # take no chances and rewrite it.
49345  # Note: m4 eats our [], so we need to use [ and ] instead.
49346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49347  if test "x$has_forbidden_chars" != x; then
49348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49349    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49350  fi
49351
49352
49353  windows_path="$new_path"
49354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49355    unix_path=`$CYGPATH -u "$windows_path"`
49356    new_path="$unix_path"
49357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49359    new_path="$unix_path"
49360  fi
49361
49362  if test "x$path" != "x$new_path"; then
49363    MSVC_DLL="$new_path"
49364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49365$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49366  fi
49367
49368  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49369  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49370
49371    else
49372      # We're on a unix platform. Hooray! :)
49373      path="$MSVC_DLL"
49374      has_space=`$ECHO "$path" | $GREP " "`
49375      if test "x$has_space" != x; then
49376        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49377$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49378        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49379      fi
49380
49381      # Use eval to expand a potential ~
49382      eval path="$path"
49383      if test ! -f "$path" && test ! -d "$path"; then
49384        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49385      fi
49386
49387      if test -d "$path"; then
49388        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49389      else
49390        dir="`$DIRNAME "$path"`"
49391        base="`$BASENAME "$path"`"
49392        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49393      fi
49394    fi
49395  fi
49396
49397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49398$as_echo_n "checking for $DLL_NAME... " >&6; }
49399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49400$as_echo "$MSVC_DLL" >&6; }
49401    else
49402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49403$as_echo "incorrect, ignoring" >&6; }
49404      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49405$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49406    fi
49407  fi
49408
49409    fi
49410  fi
49411
49412  if test "x$MSVC_DLL" = x; then
49413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49414$as_echo_n "checking for $DLL_NAME... " >&6; }
49415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49416$as_echo "no" >&6; }
49417    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49418  fi
49419
49420    MSVCR_DLL="$MSVC_DLL"
49421  fi
49422
49423
49424
49425# Check whether --with-msvcp-dll was given.
49426if test "${with_msvcp_dll+set}" = set; then :
49427  withval=$with_msvcp_dll;
49428fi
49429
49430
49431  if test "x$MSVCP_NAME" != "x"; then
49432    if test "x$with_msvcp_dll" != x; then
49433      # If given explicitely by user, do not probe. If not present, fail directly.
49434
49435  DLL_NAME="$MSVCP_NAME"
49436  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49437  METHOD="--with-msvcp-dll"
49438  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49439    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49440$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49441
49442    # Need to check if the found msvcr is correct architecture
49443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49444$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49445    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49446    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49447      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49448      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49449      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49450        CORRECT_MSVCR_ARCH="PE32 executable"
49451      else
49452        CORRECT_MSVCR_ARCH="PE32+ executable"
49453      fi
49454    else
49455      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49456        CORRECT_MSVCR_ARCH=386
49457      else
49458        CORRECT_MSVCR_ARCH=x86-64
49459      fi
49460    fi
49461    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49462      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49463$as_echo "ok" >&6; }
49464      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49465
49466  # Only process if variable expands to non-empty
49467
49468  if test "x$MSVC_DLL" != x; then
49469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49470
49471  # Input might be given as Windows format, start by converting to
49472  # unix format.
49473  path="$MSVC_DLL"
49474  new_path=`$CYGPATH -u "$path"`
49475
49476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49479  # "foo.exe" is OK but "foo" is an error.
49480  #
49481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49482  # It is also a way to make sure we got the proper file name for the real test later on.
49483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49484  if test "x$test_shortpath" = x; then
49485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49486$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49487    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49488  fi
49489
49490  # Call helper function which possibly converts this using DOS-style short mode.
49491  # If so, the updated path is stored in $new_path.
49492
49493  input_path="$new_path"
49494  # Check if we need to convert this using DOS-style short mode. If the path
49495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49496  # take no chances and rewrite it.
49497  # Note: m4 eats our [], so we need to use [ and ] instead.
49498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49499  if test "x$has_forbidden_chars" != x; then
49500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49504      # Going to short mode and back again did indeed matter. Since short mode is
49505      # case insensitive, let's make it lowercase to improve readability.
49506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49507      # Now convert it back to Unix-style (cygpath)
49508      input_path=`$CYGPATH -u "$shortmode_path"`
49509      new_path="$input_path"
49510    fi
49511  fi
49512
49513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49514  if test "x$test_cygdrive_prefix" = x; then
49515    # As a simple fix, exclude /usr/bin since it's not a real path.
49516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49518      # a path prefixed by /cygdrive for fixpath to work.
49519      new_path="$CYGWIN_ROOT_PATH$input_path"
49520    fi
49521  fi
49522
49523
49524  if test "x$path" != "x$new_path"; then
49525    MSVC_DLL="$new_path"
49526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49527$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49528  fi
49529
49530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49531
49532  path="$MSVC_DLL"
49533  has_colon=`$ECHO $path | $GREP ^.:`
49534  new_path="$path"
49535  if test "x$has_colon" = x; then
49536    # Not in mixed or Windows style, start by that.
49537    new_path=`cmd //c echo $path`
49538  fi
49539
49540
49541  input_path="$new_path"
49542  # Check if we need to convert this using DOS-style short mode. If the path
49543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49544  # take no chances and rewrite it.
49545  # Note: m4 eats our [], so we need to use [ and ] instead.
49546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49547  if test "x$has_forbidden_chars" != x; then
49548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49550  fi
49551
49552
49553  windows_path="$new_path"
49554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49555    unix_path=`$CYGPATH -u "$windows_path"`
49556    new_path="$unix_path"
49557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49559    new_path="$unix_path"
49560  fi
49561
49562  if test "x$path" != "x$new_path"; then
49563    MSVC_DLL="$new_path"
49564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49565$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49566  fi
49567
49568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49570
49571    else
49572      # We're on a unix platform. Hooray! :)
49573      path="$MSVC_DLL"
49574      has_space=`$ECHO "$path" | $GREP " "`
49575      if test "x$has_space" != x; then
49576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49577$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49578        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49579      fi
49580
49581      # Use eval to expand a potential ~
49582      eval path="$path"
49583      if test ! -f "$path" && test ! -d "$path"; then
49584        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49585      fi
49586
49587      if test -d "$path"; then
49588        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49589      else
49590        dir="`$DIRNAME "$path"`"
49591        base="`$BASENAME "$path"`"
49592        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49593      fi
49594    fi
49595  fi
49596
49597      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49598$as_echo_n "checking for $DLL_NAME... " >&6; }
49599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49600$as_echo "$MSVC_DLL" >&6; }
49601    else
49602      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49603$as_echo "incorrect, ignoring" >&6; }
49604      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49605$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49606    fi
49607  fi
49608
49609      if test "x$MSVC_DLL" = x; then
49610        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49611      fi
49612      MSVCP_DLL="$MSVC_DLL"
49613    elif test "x$DEVKIT_MSVCP_DLL" != x; then
49614
49615  DLL_NAME="$MSVCP_NAME"
49616  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49617  METHOD="devkit"
49618  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49619    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49620$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49621
49622    # Need to check if the found msvcr is correct architecture
49623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49624$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49625    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49627      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49628      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49629      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49630        CORRECT_MSVCR_ARCH="PE32 executable"
49631      else
49632        CORRECT_MSVCR_ARCH="PE32+ executable"
49633      fi
49634    else
49635      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49636        CORRECT_MSVCR_ARCH=386
49637      else
49638        CORRECT_MSVCR_ARCH=x86-64
49639      fi
49640    fi
49641    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49643$as_echo "ok" >&6; }
49644      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49645
49646  # Only process if variable expands to non-empty
49647
49648  if test "x$MSVC_DLL" != x; then
49649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49650
49651  # Input might be given as Windows format, start by converting to
49652  # unix format.
49653  path="$MSVC_DLL"
49654  new_path=`$CYGPATH -u "$path"`
49655
49656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49659  # "foo.exe" is OK but "foo" is an error.
49660  #
49661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49662  # It is also a way to make sure we got the proper file name for the real test later on.
49663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49664  if test "x$test_shortpath" = x; then
49665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49666$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49667    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49668  fi
49669
49670  # Call helper function which possibly converts this using DOS-style short mode.
49671  # If so, the updated path is stored in $new_path.
49672
49673  input_path="$new_path"
49674  # Check if we need to convert this using DOS-style short mode. If the path
49675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49676  # take no chances and rewrite it.
49677  # Note: m4 eats our [], so we need to use [ and ] instead.
49678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49679  if test "x$has_forbidden_chars" != x; then
49680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49684      # Going to short mode and back again did indeed matter. Since short mode is
49685      # case insensitive, let's make it lowercase to improve readability.
49686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49687      # Now convert it back to Unix-style (cygpath)
49688      input_path=`$CYGPATH -u "$shortmode_path"`
49689      new_path="$input_path"
49690    fi
49691  fi
49692
49693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49694  if test "x$test_cygdrive_prefix" = x; then
49695    # As a simple fix, exclude /usr/bin since it's not a real path.
49696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49698      # a path prefixed by /cygdrive for fixpath to work.
49699      new_path="$CYGWIN_ROOT_PATH$input_path"
49700    fi
49701  fi
49702
49703
49704  if test "x$path" != "x$new_path"; then
49705    MSVC_DLL="$new_path"
49706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49707$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49708  fi
49709
49710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49711
49712  path="$MSVC_DLL"
49713  has_colon=`$ECHO $path | $GREP ^.:`
49714  new_path="$path"
49715  if test "x$has_colon" = x; then
49716    # Not in mixed or Windows style, start by that.
49717    new_path=`cmd //c echo $path`
49718  fi
49719
49720
49721  input_path="$new_path"
49722  # Check if we need to convert this using DOS-style short mode. If the path
49723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49724  # take no chances and rewrite it.
49725  # Note: m4 eats our [], so we need to use [ and ] instead.
49726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49727  if test "x$has_forbidden_chars" != x; then
49728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49730  fi
49731
49732
49733  windows_path="$new_path"
49734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49735    unix_path=`$CYGPATH -u "$windows_path"`
49736    new_path="$unix_path"
49737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49739    new_path="$unix_path"
49740  fi
49741
49742  if test "x$path" != "x$new_path"; then
49743    MSVC_DLL="$new_path"
49744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49745$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49746  fi
49747
49748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49750
49751    else
49752      # We're on a unix platform. Hooray! :)
49753      path="$MSVC_DLL"
49754      has_space=`$ECHO "$path" | $GREP " "`
49755      if test "x$has_space" != x; then
49756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49757$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49759      fi
49760
49761      # Use eval to expand a potential ~
49762      eval path="$path"
49763      if test ! -f "$path" && test ! -d "$path"; then
49764        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49765      fi
49766
49767      if test -d "$path"; then
49768        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49769      else
49770        dir="`$DIRNAME "$path"`"
49771        base="`$BASENAME "$path"`"
49772        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49773      fi
49774    fi
49775  fi
49776
49777      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49778$as_echo_n "checking for $DLL_NAME... " >&6; }
49779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49780$as_echo "$MSVC_DLL" >&6; }
49781    else
49782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49783$as_echo "incorrect, ignoring" >&6; }
49784      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49785$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49786    fi
49787  fi
49788
49789      if test "x$MSVC_DLL" = x; then
49790        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49791      fi
49792      MSVCP_DLL="$MSVC_DLL"
49793    else
49794
49795  DLL_NAME="${MSVCP_NAME}"
49796  MSVC_DLL=
49797
49798  if test "x$MSVC_DLL" = x; then
49799    # Probe: Using well-known location from Visual Studio 10.0
49800    if test "x$VCINSTALLDIR" != x; then
49801      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49802
49803  windows_path="$CYGWIN_VC_INSTALL_DIR"
49804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49805    unix_path=`$CYGPATH -u "$windows_path"`
49806    CYGWIN_VC_INSTALL_DIR="$unix_path"
49807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49809    CYGWIN_VC_INSTALL_DIR="$unix_path"
49810  fi
49811
49812      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49813        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49814      else
49815        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49816      fi
49817      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49818
49819  DLL_NAME="$DLL_NAME"
49820  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49821  METHOD="well-known location in VCINSTALLDIR"
49822  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49823    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49824$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49825
49826    # Need to check if the found msvcr is correct architecture
49827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49828$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49829    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49830    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49831      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49832      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49833      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49834        CORRECT_MSVCR_ARCH="PE32 executable"
49835      else
49836        CORRECT_MSVCR_ARCH="PE32+ executable"
49837      fi
49838    else
49839      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49840        CORRECT_MSVCR_ARCH=386
49841      else
49842        CORRECT_MSVCR_ARCH=x86-64
49843      fi
49844    fi
49845    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49846      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49847$as_echo "ok" >&6; }
49848      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49849
49850  # Only process if variable expands to non-empty
49851
49852  if test "x$MSVC_DLL" != x; then
49853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49854
49855  # Input might be given as Windows format, start by converting to
49856  # unix format.
49857  path="$MSVC_DLL"
49858  new_path=`$CYGPATH -u "$path"`
49859
49860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49863  # "foo.exe" is OK but "foo" is an error.
49864  #
49865  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49866  # It is also a way to make sure we got the proper file name for the real test later on.
49867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49868  if test "x$test_shortpath" = x; then
49869    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49870$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49871    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49872  fi
49873
49874  # Call helper function which possibly converts this using DOS-style short mode.
49875  # If so, the updated path is stored in $new_path.
49876
49877  input_path="$new_path"
49878  # Check if we need to convert this using DOS-style short mode. If the path
49879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49880  # take no chances and rewrite it.
49881  # Note: m4 eats our [], so we need to use [ and ] instead.
49882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49883  if test "x$has_forbidden_chars" != x; then
49884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49888      # Going to short mode and back again did indeed matter. Since short mode is
49889      # case insensitive, let's make it lowercase to improve readability.
49890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49891      # Now convert it back to Unix-style (cygpath)
49892      input_path=`$CYGPATH -u "$shortmode_path"`
49893      new_path="$input_path"
49894    fi
49895  fi
49896
49897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49898  if test "x$test_cygdrive_prefix" = x; then
49899    # As a simple fix, exclude /usr/bin since it's not a real path.
49900    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49902      # a path prefixed by /cygdrive for fixpath to work.
49903      new_path="$CYGWIN_ROOT_PATH$input_path"
49904    fi
49905  fi
49906
49907
49908  if test "x$path" != "x$new_path"; then
49909    MSVC_DLL="$new_path"
49910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49911$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49912  fi
49913
49914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49915
49916  path="$MSVC_DLL"
49917  has_colon=`$ECHO $path | $GREP ^.:`
49918  new_path="$path"
49919  if test "x$has_colon" = x; then
49920    # Not in mixed or Windows style, start by that.
49921    new_path=`cmd //c echo $path`
49922  fi
49923
49924
49925  input_path="$new_path"
49926  # Check if we need to convert this using DOS-style short mode. If the path
49927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49928  # take no chances and rewrite it.
49929  # Note: m4 eats our [], so we need to use [ and ] instead.
49930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49931  if test "x$has_forbidden_chars" != x; then
49932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49934  fi
49935
49936
49937  windows_path="$new_path"
49938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49939    unix_path=`$CYGPATH -u "$windows_path"`
49940    new_path="$unix_path"
49941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49943    new_path="$unix_path"
49944  fi
49945
49946  if test "x$path" != "x$new_path"; then
49947    MSVC_DLL="$new_path"
49948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49949$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49950  fi
49951
49952  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49953  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49954
49955    else
49956      # We're on a unix platform. Hooray! :)
49957      path="$MSVC_DLL"
49958      has_space=`$ECHO "$path" | $GREP " "`
49959      if test "x$has_space" != x; then
49960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49961$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49962        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49963      fi
49964
49965      # Use eval to expand a potential ~
49966      eval path="$path"
49967      if test ! -f "$path" && test ! -d "$path"; then
49968        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49969      fi
49970
49971      if test -d "$path"; then
49972        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49973      else
49974        dir="`$DIRNAME "$path"`"
49975        base="`$BASENAME "$path"`"
49976        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49977      fi
49978    fi
49979  fi
49980
49981      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49982$as_echo_n "checking for $DLL_NAME... " >&6; }
49983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49984$as_echo "$MSVC_DLL" >&6; }
49985    else
49986      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49987$as_echo "incorrect, ignoring" >&6; }
49988      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49989$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49990    fi
49991  fi
49992
49993    fi
49994  fi
49995
49996  if test "x$MSVC_DLL" = x; then
49997    # Probe: Check in the Boot JDK directory.
49998    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49999
50000  DLL_NAME="$DLL_NAME"
50001  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50002  METHOD="well-known location in Boot JDK"
50003  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50004    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50005$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50006
50007    # Need to check if the found msvcr is correct architecture
50008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50009$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50010    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50011    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50012      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50013      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50014      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50015        CORRECT_MSVCR_ARCH="PE32 executable"
50016      else
50017        CORRECT_MSVCR_ARCH="PE32+ executable"
50018      fi
50019    else
50020      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50021        CORRECT_MSVCR_ARCH=386
50022      else
50023        CORRECT_MSVCR_ARCH=x86-64
50024      fi
50025    fi
50026    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50028$as_echo "ok" >&6; }
50029      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50030
50031  # Only process if variable expands to non-empty
50032
50033  if test "x$MSVC_DLL" != x; then
50034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50035
50036  # Input might be given as Windows format, start by converting to
50037  # unix format.
50038  path="$MSVC_DLL"
50039  new_path=`$CYGPATH -u "$path"`
50040
50041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50044  # "foo.exe" is OK but "foo" is an error.
50045  #
50046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50047  # It is also a way to make sure we got the proper file name for the real test later on.
50048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50049  if test "x$test_shortpath" = x; then
50050    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50051$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50052    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50053  fi
50054
50055  # Call helper function which possibly converts this using DOS-style short mode.
50056  # If so, the updated path is stored in $new_path.
50057
50058  input_path="$new_path"
50059  # Check if we need to convert this using DOS-style short mode. If the path
50060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50061  # take no chances and rewrite it.
50062  # Note: m4 eats our [], so we need to use [ and ] instead.
50063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50064  if test "x$has_forbidden_chars" != x; then
50065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50066    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50067    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50068    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50069      # Going to short mode and back again did indeed matter. Since short mode is
50070      # case insensitive, let's make it lowercase to improve readability.
50071      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50072      # Now convert it back to Unix-style (cygpath)
50073      input_path=`$CYGPATH -u "$shortmode_path"`
50074      new_path="$input_path"
50075    fi
50076  fi
50077
50078  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50079  if test "x$test_cygdrive_prefix" = x; then
50080    # As a simple fix, exclude /usr/bin since it's not a real path.
50081    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50082      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50083      # a path prefixed by /cygdrive for fixpath to work.
50084      new_path="$CYGWIN_ROOT_PATH$input_path"
50085    fi
50086  fi
50087
50088
50089  if test "x$path" != "x$new_path"; then
50090    MSVC_DLL="$new_path"
50091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50092$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50093  fi
50094
50095    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50096
50097  path="$MSVC_DLL"
50098  has_colon=`$ECHO $path | $GREP ^.:`
50099  new_path="$path"
50100  if test "x$has_colon" = x; then
50101    # Not in mixed or Windows style, start by that.
50102    new_path=`cmd //c echo $path`
50103  fi
50104
50105
50106  input_path="$new_path"
50107  # Check if we need to convert this using DOS-style short mode. If the path
50108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50109  # take no chances and rewrite it.
50110  # Note: m4 eats our [], so we need to use [ and ] instead.
50111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50112  if test "x$has_forbidden_chars" != x; then
50113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50114    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50115  fi
50116
50117
50118  windows_path="$new_path"
50119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50120    unix_path=`$CYGPATH -u "$windows_path"`
50121    new_path="$unix_path"
50122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50124    new_path="$unix_path"
50125  fi
50126
50127  if test "x$path" != "x$new_path"; then
50128    MSVC_DLL="$new_path"
50129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50130$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50131  fi
50132
50133  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50134  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50135
50136    else
50137      # We're on a unix platform. Hooray! :)
50138      path="$MSVC_DLL"
50139      has_space=`$ECHO "$path" | $GREP " "`
50140      if test "x$has_space" != x; then
50141        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50142$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50143        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50144      fi
50145
50146      # Use eval to expand a potential ~
50147      eval path="$path"
50148      if test ! -f "$path" && test ! -d "$path"; then
50149        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50150      fi
50151
50152      if test -d "$path"; then
50153        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50154      else
50155        dir="`$DIRNAME "$path"`"
50156        base="`$BASENAME "$path"`"
50157        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50158      fi
50159    fi
50160  fi
50161
50162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50163$as_echo_n "checking for $DLL_NAME... " >&6; }
50164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50165$as_echo "$MSVC_DLL" >&6; }
50166    else
50167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50168$as_echo "incorrect, ignoring" >&6; }
50169      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50170$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50171    fi
50172  fi
50173
50174  fi
50175
50176  if test "x$MSVC_DLL" = x; then
50177    # Probe: Look in the Windows system32 directory
50178    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50179
50180  windows_path="$CYGWIN_SYSTEMROOT"
50181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50182    unix_path=`$CYGPATH -u "$windows_path"`
50183    CYGWIN_SYSTEMROOT="$unix_path"
50184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50186    CYGWIN_SYSTEMROOT="$unix_path"
50187  fi
50188
50189    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50190
50191  DLL_NAME="$DLL_NAME"
50192  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50193  METHOD="well-known location in SYSTEMROOT"
50194  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50195    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50196$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50197
50198    # Need to check if the found msvcr is correct architecture
50199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50200$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50201    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50202    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50203      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50204      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50205      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50206        CORRECT_MSVCR_ARCH="PE32 executable"
50207      else
50208        CORRECT_MSVCR_ARCH="PE32+ executable"
50209      fi
50210    else
50211      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50212        CORRECT_MSVCR_ARCH=386
50213      else
50214        CORRECT_MSVCR_ARCH=x86-64
50215      fi
50216    fi
50217    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50219$as_echo "ok" >&6; }
50220      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50221
50222  # Only process if variable expands to non-empty
50223
50224  if test "x$MSVC_DLL" != x; then
50225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50226
50227  # Input might be given as Windows format, start by converting to
50228  # unix format.
50229  path="$MSVC_DLL"
50230  new_path=`$CYGPATH -u "$path"`
50231
50232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50235  # "foo.exe" is OK but "foo" is an error.
50236  #
50237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50238  # It is also a way to make sure we got the proper file name for the real test later on.
50239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50240  if test "x$test_shortpath" = x; then
50241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50242$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50243    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50244  fi
50245
50246  # Call helper function which possibly converts this using DOS-style short mode.
50247  # If so, the updated path is stored in $new_path.
50248
50249  input_path="$new_path"
50250  # Check if we need to convert this using DOS-style short mode. If the path
50251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50252  # take no chances and rewrite it.
50253  # Note: m4 eats our [], so we need to use [ and ] instead.
50254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50255  if test "x$has_forbidden_chars" != x; then
50256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50260      # Going to short mode and back again did indeed matter. Since short mode is
50261      # case insensitive, let's make it lowercase to improve readability.
50262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50263      # Now convert it back to Unix-style (cygpath)
50264      input_path=`$CYGPATH -u "$shortmode_path"`
50265      new_path="$input_path"
50266    fi
50267  fi
50268
50269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50270  if test "x$test_cygdrive_prefix" = x; then
50271    # As a simple fix, exclude /usr/bin since it's not a real path.
50272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50274      # a path prefixed by /cygdrive for fixpath to work.
50275      new_path="$CYGWIN_ROOT_PATH$input_path"
50276    fi
50277  fi
50278
50279
50280  if test "x$path" != "x$new_path"; then
50281    MSVC_DLL="$new_path"
50282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50283$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50284  fi
50285
50286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50287
50288  path="$MSVC_DLL"
50289  has_colon=`$ECHO $path | $GREP ^.:`
50290  new_path="$path"
50291  if test "x$has_colon" = x; then
50292    # Not in mixed or Windows style, start by that.
50293    new_path=`cmd //c echo $path`
50294  fi
50295
50296
50297  input_path="$new_path"
50298  # Check if we need to convert this using DOS-style short mode. If the path
50299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50300  # take no chances and rewrite it.
50301  # Note: m4 eats our [], so we need to use [ and ] instead.
50302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50303  if test "x$has_forbidden_chars" != x; then
50304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50306  fi
50307
50308
50309  windows_path="$new_path"
50310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50311    unix_path=`$CYGPATH -u "$windows_path"`
50312    new_path="$unix_path"
50313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50315    new_path="$unix_path"
50316  fi
50317
50318  if test "x$path" != "x$new_path"; then
50319    MSVC_DLL="$new_path"
50320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50321$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50322  fi
50323
50324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50326
50327    else
50328      # We're on a unix platform. Hooray! :)
50329      path="$MSVC_DLL"
50330      has_space=`$ECHO "$path" | $GREP " "`
50331      if test "x$has_space" != x; then
50332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50333$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50335      fi
50336
50337      # Use eval to expand a potential ~
50338      eval path="$path"
50339      if test ! -f "$path" && test ! -d "$path"; then
50340        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50341      fi
50342
50343      if test -d "$path"; then
50344        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50345      else
50346        dir="`$DIRNAME "$path"`"
50347        base="`$BASENAME "$path"`"
50348        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50349      fi
50350    fi
50351  fi
50352
50353      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50354$as_echo_n "checking for $DLL_NAME... " >&6; }
50355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50356$as_echo "$MSVC_DLL" >&6; }
50357    else
50358      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50359$as_echo "incorrect, ignoring" >&6; }
50360      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50361$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50362    fi
50363  fi
50364
50365  fi
50366
50367  if test "x$MSVC_DLL" = x; then
50368    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50369    if test "x$VS100COMNTOOLS" != x; then
50370      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50371
50372  windows_path="$CYGWIN_VS_TOOLS_DIR"
50373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50374    unix_path=`$CYGPATH -u "$windows_path"`
50375    CYGWIN_VS_TOOLS_DIR="$unix_path"
50376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50378    CYGWIN_VS_TOOLS_DIR="$unix_path"
50379  fi
50380
50381      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50382        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50383	    | $GREP -i /x64/ | $HEAD --lines 1`
50384      else
50385        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50386	    | $GREP -i /x86/ | $HEAD --lines 1`
50387      fi
50388
50389  DLL_NAME="$DLL_NAME"
50390  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50391  METHOD="search of VS100COMNTOOLS"
50392  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50393    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50394$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50395
50396    # Need to check if the found msvcr is correct architecture
50397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50398$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50399    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50401      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50402      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50403      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50404        CORRECT_MSVCR_ARCH="PE32 executable"
50405      else
50406        CORRECT_MSVCR_ARCH="PE32+ executable"
50407      fi
50408    else
50409      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50410        CORRECT_MSVCR_ARCH=386
50411      else
50412        CORRECT_MSVCR_ARCH=x86-64
50413      fi
50414    fi
50415    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50417$as_echo "ok" >&6; }
50418      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50419
50420  # Only process if variable expands to non-empty
50421
50422  if test "x$MSVC_DLL" != x; then
50423    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50424
50425  # Input might be given as Windows format, start by converting to
50426  # unix format.
50427  path="$MSVC_DLL"
50428  new_path=`$CYGPATH -u "$path"`
50429
50430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50433  # "foo.exe" is OK but "foo" is an error.
50434  #
50435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50436  # It is also a way to make sure we got the proper file name for the real test later on.
50437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50438  if test "x$test_shortpath" = x; then
50439    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50440$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50441    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50442  fi
50443
50444  # Call helper function which possibly converts this using DOS-style short mode.
50445  # If so, the updated path is stored in $new_path.
50446
50447  input_path="$new_path"
50448  # Check if we need to convert this using DOS-style short mode. If the path
50449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50450  # take no chances and rewrite it.
50451  # Note: m4 eats our [], so we need to use [ and ] instead.
50452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50453  if test "x$has_forbidden_chars" != x; then
50454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50455    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50456    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50457    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50458      # Going to short mode and back again did indeed matter. Since short mode is
50459      # case insensitive, let's make it lowercase to improve readability.
50460      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50461      # Now convert it back to Unix-style (cygpath)
50462      input_path=`$CYGPATH -u "$shortmode_path"`
50463      new_path="$input_path"
50464    fi
50465  fi
50466
50467  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50468  if test "x$test_cygdrive_prefix" = x; then
50469    # As a simple fix, exclude /usr/bin since it's not a real path.
50470    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50471      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50472      # a path prefixed by /cygdrive for fixpath to work.
50473      new_path="$CYGWIN_ROOT_PATH$input_path"
50474    fi
50475  fi
50476
50477
50478  if test "x$path" != "x$new_path"; then
50479    MSVC_DLL="$new_path"
50480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50481$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50482  fi
50483
50484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50485
50486  path="$MSVC_DLL"
50487  has_colon=`$ECHO $path | $GREP ^.:`
50488  new_path="$path"
50489  if test "x$has_colon" = x; then
50490    # Not in mixed or Windows style, start by that.
50491    new_path=`cmd //c echo $path`
50492  fi
50493
50494
50495  input_path="$new_path"
50496  # Check if we need to convert this using DOS-style short mode. If the path
50497  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50498  # take no chances and rewrite it.
50499  # Note: m4 eats our [], so we need to use [ and ] instead.
50500  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50501  if test "x$has_forbidden_chars" != x; then
50502    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50503    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50504  fi
50505
50506
50507  windows_path="$new_path"
50508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50509    unix_path=`$CYGPATH -u "$windows_path"`
50510    new_path="$unix_path"
50511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50513    new_path="$unix_path"
50514  fi
50515
50516  if test "x$path" != "x$new_path"; then
50517    MSVC_DLL="$new_path"
50518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50519$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50520  fi
50521
50522  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50523  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50524
50525    else
50526      # We're on a unix platform. Hooray! :)
50527      path="$MSVC_DLL"
50528      has_space=`$ECHO "$path" | $GREP " "`
50529      if test "x$has_space" != x; then
50530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50531$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50532        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50533      fi
50534
50535      # Use eval to expand a potential ~
50536      eval path="$path"
50537      if test ! -f "$path" && test ! -d "$path"; then
50538        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50539      fi
50540
50541      if test -d "$path"; then
50542        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50543      else
50544        dir="`$DIRNAME "$path"`"
50545        base="`$BASENAME "$path"`"
50546        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50547      fi
50548    fi
50549  fi
50550
50551      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50552$as_echo_n "checking for $DLL_NAME... " >&6; }
50553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50554$as_echo "$MSVC_DLL" >&6; }
50555    else
50556      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50557$as_echo "incorrect, ignoring" >&6; }
50558      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50559$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50560    fi
50561  fi
50562
50563    fi
50564  fi
50565
50566  if test "x$MSVC_DLL" = x; then
50567    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50568    # (This was the original behaviour; kept since it might turn something up)
50569    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50570      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50571        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50572	    | $GREP x64 | $HEAD --lines 1`
50573      else
50574        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50575	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50576        if test "x$POSSIBLE_MSVC_DLL" = x; then
50577          # We're grasping at straws now...
50578          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50579	      | $HEAD --lines 1`
50580        fi
50581      fi
50582
50583
50584  DLL_NAME="$DLL_NAME"
50585  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50586  METHOD="search of VCINSTALLDIR"
50587  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50588    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50589$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50590
50591    # Need to check if the found msvcr is correct architecture
50592    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50593$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50594    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50596      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50597      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50598      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50599        CORRECT_MSVCR_ARCH="PE32 executable"
50600      else
50601        CORRECT_MSVCR_ARCH="PE32+ executable"
50602      fi
50603    else
50604      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50605        CORRECT_MSVCR_ARCH=386
50606      else
50607        CORRECT_MSVCR_ARCH=x86-64
50608      fi
50609    fi
50610    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50612$as_echo "ok" >&6; }
50613      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50614
50615  # Only process if variable expands to non-empty
50616
50617  if test "x$MSVC_DLL" != x; then
50618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50619
50620  # Input might be given as Windows format, start by converting to
50621  # unix format.
50622  path="$MSVC_DLL"
50623  new_path=`$CYGPATH -u "$path"`
50624
50625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50628  # "foo.exe" is OK but "foo" is an error.
50629  #
50630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50631  # It is also a way to make sure we got the proper file name for the real test later on.
50632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50633  if test "x$test_shortpath" = x; then
50634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50635$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50636    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50637  fi
50638
50639  # Call helper function which possibly converts this using DOS-style short mode.
50640  # If so, the updated path is stored in $new_path.
50641
50642  input_path="$new_path"
50643  # Check if we need to convert this using DOS-style short mode. If the path
50644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50645  # take no chances and rewrite it.
50646  # Note: m4 eats our [], so we need to use [ and ] instead.
50647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50648  if test "x$has_forbidden_chars" != x; then
50649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50653      # Going to short mode and back again did indeed matter. Since short mode is
50654      # case insensitive, let's make it lowercase to improve readability.
50655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50656      # Now convert it back to Unix-style (cygpath)
50657      input_path=`$CYGPATH -u "$shortmode_path"`
50658      new_path="$input_path"
50659    fi
50660  fi
50661
50662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50663  if test "x$test_cygdrive_prefix" = x; then
50664    # As a simple fix, exclude /usr/bin since it's not a real path.
50665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50667      # a path prefixed by /cygdrive for fixpath to work.
50668      new_path="$CYGWIN_ROOT_PATH$input_path"
50669    fi
50670  fi
50671
50672
50673  if test "x$path" != "x$new_path"; then
50674    MSVC_DLL="$new_path"
50675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50676$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50677  fi
50678
50679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50680
50681  path="$MSVC_DLL"
50682  has_colon=`$ECHO $path | $GREP ^.:`
50683  new_path="$path"
50684  if test "x$has_colon" = x; then
50685    # Not in mixed or Windows style, start by that.
50686    new_path=`cmd //c echo $path`
50687  fi
50688
50689
50690  input_path="$new_path"
50691  # Check if we need to convert this using DOS-style short mode. If the path
50692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50693  # take no chances and rewrite it.
50694  # Note: m4 eats our [], so we need to use [ and ] instead.
50695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50696  if test "x$has_forbidden_chars" != x; then
50697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50699  fi
50700
50701
50702  windows_path="$new_path"
50703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50704    unix_path=`$CYGPATH -u "$windows_path"`
50705    new_path="$unix_path"
50706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50708    new_path="$unix_path"
50709  fi
50710
50711  if test "x$path" != "x$new_path"; then
50712    MSVC_DLL="$new_path"
50713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50714$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50715  fi
50716
50717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50719
50720    else
50721      # We're on a unix platform. Hooray! :)
50722      path="$MSVC_DLL"
50723      has_space=`$ECHO "$path" | $GREP " "`
50724      if test "x$has_space" != x; then
50725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50726$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50728      fi
50729
50730      # Use eval to expand a potential ~
50731      eval path="$path"
50732      if test ! -f "$path" && test ! -d "$path"; then
50733        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50734      fi
50735
50736      if test -d "$path"; then
50737        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50738      else
50739        dir="`$DIRNAME "$path"`"
50740        base="`$BASENAME "$path"`"
50741        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50742      fi
50743    fi
50744  fi
50745
50746      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50747$as_echo_n "checking for $DLL_NAME... " >&6; }
50748      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50749$as_echo "$MSVC_DLL" >&6; }
50750    else
50751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50752$as_echo "incorrect, ignoring" >&6; }
50753      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50754$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50755    fi
50756  fi
50757
50758    fi
50759  fi
50760
50761  if test "x$MSVC_DLL" = x; then
50762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50763$as_echo_n "checking for $DLL_NAME... " >&6; }
50764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50765$as_echo "no" >&6; }
50766    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50767  fi
50768
50769      MSVCP_DLL="$MSVC_DLL"
50770    fi
50771
50772  fi
50773
50774  fi
50775
50776
50777  if test "x$NEEDS_LIB_X11" = xfalse; then
50778    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50779      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50780$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50781    fi
50782    X_CFLAGS=
50783    X_LIBS=
50784  else
50785
50786    if test "x${with_x}" = xno; then
50787      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50788    fi
50789
50790    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50791      # The user has specified a X11 base directory. Use it for includes and
50792      # libraries, unless explicitely overridden.
50793      if test "x$x_includes" = xNONE; then
50794        x_includes="${with_x}/include"
50795      fi
50796      if test "x$x_libraries" = xNONE; then
50797        x_libraries="${with_x}/lib"
50798      fi
50799    else
50800      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50801      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50802      # --x-libraries for the sysroot, if that seems to be correct.
50803      if test "x$SYSROOT" != "x"; then
50804        if test "x$x_includes" = xNONE; then
50805          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50806            x_includes="$SYSROOT/usr/X11R6/include"
50807          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50808            x_includes="$SYSROOT/usr/include"
50809          fi
50810        fi
50811        if test "x$x_libraries" = xNONE; then
50812          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50813            x_libraries="$SYSROOT/usr/X11R6/lib"
50814          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50815            x_libraries="$SYSROOT/usr/lib64"
50816          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50817            x_libraries="$SYSROOT/usr/lib"
50818          fi
50819        fi
50820      fi
50821    fi
50822
50823    # Now let autoconf do it's magic
50824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50825$as_echo_n "checking for X... " >&6; }
50826
50827
50828# Check whether --with-x was given.
50829if test "${with_x+set}" = set; then :
50830  withval=$with_x;
50831fi
50832
50833# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50834if test "x$with_x" = xno; then
50835  # The user explicitly disabled X.
50836  have_x=disabled
50837else
50838  case $x_includes,$x_libraries in #(
50839    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50840    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50841  $as_echo_n "(cached) " >&6
50842else
50843  # One or both of the vars are not set, and there is no cached value.
50844ac_x_includes=no ac_x_libraries=no
50845rm -f -r conftest.dir
50846if mkdir conftest.dir; then
50847  cd conftest.dir
50848  cat >Imakefile <<'_ACEOF'
50849incroot:
50850	@echo incroot='${INCROOT}'
50851usrlibdir:
50852	@echo usrlibdir='${USRLIBDIR}'
50853libdir:
50854	@echo libdir='${LIBDIR}'
50855_ACEOF
50856  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50857    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50858    for ac_var in incroot usrlibdir libdir; do
50859      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50860    done
50861    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50862    for ac_extension in a so sl dylib la dll; do
50863      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50864	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50865	ac_im_usrlibdir=$ac_im_libdir; break
50866      fi
50867    done
50868    # Screen out bogus values from the imake configuration.  They are
50869    # bogus both because they are the default anyway, and because
50870    # using them would break gcc on systems where it needs fixed includes.
50871    case $ac_im_incroot in
50872	/usr/include) ac_x_includes= ;;
50873	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50874    esac
50875    case $ac_im_usrlibdir in
50876	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50877	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50878    esac
50879  fi
50880  cd ..
50881  rm -f -r conftest.dir
50882fi
50883
50884# Standard set of common directories for X headers.
50885# Check X11 before X11Rn because it is often a symlink to the current release.
50886ac_x_header_dirs='
50887/usr/X11/include
50888/usr/X11R7/include
50889/usr/X11R6/include
50890/usr/X11R5/include
50891/usr/X11R4/include
50892
50893/usr/include/X11
50894/usr/include/X11R7
50895/usr/include/X11R6
50896/usr/include/X11R5
50897/usr/include/X11R4
50898
50899/usr/local/X11/include
50900/usr/local/X11R7/include
50901/usr/local/X11R6/include
50902/usr/local/X11R5/include
50903/usr/local/X11R4/include
50904
50905/usr/local/include/X11
50906/usr/local/include/X11R7
50907/usr/local/include/X11R6
50908/usr/local/include/X11R5
50909/usr/local/include/X11R4
50910
50911/usr/X386/include
50912/usr/x386/include
50913/usr/XFree86/include/X11
50914
50915/usr/include
50916/usr/local/include
50917/usr/unsupported/include
50918/usr/athena/include
50919/usr/local/x11r5/include
50920/usr/lpp/Xamples/include
50921
50922/usr/openwin/include
50923/usr/openwin/share/include'
50924
50925if test "$ac_x_includes" = no; then
50926  # Guess where to find include files, by looking for Xlib.h.
50927  # First, try using that file with no special directory specified.
50928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50929/* end confdefs.h.  */
50930#include <X11/Xlib.h>
50931_ACEOF
50932if ac_fn_cxx_try_cpp "$LINENO"; then :
50933  # We can compile using X headers with no special include directory.
50934ac_x_includes=
50935else
50936  for ac_dir in $ac_x_header_dirs; do
50937  if test -r "$ac_dir/X11/Xlib.h"; then
50938    ac_x_includes=$ac_dir
50939    break
50940  fi
50941done
50942fi
50943rm -f conftest.err conftest.i conftest.$ac_ext
50944fi # $ac_x_includes = no
50945
50946if test "$ac_x_libraries" = no; then
50947  # Check for the libraries.
50948  # See if we find them without any special options.
50949  # Don't add to $LIBS permanently.
50950  ac_save_LIBS=$LIBS
50951  LIBS="-lX11 $LIBS"
50952  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50953/* end confdefs.h.  */
50954#include <X11/Xlib.h>
50955int
50956main ()
50957{
50958XrmInitialize ()
50959  ;
50960  return 0;
50961}
50962_ACEOF
50963if ac_fn_cxx_try_link "$LINENO"; then :
50964  LIBS=$ac_save_LIBS
50965# We can link X programs with no special library path.
50966ac_x_libraries=
50967else
50968  LIBS=$ac_save_LIBS
50969for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50970do
50971  # Don't even attempt the hair of trying to link an X program!
50972  for ac_extension in a so sl dylib la dll; do
50973    if test -r "$ac_dir/libX11.$ac_extension"; then
50974      ac_x_libraries=$ac_dir
50975      break 2
50976    fi
50977  done
50978done
50979fi
50980rm -f core conftest.err conftest.$ac_objext \
50981    conftest$ac_exeext conftest.$ac_ext
50982fi # $ac_x_libraries = no
50983
50984case $ac_x_includes,$ac_x_libraries in #(
50985  no,* | *,no | *\'*)
50986    # Didn't find X, or a directory has "'" in its name.
50987    ac_cv_have_x="have_x=no";; #(
50988  *)
50989    # Record where we found X for the cache.
50990    ac_cv_have_x="have_x=yes\
50991	ac_x_includes='$ac_x_includes'\
50992	ac_x_libraries='$ac_x_libraries'"
50993esac
50994fi
50995;; #(
50996    *) have_x=yes;;
50997  esac
50998  eval "$ac_cv_have_x"
50999fi # $with_x != no
51000
51001if test "$have_x" != yes; then
51002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
51003$as_echo "$have_x" >&6; }
51004  no_x=yes
51005else
51006  # If each of the values was on the command line, it overrides each guess.
51007  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
51008  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
51009  # Update the cache value to reflect the command line values.
51010  ac_cv_have_x="have_x=yes\
51011	ac_x_includes='$x_includes'\
51012	ac_x_libraries='$x_libraries'"
51013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
51014$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
51015fi
51016
51017    if test "$no_x" = yes; then
51018  # Not all programs may use this symbol, but it does not hurt to define it.
51019
51020$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
51021
51022  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
51023else
51024  if test -n "$x_includes"; then
51025    X_CFLAGS="$X_CFLAGS -I$x_includes"
51026  fi
51027
51028  # It would also be nice to do this for all -L options, not just this one.
51029  if test -n "$x_libraries"; then
51030    X_LIBS="$X_LIBS -L$x_libraries"
51031    # For Solaris; some versions of Sun CC require a space after -R and
51032    # others require no space.  Words are not sufficient . . . .
51033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
51034$as_echo_n "checking whether -R must be followed by a space... " >&6; }
51035    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
51036    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
51037    ac_cxx_werror_flag=yes
51038    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51039/* end confdefs.h.  */
51040
51041int
51042main ()
51043{
51044
51045  ;
51046  return 0;
51047}
51048_ACEOF
51049if ac_fn_cxx_try_link "$LINENO"; then :
51050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51051$as_echo "no" >&6; }
51052       X_LIBS="$X_LIBS -R$x_libraries"
51053else
51054  LIBS="$ac_xsave_LIBS -R $x_libraries"
51055       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51056/* end confdefs.h.  */
51057
51058int
51059main ()
51060{
51061
51062  ;
51063  return 0;
51064}
51065_ACEOF
51066if ac_fn_cxx_try_link "$LINENO"; then :
51067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51068$as_echo "yes" >&6; }
51069	  X_LIBS="$X_LIBS -R $x_libraries"
51070else
51071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
51072$as_echo "neither works" >&6; }
51073fi
51074rm -f core conftest.err conftest.$ac_objext \
51075    conftest$ac_exeext conftest.$ac_ext
51076fi
51077rm -f core conftest.err conftest.$ac_objext \
51078    conftest$ac_exeext conftest.$ac_ext
51079    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
51080    LIBS=$ac_xsave_LIBS
51081  fi
51082
51083  # Check for system-dependent libraries X programs must link with.
51084  # Do this before checking for the system-independent R6 libraries
51085  # (-lICE), since we may need -lsocket or whatever for X linking.
51086
51087  if test "$ISC" = yes; then
51088    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
51089  else
51090    # Martyn Johnson says this is needed for Ultrix, if the X
51091    # libraries were built with DECnet support.  And Karl Berry says
51092    # the Alpha needs dnet_stub (dnet does not exist).
51093    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
51094    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51095/* end confdefs.h.  */
51096
51097/* Override any GCC internal prototype to avoid an error.
51098   Use char because int might match the return type of a GCC
51099   builtin and then its argument prototype would still apply.  */
51100#ifdef __cplusplus
51101extern "C"
51102#endif
51103char XOpenDisplay ();
51104int
51105main ()
51106{
51107return XOpenDisplay ();
51108  ;
51109  return 0;
51110}
51111_ACEOF
51112if ac_fn_cxx_try_link "$LINENO"; then :
51113
51114else
51115  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
51116$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
51117if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
51118  $as_echo_n "(cached) " >&6
51119else
51120  ac_check_lib_save_LIBS=$LIBS
51121LIBS="-ldnet  $LIBS"
51122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51123/* end confdefs.h.  */
51124
51125/* Override any GCC internal prototype to avoid an error.
51126   Use char because int might match the return type of a GCC
51127   builtin and then its argument prototype would still apply.  */
51128#ifdef __cplusplus
51129extern "C"
51130#endif
51131char dnet_ntoa ();
51132int
51133main ()
51134{
51135return dnet_ntoa ();
51136  ;
51137  return 0;
51138}
51139_ACEOF
51140if ac_fn_cxx_try_link "$LINENO"; then :
51141  ac_cv_lib_dnet_dnet_ntoa=yes
51142else
51143  ac_cv_lib_dnet_dnet_ntoa=no
51144fi
51145rm -f core conftest.err conftest.$ac_objext \
51146    conftest$ac_exeext conftest.$ac_ext
51147LIBS=$ac_check_lib_save_LIBS
51148fi
51149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
51150$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
51151if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
51152  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
51153fi
51154
51155    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
51156      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
51157$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
51158if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
51159  $as_echo_n "(cached) " >&6
51160else
51161  ac_check_lib_save_LIBS=$LIBS
51162LIBS="-ldnet_stub  $LIBS"
51163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51164/* end confdefs.h.  */
51165
51166/* Override any GCC internal prototype to avoid an error.
51167   Use char because int might match the return type of a GCC
51168   builtin and then its argument prototype would still apply.  */
51169#ifdef __cplusplus
51170extern "C"
51171#endif
51172char dnet_ntoa ();
51173int
51174main ()
51175{
51176return dnet_ntoa ();
51177  ;
51178  return 0;
51179}
51180_ACEOF
51181if ac_fn_cxx_try_link "$LINENO"; then :
51182  ac_cv_lib_dnet_stub_dnet_ntoa=yes
51183else
51184  ac_cv_lib_dnet_stub_dnet_ntoa=no
51185fi
51186rm -f core conftest.err conftest.$ac_objext \
51187    conftest$ac_exeext conftest.$ac_ext
51188LIBS=$ac_check_lib_save_LIBS
51189fi
51190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
51191$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
51192if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
51193  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
51194fi
51195
51196    fi
51197fi
51198rm -f core conftest.err conftest.$ac_objext \
51199    conftest$ac_exeext conftest.$ac_ext
51200    LIBS="$ac_xsave_LIBS"
51201
51202    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
51203    # to get the SysV transport functions.
51204    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
51205    # needs -lnsl.
51206    # The nsl library prevents programs from opening the X display
51207    # on Irix 5.2, according to T.E. Dickey.
51208    # The functions gethostbyname, getservbyname, and inet_addr are
51209    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
51210    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
51211if test "x$ac_cv_func_gethostbyname" = xyes; then :
51212
51213fi
51214
51215    if test $ac_cv_func_gethostbyname = no; then
51216      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
51217$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
51218if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
51219  $as_echo_n "(cached) " >&6
51220else
51221  ac_check_lib_save_LIBS=$LIBS
51222LIBS="-lnsl  $LIBS"
51223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51224/* end confdefs.h.  */
51225
51226/* Override any GCC internal prototype to avoid an error.
51227   Use char because int might match the return type of a GCC
51228   builtin and then its argument prototype would still apply.  */
51229#ifdef __cplusplus
51230extern "C"
51231#endif
51232char gethostbyname ();
51233int
51234main ()
51235{
51236return gethostbyname ();
51237  ;
51238  return 0;
51239}
51240_ACEOF
51241if ac_fn_cxx_try_link "$LINENO"; then :
51242  ac_cv_lib_nsl_gethostbyname=yes
51243else
51244  ac_cv_lib_nsl_gethostbyname=no
51245fi
51246rm -f core conftest.err conftest.$ac_objext \
51247    conftest$ac_exeext conftest.$ac_ext
51248LIBS=$ac_check_lib_save_LIBS
51249fi
51250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
51251$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
51252if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
51253  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
51254fi
51255
51256      if test $ac_cv_lib_nsl_gethostbyname = no; then
51257	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
51258$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
51259if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
51260  $as_echo_n "(cached) " >&6
51261else
51262  ac_check_lib_save_LIBS=$LIBS
51263LIBS="-lbsd  $LIBS"
51264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51265/* end confdefs.h.  */
51266
51267/* Override any GCC internal prototype to avoid an error.
51268   Use char because int might match the return type of a GCC
51269   builtin and then its argument prototype would still apply.  */
51270#ifdef __cplusplus
51271extern "C"
51272#endif
51273char gethostbyname ();
51274int
51275main ()
51276{
51277return gethostbyname ();
51278  ;
51279  return 0;
51280}
51281_ACEOF
51282if ac_fn_cxx_try_link "$LINENO"; then :
51283  ac_cv_lib_bsd_gethostbyname=yes
51284else
51285  ac_cv_lib_bsd_gethostbyname=no
51286fi
51287rm -f core conftest.err conftest.$ac_objext \
51288    conftest$ac_exeext conftest.$ac_ext
51289LIBS=$ac_check_lib_save_LIBS
51290fi
51291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51292$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51293if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51294  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51295fi
51296
51297      fi
51298    fi
51299
51300    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51301    # socket/setsockopt and other routines are undefined under SCO ODT
51302    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51303    # on later versions), says Simon Leinen: it contains gethostby*
51304    # variants that don't use the name server (or something).  -lsocket
51305    # must be given before -lnsl if both are needed.  We assume that
51306    # if connect needs -lnsl, so does gethostbyname.
51307    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51308if test "x$ac_cv_func_connect" = xyes; then :
51309
51310fi
51311
51312    if test $ac_cv_func_connect = no; then
51313      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51314$as_echo_n "checking for connect in -lsocket... " >&6; }
51315if ${ac_cv_lib_socket_connect+:} false; then :
51316  $as_echo_n "(cached) " >&6
51317else
51318  ac_check_lib_save_LIBS=$LIBS
51319LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51321/* end confdefs.h.  */
51322
51323/* Override any GCC internal prototype to avoid an error.
51324   Use char because int might match the return type of a GCC
51325   builtin and then its argument prototype would still apply.  */
51326#ifdef __cplusplus
51327extern "C"
51328#endif
51329char connect ();
51330int
51331main ()
51332{
51333return connect ();
51334  ;
51335  return 0;
51336}
51337_ACEOF
51338if ac_fn_cxx_try_link "$LINENO"; then :
51339  ac_cv_lib_socket_connect=yes
51340else
51341  ac_cv_lib_socket_connect=no
51342fi
51343rm -f core conftest.err conftest.$ac_objext \
51344    conftest$ac_exeext conftest.$ac_ext
51345LIBS=$ac_check_lib_save_LIBS
51346fi
51347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51348$as_echo "$ac_cv_lib_socket_connect" >&6; }
51349if test "x$ac_cv_lib_socket_connect" = xyes; then :
51350  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51351fi
51352
51353    fi
51354
51355    # Guillermo Gomez says -lposix is necessary on A/UX.
51356    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51357if test "x$ac_cv_func_remove" = xyes; then :
51358
51359fi
51360
51361    if test $ac_cv_func_remove = no; then
51362      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51363$as_echo_n "checking for remove in -lposix... " >&6; }
51364if ${ac_cv_lib_posix_remove+:} false; then :
51365  $as_echo_n "(cached) " >&6
51366else
51367  ac_check_lib_save_LIBS=$LIBS
51368LIBS="-lposix  $LIBS"
51369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51370/* end confdefs.h.  */
51371
51372/* Override any GCC internal prototype to avoid an error.
51373   Use char because int might match the return type of a GCC
51374   builtin and then its argument prototype would still apply.  */
51375#ifdef __cplusplus
51376extern "C"
51377#endif
51378char remove ();
51379int
51380main ()
51381{
51382return remove ();
51383  ;
51384  return 0;
51385}
51386_ACEOF
51387if ac_fn_cxx_try_link "$LINENO"; then :
51388  ac_cv_lib_posix_remove=yes
51389else
51390  ac_cv_lib_posix_remove=no
51391fi
51392rm -f core conftest.err conftest.$ac_objext \
51393    conftest$ac_exeext conftest.$ac_ext
51394LIBS=$ac_check_lib_save_LIBS
51395fi
51396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51397$as_echo "$ac_cv_lib_posix_remove" >&6; }
51398if test "x$ac_cv_lib_posix_remove" = xyes; then :
51399  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51400fi
51401
51402    fi
51403
51404    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51405    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51406if test "x$ac_cv_func_shmat" = xyes; then :
51407
51408fi
51409
51410    if test $ac_cv_func_shmat = no; then
51411      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51412$as_echo_n "checking for shmat in -lipc... " >&6; }
51413if ${ac_cv_lib_ipc_shmat+:} false; then :
51414  $as_echo_n "(cached) " >&6
51415else
51416  ac_check_lib_save_LIBS=$LIBS
51417LIBS="-lipc  $LIBS"
51418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51419/* end confdefs.h.  */
51420
51421/* Override any GCC internal prototype to avoid an error.
51422   Use char because int might match the return type of a GCC
51423   builtin and then its argument prototype would still apply.  */
51424#ifdef __cplusplus
51425extern "C"
51426#endif
51427char shmat ();
51428int
51429main ()
51430{
51431return shmat ();
51432  ;
51433  return 0;
51434}
51435_ACEOF
51436if ac_fn_cxx_try_link "$LINENO"; then :
51437  ac_cv_lib_ipc_shmat=yes
51438else
51439  ac_cv_lib_ipc_shmat=no
51440fi
51441rm -f core conftest.err conftest.$ac_objext \
51442    conftest$ac_exeext conftest.$ac_ext
51443LIBS=$ac_check_lib_save_LIBS
51444fi
51445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51446$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51447if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51448  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51449fi
51450
51451    fi
51452  fi
51453
51454  # Check for libraries that X11R6 Xt/Xaw programs need.
51455  ac_save_LDFLAGS=$LDFLAGS
51456  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51457  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51458  # check for ICE first), but we must link in the order -lSM -lICE or
51459  # we get undefined symbols.  So assume we have SM if we have ICE.
51460  # These have to be linked with before -lX11, unlike the other
51461  # libraries we check for below, so use a different variable.
51462  # John Interrante, Karl Berry
51463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51464$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51465if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51466  $as_echo_n "(cached) " >&6
51467else
51468  ac_check_lib_save_LIBS=$LIBS
51469LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51471/* end confdefs.h.  */
51472
51473/* Override any GCC internal prototype to avoid an error.
51474   Use char because int might match the return type of a GCC
51475   builtin and then its argument prototype would still apply.  */
51476#ifdef __cplusplus
51477extern "C"
51478#endif
51479char IceConnectionNumber ();
51480int
51481main ()
51482{
51483return IceConnectionNumber ();
51484  ;
51485  return 0;
51486}
51487_ACEOF
51488if ac_fn_cxx_try_link "$LINENO"; then :
51489  ac_cv_lib_ICE_IceConnectionNumber=yes
51490else
51491  ac_cv_lib_ICE_IceConnectionNumber=no
51492fi
51493rm -f core conftest.err conftest.$ac_objext \
51494    conftest$ac_exeext conftest.$ac_ext
51495LIBS=$ac_check_lib_save_LIBS
51496fi
51497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51498$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51499if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51500  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51501fi
51502
51503  LDFLAGS=$ac_save_LDFLAGS
51504
51505fi
51506
51507
51508    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51509    # this doesn't make sense so we remove it.
51510    if test "x$COMPILE_TYPE" = xcross; then
51511      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51512    fi
51513
51514    if test "x$no_x" = xyes; then
51515
51516  # Print a helpful message on how to acquire the necessary build dependency.
51517  # x11 is the help tag: freetype, cups, alsa etc
51518  MISSING_DEPENDENCY=x11
51519
51520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51521    cygwin_help $MISSING_DEPENDENCY
51522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51523    msys_help $MISSING_DEPENDENCY
51524  else
51525    PKGHANDLER_COMMAND=
51526
51527    case $PKGHANDLER in
51528      apt-get)
51529        apt_help     $MISSING_DEPENDENCY ;;
51530      yum)
51531        yum_help     $MISSING_DEPENDENCY ;;
51532      port)
51533        port_help    $MISSING_DEPENDENCY ;;
51534      pkgutil)
51535        pkgutil_help $MISSING_DEPENDENCY ;;
51536      pkgadd)
51537        pkgadd_help  $MISSING_DEPENDENCY ;;
51538    esac
51539
51540    if test "x$PKGHANDLER_COMMAND" != x; then
51541      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51542    fi
51543  fi
51544
51545      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51546    fi
51547
51548    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51549      OPENWIN_HOME="/usr/openwin"
51550      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51551      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51552          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51553          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51554          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51555    fi
51556
51557    ac_ext=c
51558ac_cpp='$CPP $CPPFLAGS'
51559ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51560ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51561ac_compiler_gnu=$ac_cv_c_compiler_gnu
51562
51563    OLD_CFLAGS="$CFLAGS"
51564    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51565
51566    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51567    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51568do :
51569  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51570ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51571          # include <X11/Xlib.h>
51572          # include <X11/Xutil.h>
51573
51574
51575"
51576if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51577  cat >>confdefs.h <<_ACEOF
51578#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51579_ACEOF
51580 X11_HEADERS_OK=yes
51581else
51582  X11_HEADERS_OK=no; break
51583fi
51584
51585done
51586
51587
51588    if test "x$X11_HEADERS_OK" = xno; then
51589
51590  # Print a helpful message on how to acquire the necessary build dependency.
51591  # x11 is the help tag: freetype, cups, alsa etc
51592  MISSING_DEPENDENCY=x11
51593
51594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51595    cygwin_help $MISSING_DEPENDENCY
51596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51597    msys_help $MISSING_DEPENDENCY
51598  else
51599    PKGHANDLER_COMMAND=
51600
51601    case $PKGHANDLER in
51602      apt-get)
51603        apt_help     $MISSING_DEPENDENCY ;;
51604      yum)
51605        yum_help     $MISSING_DEPENDENCY ;;
51606      port)
51607        port_help    $MISSING_DEPENDENCY ;;
51608      pkgutil)
51609        pkgutil_help $MISSING_DEPENDENCY ;;
51610      pkgadd)
51611        pkgadd_help  $MISSING_DEPENDENCY ;;
51612    esac
51613
51614    if test "x$PKGHANDLER_COMMAND" != x; then
51615      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51616    fi
51617  fi
51618
51619      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51620    fi
51621
51622    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51623    # defined in libawt_xawt.
51624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51625$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51626    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51627/* end confdefs.h.  */
51628#include <X11/extensions/Xrender.h>
51629int
51630main ()
51631{
51632XLinearGradient x;
51633  ;
51634  return 0;
51635}
51636_ACEOF
51637if ac_fn_c_try_compile "$LINENO"; then :
51638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51639$as_echo "yes" >&6; }
51640else
51641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51642$as_echo "no" >&6; }
51643         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51644fi
51645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51646
51647    CFLAGS="$OLD_CFLAGS"
51648    ac_ext=cpp
51649ac_cpp='$CXXCPP $CPPFLAGS'
51650ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51651ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51652ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51653
51654  fi # NEEDS_LIB_X11
51655
51656
51657
51658
51659
51660
51661# Check whether --with-cups was given.
51662if test "${with_cups+set}" = set; then :
51663  withval=$with_cups;
51664fi
51665
51666
51667# Check whether --with-cups-include was given.
51668if test "${with_cups_include+set}" = set; then :
51669  withval=$with_cups_include;
51670fi
51671
51672
51673  if test "x$NEEDS_LIB_CUPS" = xfalse; then
51674    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51675        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51676      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51677$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51678    fi
51679    CUPS_CFLAGS=
51680  else
51681    CUPS_FOUND=no
51682
51683    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51684      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51685    fi
51686
51687    if test "x${with_cups}" != x; then
51688      CUPS_CFLAGS="-I${with_cups}/include"
51689      CUPS_FOUND=yes
51690    fi
51691    if test "x${with_cups_include}" != x; then
51692      CUPS_CFLAGS="-I${with_cups_include}"
51693      CUPS_FOUND=yes
51694    fi
51695    if test "x$CUPS_FOUND" = xno; then
51696      # Are the cups headers installed in the default /usr/include location?
51697      for ac_header in cups/cups.h cups/ppd.h
51698do :
51699  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51700ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51701if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51702  cat >>confdefs.h <<_ACEOF
51703#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51704_ACEOF
51705
51706          CUPS_FOUND=yes
51707          CUPS_CFLAGS=
51708          DEFAULT_CUPS=yes
51709
51710fi
51711
51712done
51713
51714    fi
51715    if test "x$CUPS_FOUND" = xno; then
51716      # Getting nervous now? Lets poke around for standard Solaris third-party
51717      # package installation locations.
51718      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51719$as_echo_n "checking for cups headers... " >&6; }
51720      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51721        # An SFW package seems to be installed!
51722        CUPS_FOUND=yes
51723        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51724      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51725        # A CSW package seems to be installed!
51726        CUPS_FOUND=yes
51727        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51728      fi
51729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51730$as_echo "$CUPS_FOUND" >&6; }
51731    fi
51732    if test "x$CUPS_FOUND" = xno; then
51733
51734  # Print a helpful message on how to acquire the necessary build dependency.
51735  # cups is the help tag: freetype, cups, alsa etc
51736  MISSING_DEPENDENCY=cups
51737
51738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51739    cygwin_help $MISSING_DEPENDENCY
51740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51741    msys_help $MISSING_DEPENDENCY
51742  else
51743    PKGHANDLER_COMMAND=
51744
51745    case $PKGHANDLER in
51746      apt-get)
51747        apt_help     $MISSING_DEPENDENCY ;;
51748      yum)
51749        yum_help     $MISSING_DEPENDENCY ;;
51750      port)
51751        port_help    $MISSING_DEPENDENCY ;;
51752      pkgutil)
51753        pkgutil_help $MISSING_DEPENDENCY ;;
51754      pkgadd)
51755        pkgadd_help  $MISSING_DEPENDENCY ;;
51756    esac
51757
51758    if test "x$PKGHANDLER_COMMAND" != x; then
51759      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51760    fi
51761  fi
51762
51763      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51764    fi
51765  fi
51766
51767
51768
51769
51770
51771# Check whether --with-freetype was given.
51772if test "${with_freetype+set}" = set; then :
51773  withval=$with_freetype;
51774fi
51775
51776
51777# Check whether --with-freetype-include was given.
51778if test "${with_freetype_include+set}" = set; then :
51779  withval=$with_freetype_include;
51780fi
51781
51782
51783# Check whether --with-freetype-lib was given.
51784if test "${with_freetype_lib+set}" = set; then :
51785  withval=$with_freetype_lib;
51786fi
51787
51788
51789# Check whether --with-freetype-src was given.
51790if test "${with_freetype_src+set}" = set; then :
51791  withval=$with_freetype_src;
51792fi
51793
51794  # Check whether --enable-freetype-bundling was given.
51795if test "${enable_freetype_bundling+set}" = set; then :
51796  enableval=$enable_freetype_bundling;
51797fi
51798
51799
51800  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51801  FREETYPE_BASE_NAME=freetype
51802  FREETYPE_CFLAGS=
51803  FREETYPE_LIBS=
51804  FREETYPE_BUNDLE_LIB_PATH=
51805
51806  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51807    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51808        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51809        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51810        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51811      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51812$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51813    fi
51814    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51815      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51816$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51817    fi
51818  else
51819    # freetype is needed to build; go get it!
51820
51821    BUNDLE_FREETYPE="$enable_freetype_bundling"
51822
51823    if  test "x$with_freetype_src" != x; then
51824      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51825        # Try to build freetype if --with-freetype-src was given on Windows
51826
51827  FREETYPE_SRC_PATH="$with_freetype_src"
51828  BUILD_FREETYPE=yes
51829
51830  # Check if the freetype sources are acessible..
51831  if ! test -d $FREETYPE_SRC_PATH; then
51832    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
51833$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51834    BUILD_FREETYPE=no
51835  fi
51836  # ..and contain a vc2010 project file
51837  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51838  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51839    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
51840$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51841    BUILD_FREETYPE=no
51842  fi
51843  # Now check if configure found a version of 'msbuild.exe'
51844  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51845    { $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
51846$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;}
51847    BUILD_FREETYPE=no
51848  fi
51849
51850  # Ready to go..
51851  if test "x$BUILD_FREETYPE" = xyes; then
51852    # msbuild requires trailing slashes for output directories
51853    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51854    freetype_lib_path_unix="$freetype_lib_path"
51855    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51856
51857  unix_path="$vcxproj_path"
51858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51859    windows_path=`$CYGPATH -m "$unix_path"`
51860    vcxproj_path="$windows_path"
51861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51862    windows_path=`cmd //c echo $unix_path`
51863    vcxproj_path="$windows_path"
51864  fi
51865
51866
51867  unix_path="$freetype_lib_path"
51868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51869    windows_path=`$CYGPATH -m "$unix_path"`
51870    freetype_lib_path="$windows_path"
51871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51872    windows_path=`cmd //c echo $unix_path`
51873    freetype_lib_path="$windows_path"
51874  fi
51875
51876
51877  unix_path="$freetype_obj_path"
51878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51879    windows_path=`$CYGPATH -m "$unix_path"`
51880    freetype_obj_path="$windows_path"
51881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51882    windows_path=`cmd //c echo $unix_path`
51883    freetype_obj_path="$windows_path"
51884  fi
51885
51886    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51887      freetype_platform=x64
51888    else
51889      freetype_platform=win32
51890    fi
51891
51892    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51893    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51894    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51895    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51896    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51897$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51898
51899    # First we try to build the freetype.dll
51900    $ECHO -e "@echo off\n"\
51901        "$MSBUILD $vcxproj_path "\
51902        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51903        "/p:Configuration=\"Release Multithreaded\" "\
51904        "/p:Platform=$freetype_platform "\
51905        "/p:ConfigurationType=DynamicLibrary "\
51906        "/p:TargetName=freetype "\
51907        "/p:OutDir=\"$freetype_lib_path\" "\
51908        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51909    cmd /c freetype.bat
51910
51911    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51912      # If that succeeds we also build freetype.lib
51913      $ECHO -e "@echo off\n"\
51914          "$MSBUILD $vcxproj_path "\
51915          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51916          "/p:Configuration=\"Release Multithreaded\" "\
51917          "/p:Platform=$freetype_platform "\
51918          "/p:ConfigurationType=StaticLibrary "\
51919          "/p:TargetName=freetype "\
51920          "/p:OutDir=\"$freetype_lib_path\" "\
51921          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51922      cmd /c freetype.bat
51923
51924      if test -s "$freetype_lib_path_unix/freetype.lib"; then
51925        # Once we build both, lib and dll, set freetype lib and include path appropriately
51926        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51927        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51928        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51929$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51930      else
51931        BUILD_FREETYPE=no
51932      fi
51933    else
51934      BUILD_FREETYPE=no
51935    fi
51936  fi
51937
51938        if test "x$BUILD_FREETYPE" = xyes; then
51939          # Okay, we built it. Check that it works.
51940
51941  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51942  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51943  METHOD="--with-freetype-src"
51944
51945  # Let's start with an optimistic view of the world :-)
51946  FOUND_FREETYPE=yes
51947
51948  # First look for the canonical freetype main include file ft2build.h.
51949  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51950    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51951    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51952    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51953      # Fail.
51954      FOUND_FREETYPE=no
51955    fi
51956  fi
51957
51958  if test "x$FOUND_FREETYPE" = xyes; then
51959    # Include file found, let's continue the sanity check.
51960    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51961$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51962
51963    # Reset to default value
51964    FREETYPE_BASE_NAME=freetype
51965    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51966    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51967      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51968          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51969        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51970        # for the .6 version explicitly.
51971        FREETYPE_BASE_NAME=freetype.6
51972        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51973        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51974$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51975      else
51976        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51977$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51978        FOUND_FREETYPE=no
51979      fi
51980    else
51981      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51982        # On Windows, we will need both .lib and .dll file.
51983        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51984          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51985$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51986          FOUND_FREETYPE=no
51987        fi
51988      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51989          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51990        # Found lib in isa dir, use that instead.
51991        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51992        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51993$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51994      fi
51995    fi
51996  fi
51997
51998  if test "x$FOUND_FREETYPE" = xyes; then
51999
52000  # Only process if variable expands to non-empty
52001
52002  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52004
52005  # Input might be given as Windows format, start by converting to
52006  # unix format.
52007  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52008  new_path=`$CYGPATH -u "$path"`
52009
52010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52013  # "foo.exe" is OK but "foo" is an error.
52014  #
52015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52016  # It is also a way to make sure we got the proper file name for the real test later on.
52017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52018  if test "x$test_shortpath" = x; then
52019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52021    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52022  fi
52023
52024  # Call helper function which possibly converts this using DOS-style short mode.
52025  # If so, the updated path is stored in $new_path.
52026
52027  input_path="$new_path"
52028  # Check if we need to convert this using DOS-style short mode. If the path
52029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52030  # take no chances and rewrite it.
52031  # Note: m4 eats our [], so we need to use [ and ] instead.
52032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52033  if test "x$has_forbidden_chars" != x; then
52034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52038      # Going to short mode and back again did indeed matter. Since short mode is
52039      # case insensitive, let's make it lowercase to improve readability.
52040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52041      # Now convert it back to Unix-style (cygpath)
52042      input_path=`$CYGPATH -u "$shortmode_path"`
52043      new_path="$input_path"
52044    fi
52045  fi
52046
52047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52048  if test "x$test_cygdrive_prefix" = x; then
52049    # As a simple fix, exclude /usr/bin since it's not a real path.
52050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52052      # a path prefixed by /cygdrive for fixpath to work.
52053      new_path="$CYGWIN_ROOT_PATH$input_path"
52054    fi
52055  fi
52056
52057
52058  if test "x$path" != "x$new_path"; then
52059    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52061$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52062  fi
52063
52064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52065
52066  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52067  has_colon=`$ECHO $path | $GREP ^.:`
52068  new_path="$path"
52069  if test "x$has_colon" = x; then
52070    # Not in mixed or Windows style, start by that.
52071    new_path=`cmd //c echo $path`
52072  fi
52073
52074
52075  input_path="$new_path"
52076  # Check if we need to convert this using DOS-style short mode. If the path
52077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52078  # take no chances and rewrite it.
52079  # Note: m4 eats our [], so we need to use [ and ] instead.
52080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52081  if test "x$has_forbidden_chars" != x; then
52082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52084  fi
52085
52086
52087  windows_path="$new_path"
52088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52089    unix_path=`$CYGPATH -u "$windows_path"`
52090    new_path="$unix_path"
52091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52093    new_path="$unix_path"
52094  fi
52095
52096  if test "x$path" != "x$new_path"; then
52097    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52099$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52100  fi
52101
52102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52104
52105    else
52106      # We're on a unix platform. Hooray! :)
52107      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52108      has_space=`$ECHO "$path" | $GREP " "`
52109      if test "x$has_space" != x; then
52110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52111$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52112        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52113      fi
52114
52115      # Use eval to expand a potential ~
52116      eval path="$path"
52117      if test ! -f "$path" && test ! -d "$path"; then
52118        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52119      fi
52120
52121      if test -d "$path"; then
52122        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52123      else
52124        dir="`$DIRNAME "$path"`"
52125        base="`$BASENAME "$path"`"
52126        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52127      fi
52128    fi
52129  fi
52130
52131
52132  # Only process if variable expands to non-empty
52133
52134  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52135    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52136
52137  # Input might be given as Windows format, start by converting to
52138  # unix format.
52139  path="$POTENTIAL_FREETYPE_LIB_PATH"
52140  new_path=`$CYGPATH -u "$path"`
52141
52142  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52143  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52144  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52145  # "foo.exe" is OK but "foo" is an error.
52146  #
52147  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52148  # It is also a way to make sure we got the proper file name for the real test later on.
52149  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52150  if test "x$test_shortpath" = x; then
52151    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52153    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52154  fi
52155
52156  # Call helper function which possibly converts this using DOS-style short mode.
52157  # If so, the updated path is stored in $new_path.
52158
52159  input_path="$new_path"
52160  # Check if we need to convert this using DOS-style short mode. If the path
52161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52162  # take no chances and rewrite it.
52163  # Note: m4 eats our [], so we need to use [ and ] instead.
52164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52165  if test "x$has_forbidden_chars" != x; then
52166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52167    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52168    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52169    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52170      # Going to short mode and back again did indeed matter. Since short mode is
52171      # case insensitive, let's make it lowercase to improve readability.
52172      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52173      # Now convert it back to Unix-style (cygpath)
52174      input_path=`$CYGPATH -u "$shortmode_path"`
52175      new_path="$input_path"
52176    fi
52177  fi
52178
52179  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52180  if test "x$test_cygdrive_prefix" = x; then
52181    # As a simple fix, exclude /usr/bin since it's not a real path.
52182    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52183      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52184      # a path prefixed by /cygdrive for fixpath to work.
52185      new_path="$CYGWIN_ROOT_PATH$input_path"
52186    fi
52187  fi
52188
52189
52190  if test "x$path" != "x$new_path"; then
52191    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52192    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52193$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52194  fi
52195
52196    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52197
52198  path="$POTENTIAL_FREETYPE_LIB_PATH"
52199  has_colon=`$ECHO $path | $GREP ^.:`
52200  new_path="$path"
52201  if test "x$has_colon" = x; then
52202    # Not in mixed or Windows style, start by that.
52203    new_path=`cmd //c echo $path`
52204  fi
52205
52206
52207  input_path="$new_path"
52208  # Check if we need to convert this using DOS-style short mode. If the path
52209  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52210  # take no chances and rewrite it.
52211  # Note: m4 eats our [], so we need to use [ and ] instead.
52212  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52213  if test "x$has_forbidden_chars" != x; then
52214    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52215    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52216  fi
52217
52218
52219  windows_path="$new_path"
52220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52221    unix_path=`$CYGPATH -u "$windows_path"`
52222    new_path="$unix_path"
52223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52225    new_path="$unix_path"
52226  fi
52227
52228  if test "x$path" != "x$new_path"; then
52229    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52231$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52232  fi
52233
52234  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52235  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52236
52237    else
52238      # We're on a unix platform. Hooray! :)
52239      path="$POTENTIAL_FREETYPE_LIB_PATH"
52240      has_space=`$ECHO "$path" | $GREP " "`
52241      if test "x$has_space" != x; then
52242        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52243$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52244        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52245      fi
52246
52247      # Use eval to expand a potential ~
52248      eval path="$path"
52249      if test ! -f "$path" && test ! -d "$path"; then
52250        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52251      fi
52252
52253      if test -d "$path"; then
52254        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52255      else
52256        dir="`$DIRNAME "$path"`"
52257        base="`$BASENAME "$path"`"
52258        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52259      fi
52260    fi
52261  fi
52262
52263
52264    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52266$as_echo_n "checking for freetype includes... " >&6; }
52267    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52268$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52269    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52270    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52271$as_echo_n "checking for freetype libraries... " >&6; }
52272    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52273$as_echo "$FREETYPE_LIB_PATH" >&6; }
52274  fi
52275
52276          if test "x$FOUND_FREETYPE" != xyes; then
52277            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52278          fi
52279        else
52280          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52281$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52282          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52283        fi
52284      else
52285        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52286$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52287      fi
52288    fi
52289
52290    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52291      # User has specified settings
52292
52293      if test "x$BUNDLE_FREETYPE" = x; then
52294        # If not specified, default is to bundle freetype
52295        BUNDLE_FREETYPE=yes
52296      fi
52297
52298      if test "x$with_freetype" != x; then
52299        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52300        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52301      fi
52302
52303      # Allow --with-freetype-lib and --with-freetype-include to override
52304      if test "x$with_freetype_include" != x; then
52305        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52306      fi
52307      if test "x$with_freetype_lib" != x; then
52308        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52309      fi
52310
52311      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52312        # Okay, we got it. Check that it works.
52313
52314  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52315  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52316  METHOD="--with-freetype"
52317
52318  # Let's start with an optimistic view of the world :-)
52319  FOUND_FREETYPE=yes
52320
52321  # First look for the canonical freetype main include file ft2build.h.
52322  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52323    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52324    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52325    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52326      # Fail.
52327      FOUND_FREETYPE=no
52328    fi
52329  fi
52330
52331  if test "x$FOUND_FREETYPE" = xyes; then
52332    # Include file found, let's continue the sanity check.
52333    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52334$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52335
52336    # Reset to default value
52337    FREETYPE_BASE_NAME=freetype
52338    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52339    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52340      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52341          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52342        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52343        # for the .6 version explicitly.
52344        FREETYPE_BASE_NAME=freetype.6
52345        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52346        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52347$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52348      else
52349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52350$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52351        FOUND_FREETYPE=no
52352      fi
52353    else
52354      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52355        # On Windows, we will need both .lib and .dll file.
52356        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52357          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52358$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52359          FOUND_FREETYPE=no
52360        fi
52361      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52362          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52363        # Found lib in isa dir, use that instead.
52364        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52365        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52366$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52367      fi
52368    fi
52369  fi
52370
52371  if test "x$FOUND_FREETYPE" = xyes; then
52372
52373  # Only process if variable expands to non-empty
52374
52375  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52376    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52377
52378  # Input might be given as Windows format, start by converting to
52379  # unix format.
52380  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52381  new_path=`$CYGPATH -u "$path"`
52382
52383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52386  # "foo.exe" is OK but "foo" is an error.
52387  #
52388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52389  # It is also a way to make sure we got the proper file name for the real test later on.
52390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52391  if test "x$test_shortpath" = x; then
52392    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52393$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52394    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52395  fi
52396
52397  # Call helper function which possibly converts this using DOS-style short mode.
52398  # If so, the updated path is stored in $new_path.
52399
52400  input_path="$new_path"
52401  # Check if we need to convert this using DOS-style short mode. If the path
52402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52403  # take no chances and rewrite it.
52404  # Note: m4 eats our [], so we need to use [ and ] instead.
52405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52406  if test "x$has_forbidden_chars" != x; then
52407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52408    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52409    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52410    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52411      # Going to short mode and back again did indeed matter. Since short mode is
52412      # case insensitive, let's make it lowercase to improve readability.
52413      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52414      # Now convert it back to Unix-style (cygpath)
52415      input_path=`$CYGPATH -u "$shortmode_path"`
52416      new_path="$input_path"
52417    fi
52418  fi
52419
52420  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52421  if test "x$test_cygdrive_prefix" = x; then
52422    # As a simple fix, exclude /usr/bin since it's not a real path.
52423    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52424      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52425      # a path prefixed by /cygdrive for fixpath to work.
52426      new_path="$CYGWIN_ROOT_PATH$input_path"
52427    fi
52428  fi
52429
52430
52431  if test "x$path" != "x$new_path"; then
52432    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52434$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52435  fi
52436
52437    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52438
52439  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52440  has_colon=`$ECHO $path | $GREP ^.:`
52441  new_path="$path"
52442  if test "x$has_colon" = x; then
52443    # Not in mixed or Windows style, start by that.
52444    new_path=`cmd //c echo $path`
52445  fi
52446
52447
52448  input_path="$new_path"
52449  # Check if we need to convert this using DOS-style short mode. If the path
52450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52451  # take no chances and rewrite it.
52452  # Note: m4 eats our [], so we need to use [ and ] instead.
52453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52454  if test "x$has_forbidden_chars" != x; then
52455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52457  fi
52458
52459
52460  windows_path="$new_path"
52461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52462    unix_path=`$CYGPATH -u "$windows_path"`
52463    new_path="$unix_path"
52464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52466    new_path="$unix_path"
52467  fi
52468
52469  if test "x$path" != "x$new_path"; then
52470    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52473  fi
52474
52475  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52476  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52477
52478    else
52479      # We're on a unix platform. Hooray! :)
52480      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52481      has_space=`$ECHO "$path" | $GREP " "`
52482      if test "x$has_space" != x; then
52483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52484$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52485        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52486      fi
52487
52488      # Use eval to expand a potential ~
52489      eval path="$path"
52490      if test ! -f "$path" && test ! -d "$path"; then
52491        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52492      fi
52493
52494      if test -d "$path"; then
52495        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52496      else
52497        dir="`$DIRNAME "$path"`"
52498        base="`$BASENAME "$path"`"
52499        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52500      fi
52501    fi
52502  fi
52503
52504
52505  # Only process if variable expands to non-empty
52506
52507  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52508    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52509
52510  # Input might be given as Windows format, start by converting to
52511  # unix format.
52512  path="$POTENTIAL_FREETYPE_LIB_PATH"
52513  new_path=`$CYGPATH -u "$path"`
52514
52515  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52516  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52517  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52518  # "foo.exe" is OK but "foo" is an error.
52519  #
52520  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52521  # It is also a way to make sure we got the proper file name for the real test later on.
52522  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52523  if test "x$test_shortpath" = x; then
52524    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52526    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52527  fi
52528
52529  # Call helper function which possibly converts this using DOS-style short mode.
52530  # If so, the updated path is stored in $new_path.
52531
52532  input_path="$new_path"
52533  # Check if we need to convert this using DOS-style short mode. If the path
52534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52535  # take no chances and rewrite it.
52536  # Note: m4 eats our [], so we need to use [ and ] instead.
52537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52538  if test "x$has_forbidden_chars" != x; then
52539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52543      # Going to short mode and back again did indeed matter. Since short mode is
52544      # case insensitive, let's make it lowercase to improve readability.
52545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52546      # Now convert it back to Unix-style (cygpath)
52547      input_path=`$CYGPATH -u "$shortmode_path"`
52548      new_path="$input_path"
52549    fi
52550  fi
52551
52552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52553  if test "x$test_cygdrive_prefix" = x; then
52554    # As a simple fix, exclude /usr/bin since it's not a real path.
52555    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52557      # a path prefixed by /cygdrive for fixpath to work.
52558      new_path="$CYGWIN_ROOT_PATH$input_path"
52559    fi
52560  fi
52561
52562
52563  if test "x$path" != "x$new_path"; then
52564    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52566$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52567  fi
52568
52569    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52570
52571  path="$POTENTIAL_FREETYPE_LIB_PATH"
52572  has_colon=`$ECHO $path | $GREP ^.:`
52573  new_path="$path"
52574  if test "x$has_colon" = x; then
52575    # Not in mixed or Windows style, start by that.
52576    new_path=`cmd //c echo $path`
52577  fi
52578
52579
52580  input_path="$new_path"
52581  # Check if we need to convert this using DOS-style short mode. If the path
52582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52583  # take no chances and rewrite it.
52584  # Note: m4 eats our [], so we need to use [ and ] instead.
52585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52586  if test "x$has_forbidden_chars" != x; then
52587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52589  fi
52590
52591
52592  windows_path="$new_path"
52593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52594    unix_path=`$CYGPATH -u "$windows_path"`
52595    new_path="$unix_path"
52596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52598    new_path="$unix_path"
52599  fi
52600
52601  if test "x$path" != "x$new_path"; then
52602    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52604$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52605  fi
52606
52607  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52608  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52609
52610    else
52611      # We're on a unix platform. Hooray! :)
52612      path="$POTENTIAL_FREETYPE_LIB_PATH"
52613      has_space=`$ECHO "$path" | $GREP " "`
52614      if test "x$has_space" != x; then
52615        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52616$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52617        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52618      fi
52619
52620      # Use eval to expand a potential ~
52621      eval path="$path"
52622      if test ! -f "$path" && test ! -d "$path"; then
52623        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52624      fi
52625
52626      if test -d "$path"; then
52627        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52628      else
52629        dir="`$DIRNAME "$path"`"
52630        base="`$BASENAME "$path"`"
52631        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52632      fi
52633    fi
52634  fi
52635
52636
52637    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52639$as_echo_n "checking for freetype includes... " >&6; }
52640    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52641$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52642    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52644$as_echo_n "checking for freetype libraries... " >&6; }
52645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52646$as_echo "$FREETYPE_LIB_PATH" >&6; }
52647  fi
52648
52649        if test "x$FOUND_FREETYPE" != xyes; then
52650          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52651        fi
52652      else
52653        # User specified only one of lib or include. This is an error.
52654        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52655          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52656$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52657          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52658        else
52659          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52660$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52661          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52662        fi
52663      fi
52664    else
52665      # User did not specify settings, but we need freetype. Try to locate it.
52666
52667      if test "x$BUNDLE_FREETYPE" = x; then
52668        # If not specified, default is to bundle freetype only on windows
52669        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52670          BUNDLE_FREETYPE=yes
52671        else
52672          BUNDLE_FREETYPE=no
52673        fi
52674      fi
52675
52676      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52677      if test "x$SYSROOT" = x; then
52678        if test "x$FOUND_FREETYPE" != xyes; then
52679          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52680          if test "x$PKG_CONFIG" != x; then
52681
52682pkg_failed=no
52683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52684$as_echo_n "checking for FREETYPE... " >&6; }
52685
52686if test -n "$FREETYPE_CFLAGS"; then
52687    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52688 elif test -n "$PKG_CONFIG"; then
52689    if test -n "$PKG_CONFIG" && \
52690    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52691  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52692  ac_status=$?
52693  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52694  test $ac_status = 0; }; then
52695  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52696else
52697  pkg_failed=yes
52698fi
52699 else
52700    pkg_failed=untried
52701fi
52702if test -n "$FREETYPE_LIBS"; then
52703    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52704 elif test -n "$PKG_CONFIG"; then
52705    if test -n "$PKG_CONFIG" && \
52706    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52707  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52708  ac_status=$?
52709  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52710  test $ac_status = 0; }; then
52711  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52712else
52713  pkg_failed=yes
52714fi
52715 else
52716    pkg_failed=untried
52717fi
52718
52719
52720
52721if test $pkg_failed = yes; then
52722
52723if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52724        _pkg_short_errors_supported=yes
52725else
52726        _pkg_short_errors_supported=no
52727fi
52728        if test $_pkg_short_errors_supported = yes; then
52729	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52730        else
52731	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52732        fi
52733	# Put the nasty error message in config.log where it belongs
52734	echo "$FREETYPE_PKG_ERRORS" >&5
52735
52736	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52737$as_echo "no" >&6; }
52738                FOUND_FREETYPE=no
52739elif test $pkg_failed = untried; then
52740	FOUND_FREETYPE=no
52741else
52742	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52743	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52745$as_echo "yes" >&6; }
52746	FOUND_FREETYPE=yes
52747fi
52748            if test "x$FOUND_FREETYPE" = xyes; then
52749              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52750              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52751              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52752              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52753                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52754              fi
52755              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52756              if test "x$BUNDLE_FREETYPE" = xyes; then
52757                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52758$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52759                FOUND_FREETYPE=no
52760              else
52761                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52762$as_echo_n "checking for freetype... " >&6; }
52763                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52764$as_echo "yes (using pkg-config)" >&6; }
52765              fi
52766            fi
52767          fi
52768        fi
52769      fi
52770
52771      if test "x$FOUND_FREETYPE" != xyes; then
52772        # Check in well-known locations
52773        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52774          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52775
52776  windows_path="$FREETYPE_BASE_DIR"
52777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52778    unix_path=`$CYGPATH -u "$windows_path"`
52779    FREETYPE_BASE_DIR="$unix_path"
52780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52781    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52782    FREETYPE_BASE_DIR="$unix_path"
52783  fi
52784
52785
52786  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52787  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52788  METHOD="well-known location"
52789
52790  # Let's start with an optimistic view of the world :-)
52791  FOUND_FREETYPE=yes
52792
52793  # First look for the canonical freetype main include file ft2build.h.
52794  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52795    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52796    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52797    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52798      # Fail.
52799      FOUND_FREETYPE=no
52800    fi
52801  fi
52802
52803  if test "x$FOUND_FREETYPE" = xyes; then
52804    # Include file found, let's continue the sanity check.
52805    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52806$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52807
52808    # Reset to default value
52809    FREETYPE_BASE_NAME=freetype
52810    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52811    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52812      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52813          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52814        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52815        # for the .6 version explicitly.
52816        FREETYPE_BASE_NAME=freetype.6
52817        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52818        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52819$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52820      else
52821        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52822$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52823        FOUND_FREETYPE=no
52824      fi
52825    else
52826      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52827        # On Windows, we will need both .lib and .dll file.
52828        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52829          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52830$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52831          FOUND_FREETYPE=no
52832        fi
52833      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52834          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52835        # Found lib in isa dir, use that instead.
52836        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52837        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52838$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52839      fi
52840    fi
52841  fi
52842
52843  if test "x$FOUND_FREETYPE" = xyes; then
52844
52845  # Only process if variable expands to non-empty
52846
52847  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52849
52850  # Input might be given as Windows format, start by converting to
52851  # unix format.
52852  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52853  new_path=`$CYGPATH -u "$path"`
52854
52855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52858  # "foo.exe" is OK but "foo" is an error.
52859  #
52860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52861  # It is also a way to make sure we got the proper file name for the real test later on.
52862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52863  if test "x$test_shortpath" = x; then
52864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52865$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52866    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52867  fi
52868
52869  # Call helper function which possibly converts this using DOS-style short mode.
52870  # If so, the updated path is stored in $new_path.
52871
52872  input_path="$new_path"
52873  # Check if we need to convert this using DOS-style short mode. If the path
52874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52875  # take no chances and rewrite it.
52876  # Note: m4 eats our [], so we need to use [ and ] instead.
52877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52878  if test "x$has_forbidden_chars" != x; then
52879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52883      # Going to short mode and back again did indeed matter. Since short mode is
52884      # case insensitive, let's make it lowercase to improve readability.
52885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52886      # Now convert it back to Unix-style (cygpath)
52887      input_path=`$CYGPATH -u "$shortmode_path"`
52888      new_path="$input_path"
52889    fi
52890  fi
52891
52892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52893  if test "x$test_cygdrive_prefix" = x; then
52894    # As a simple fix, exclude /usr/bin since it's not a real path.
52895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52897      # a path prefixed by /cygdrive for fixpath to work.
52898      new_path="$CYGWIN_ROOT_PATH$input_path"
52899    fi
52900  fi
52901
52902
52903  if test "x$path" != "x$new_path"; then
52904    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52906$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52907  fi
52908
52909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52910
52911  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52912  has_colon=`$ECHO $path | $GREP ^.:`
52913  new_path="$path"
52914  if test "x$has_colon" = x; then
52915    # Not in mixed or Windows style, start by that.
52916    new_path=`cmd //c echo $path`
52917  fi
52918
52919
52920  input_path="$new_path"
52921  # Check if we need to convert this using DOS-style short mode. If the path
52922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52923  # take no chances and rewrite it.
52924  # Note: m4 eats our [], so we need to use [ and ] instead.
52925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52926  if test "x$has_forbidden_chars" != x; then
52927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52929  fi
52930
52931
52932  windows_path="$new_path"
52933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52934    unix_path=`$CYGPATH -u "$windows_path"`
52935    new_path="$unix_path"
52936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52938    new_path="$unix_path"
52939  fi
52940
52941  if test "x$path" != "x$new_path"; then
52942    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52945  fi
52946
52947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52949
52950    else
52951      # We're on a unix platform. Hooray! :)
52952      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52953      has_space=`$ECHO "$path" | $GREP " "`
52954      if test "x$has_space" != x; then
52955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52958      fi
52959
52960      # Use eval to expand a potential ~
52961      eval path="$path"
52962      if test ! -f "$path" && test ! -d "$path"; then
52963        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52964      fi
52965
52966      if test -d "$path"; then
52967        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52968      else
52969        dir="`$DIRNAME "$path"`"
52970        base="`$BASENAME "$path"`"
52971        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52972      fi
52973    fi
52974  fi
52975
52976
52977  # Only process if variable expands to non-empty
52978
52979  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52981
52982  # Input might be given as Windows format, start by converting to
52983  # unix format.
52984  path="$POTENTIAL_FREETYPE_LIB_PATH"
52985  new_path=`$CYGPATH -u "$path"`
52986
52987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52990  # "foo.exe" is OK but "foo" is an error.
52991  #
52992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52993  # It is also a way to make sure we got the proper file name for the real test later on.
52994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52995  if test "x$test_shortpath" = x; then
52996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52997$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52998    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52999  fi
53000
53001  # Call helper function which possibly converts this using DOS-style short mode.
53002  # If so, the updated path is stored in $new_path.
53003
53004  input_path="$new_path"
53005  # Check if we need to convert this using DOS-style short mode. If the path
53006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53007  # take no chances and rewrite it.
53008  # Note: m4 eats our [], so we need to use [ and ] instead.
53009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53010  if test "x$has_forbidden_chars" != x; then
53011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53015      # Going to short mode and back again did indeed matter. Since short mode is
53016      # case insensitive, let's make it lowercase to improve readability.
53017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53018      # Now convert it back to Unix-style (cygpath)
53019      input_path=`$CYGPATH -u "$shortmode_path"`
53020      new_path="$input_path"
53021    fi
53022  fi
53023
53024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53025  if test "x$test_cygdrive_prefix" = x; then
53026    # As a simple fix, exclude /usr/bin since it's not a real path.
53027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53029      # a path prefixed by /cygdrive for fixpath to work.
53030      new_path="$CYGWIN_ROOT_PATH$input_path"
53031    fi
53032  fi
53033
53034
53035  if test "x$path" != "x$new_path"; then
53036    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53038$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53039  fi
53040
53041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53042
53043  path="$POTENTIAL_FREETYPE_LIB_PATH"
53044  has_colon=`$ECHO $path | $GREP ^.:`
53045  new_path="$path"
53046  if test "x$has_colon" = x; then
53047    # Not in mixed or Windows style, start by that.
53048    new_path=`cmd //c echo $path`
53049  fi
53050
53051
53052  input_path="$new_path"
53053  # Check if we need to convert this using DOS-style short mode. If the path
53054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53055  # take no chances and rewrite it.
53056  # Note: m4 eats our [], so we need to use [ and ] instead.
53057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53058  if test "x$has_forbidden_chars" != x; then
53059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53061  fi
53062
53063
53064  windows_path="$new_path"
53065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53066    unix_path=`$CYGPATH -u "$windows_path"`
53067    new_path="$unix_path"
53068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53070    new_path="$unix_path"
53071  fi
53072
53073  if test "x$path" != "x$new_path"; then
53074    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53076$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53077  fi
53078
53079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53081
53082    else
53083      # We're on a unix platform. Hooray! :)
53084      path="$POTENTIAL_FREETYPE_LIB_PATH"
53085      has_space=`$ECHO "$path" | $GREP " "`
53086      if test "x$has_space" != x; then
53087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53088$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53090      fi
53091
53092      # Use eval to expand a potential ~
53093      eval path="$path"
53094      if test ! -f "$path" && test ! -d "$path"; then
53095        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53096      fi
53097
53098      if test -d "$path"; then
53099        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53100      else
53101        dir="`$DIRNAME "$path"`"
53102        base="`$BASENAME "$path"`"
53103        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53104      fi
53105    fi
53106  fi
53107
53108
53109    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53111$as_echo_n "checking for freetype includes... " >&6; }
53112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53113$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53114    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53116$as_echo_n "checking for freetype libraries... " >&6; }
53117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53118$as_echo "$FREETYPE_LIB_PATH" >&6; }
53119  fi
53120
53121          if test "x$FOUND_FREETYPE" != xyes; then
53122            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
53123
53124  windows_path="$FREETYPE_BASE_DIR"
53125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53126    unix_path=`$CYGPATH -u "$windows_path"`
53127    FREETYPE_BASE_DIR="$unix_path"
53128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53130    FREETYPE_BASE_DIR="$unix_path"
53131  fi
53132
53133
53134  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53135  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53136  METHOD="well-known location"
53137
53138  # Let's start with an optimistic view of the world :-)
53139  FOUND_FREETYPE=yes
53140
53141  # First look for the canonical freetype main include file ft2build.h.
53142  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53143    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53144    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53145    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53146      # Fail.
53147      FOUND_FREETYPE=no
53148    fi
53149  fi
53150
53151  if test "x$FOUND_FREETYPE" = xyes; then
53152    # Include file found, let's continue the sanity check.
53153    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53154$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53155
53156    # Reset to default value
53157    FREETYPE_BASE_NAME=freetype
53158    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53159    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53160      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53161          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53162        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53163        # for the .6 version explicitly.
53164        FREETYPE_BASE_NAME=freetype.6
53165        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53166        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53167$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53168      else
53169        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53170$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53171        FOUND_FREETYPE=no
53172      fi
53173    else
53174      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53175        # On Windows, we will need both .lib and .dll file.
53176        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53177          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53178$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53179          FOUND_FREETYPE=no
53180        fi
53181      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53182          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53183        # Found lib in isa dir, use that instead.
53184        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53185        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53186$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53187      fi
53188    fi
53189  fi
53190
53191  if test "x$FOUND_FREETYPE" = xyes; then
53192
53193  # Only process if variable expands to non-empty
53194
53195  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53197
53198  # Input might be given as Windows format, start by converting to
53199  # unix format.
53200  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53201  new_path=`$CYGPATH -u "$path"`
53202
53203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53206  # "foo.exe" is OK but "foo" is an error.
53207  #
53208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53209  # It is also a way to make sure we got the proper file name for the real test later on.
53210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53211  if test "x$test_shortpath" = x; then
53212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53214    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53215  fi
53216
53217  # Call helper function which possibly converts this using DOS-style short mode.
53218  # If so, the updated path is stored in $new_path.
53219
53220  input_path="$new_path"
53221  # Check if we need to convert this using DOS-style short mode. If the path
53222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53223  # take no chances and rewrite it.
53224  # Note: m4 eats our [], so we need to use [ and ] instead.
53225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53226  if test "x$has_forbidden_chars" != x; then
53227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53231      # Going to short mode and back again did indeed matter. Since short mode is
53232      # case insensitive, let's make it lowercase to improve readability.
53233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53234      # Now convert it back to Unix-style (cygpath)
53235      input_path=`$CYGPATH -u "$shortmode_path"`
53236      new_path="$input_path"
53237    fi
53238  fi
53239
53240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53241  if test "x$test_cygdrive_prefix" = x; then
53242    # As a simple fix, exclude /usr/bin since it's not a real path.
53243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53245      # a path prefixed by /cygdrive for fixpath to work.
53246      new_path="$CYGWIN_ROOT_PATH$input_path"
53247    fi
53248  fi
53249
53250
53251  if test "x$path" != "x$new_path"; then
53252    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53255  fi
53256
53257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53258
53259  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53260  has_colon=`$ECHO $path | $GREP ^.:`
53261  new_path="$path"
53262  if test "x$has_colon" = x; then
53263    # Not in mixed or Windows style, start by that.
53264    new_path=`cmd //c echo $path`
53265  fi
53266
53267
53268  input_path="$new_path"
53269  # Check if we need to convert this using DOS-style short mode. If the path
53270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53271  # take no chances and rewrite it.
53272  # Note: m4 eats our [], so we need to use [ and ] instead.
53273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53274  if test "x$has_forbidden_chars" != x; then
53275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53277  fi
53278
53279
53280  windows_path="$new_path"
53281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53282    unix_path=`$CYGPATH -u "$windows_path"`
53283    new_path="$unix_path"
53284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53286    new_path="$unix_path"
53287  fi
53288
53289  if test "x$path" != "x$new_path"; then
53290    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53293  fi
53294
53295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53297
53298    else
53299      # We're on a unix platform. Hooray! :)
53300      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53301      has_space=`$ECHO "$path" | $GREP " "`
53302      if test "x$has_space" != x; then
53303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53304$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53306      fi
53307
53308      # Use eval to expand a potential ~
53309      eval path="$path"
53310      if test ! -f "$path" && test ! -d "$path"; then
53311        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53312      fi
53313
53314      if test -d "$path"; then
53315        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53316      else
53317        dir="`$DIRNAME "$path"`"
53318        base="`$BASENAME "$path"`"
53319        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53320      fi
53321    fi
53322  fi
53323
53324
53325  # Only process if variable expands to non-empty
53326
53327  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53329
53330  # Input might be given as Windows format, start by converting to
53331  # unix format.
53332  path="$POTENTIAL_FREETYPE_LIB_PATH"
53333  new_path=`$CYGPATH -u "$path"`
53334
53335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53338  # "foo.exe" is OK but "foo" is an error.
53339  #
53340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53341  # It is also a way to make sure we got the proper file name for the real test later on.
53342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53343  if test "x$test_shortpath" = x; then
53344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53346    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53347  fi
53348
53349  # Call helper function which possibly converts this using DOS-style short mode.
53350  # If so, the updated path is stored in $new_path.
53351
53352  input_path="$new_path"
53353  # Check if we need to convert this using DOS-style short mode. If the path
53354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53355  # take no chances and rewrite it.
53356  # Note: m4 eats our [], so we need to use [ and ] instead.
53357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53358  if test "x$has_forbidden_chars" != x; then
53359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53363      # Going to short mode and back again did indeed matter. Since short mode is
53364      # case insensitive, let's make it lowercase to improve readability.
53365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53366      # Now convert it back to Unix-style (cygpath)
53367      input_path=`$CYGPATH -u "$shortmode_path"`
53368      new_path="$input_path"
53369    fi
53370  fi
53371
53372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53373  if test "x$test_cygdrive_prefix" = x; then
53374    # As a simple fix, exclude /usr/bin since it's not a real path.
53375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53377      # a path prefixed by /cygdrive for fixpath to work.
53378      new_path="$CYGWIN_ROOT_PATH$input_path"
53379    fi
53380  fi
53381
53382
53383  if test "x$path" != "x$new_path"; then
53384    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53386$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53387  fi
53388
53389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53390
53391  path="$POTENTIAL_FREETYPE_LIB_PATH"
53392  has_colon=`$ECHO $path | $GREP ^.:`
53393  new_path="$path"
53394  if test "x$has_colon" = x; then
53395    # Not in mixed or Windows style, start by that.
53396    new_path=`cmd //c echo $path`
53397  fi
53398
53399
53400  input_path="$new_path"
53401  # Check if we need to convert this using DOS-style short mode. If the path
53402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53403  # take no chances and rewrite it.
53404  # Note: m4 eats our [], so we need to use [ and ] instead.
53405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53406  if test "x$has_forbidden_chars" != x; then
53407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53409  fi
53410
53411
53412  windows_path="$new_path"
53413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53414    unix_path=`$CYGPATH -u "$windows_path"`
53415    new_path="$unix_path"
53416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53418    new_path="$unix_path"
53419  fi
53420
53421  if test "x$path" != "x$new_path"; then
53422    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53424$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53425  fi
53426
53427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53429
53430    else
53431      # We're on a unix platform. Hooray! :)
53432      path="$POTENTIAL_FREETYPE_LIB_PATH"
53433      has_space=`$ECHO "$path" | $GREP " "`
53434      if test "x$has_space" != x; then
53435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53436$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53437        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53438      fi
53439
53440      # Use eval to expand a potential ~
53441      eval path="$path"
53442      if test ! -f "$path" && test ! -d "$path"; then
53443        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53444      fi
53445
53446      if test -d "$path"; then
53447        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53448      else
53449        dir="`$DIRNAME "$path"`"
53450        base="`$BASENAME "$path"`"
53451        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53452      fi
53453    fi
53454  fi
53455
53456
53457    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53459$as_echo_n "checking for freetype includes... " >&6; }
53460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53461$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53462    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53464$as_echo_n "checking for freetype libraries... " >&6; }
53465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53466$as_echo "$FREETYPE_LIB_PATH" >&6; }
53467  fi
53468
53469          fi
53470        else
53471          FREETYPE_BASE_DIR="$SYSROOT/usr"
53472
53473  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53474  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53475  METHOD="well-known location"
53476
53477  # Let's start with an optimistic view of the world :-)
53478  FOUND_FREETYPE=yes
53479
53480  # First look for the canonical freetype main include file ft2build.h.
53481  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53482    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53483    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53484    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53485      # Fail.
53486      FOUND_FREETYPE=no
53487    fi
53488  fi
53489
53490  if test "x$FOUND_FREETYPE" = xyes; then
53491    # Include file found, let's continue the sanity check.
53492    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53493$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53494
53495    # Reset to default value
53496    FREETYPE_BASE_NAME=freetype
53497    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53498    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53499      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53500          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53501        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53502        # for the .6 version explicitly.
53503        FREETYPE_BASE_NAME=freetype.6
53504        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53505        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53506$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53507      else
53508        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53509$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53510        FOUND_FREETYPE=no
53511      fi
53512    else
53513      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53514        # On Windows, we will need both .lib and .dll file.
53515        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53516          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53517$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53518          FOUND_FREETYPE=no
53519        fi
53520      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53521          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53522        # Found lib in isa dir, use that instead.
53523        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53524        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53525$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53526      fi
53527    fi
53528  fi
53529
53530  if test "x$FOUND_FREETYPE" = xyes; then
53531
53532  # Only process if variable expands to non-empty
53533
53534  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53536
53537  # Input might be given as Windows format, start by converting to
53538  # unix format.
53539  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53540  new_path=`$CYGPATH -u "$path"`
53541
53542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53545  # "foo.exe" is OK but "foo" is an error.
53546  #
53547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53548  # It is also a way to make sure we got the proper file name for the real test later on.
53549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53550  if test "x$test_shortpath" = x; then
53551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53552$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53553    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53554  fi
53555
53556  # Call helper function which possibly converts this using DOS-style short mode.
53557  # If so, the updated path is stored in $new_path.
53558
53559  input_path="$new_path"
53560  # Check if we need to convert this using DOS-style short mode. If the path
53561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53562  # take no chances and rewrite it.
53563  # Note: m4 eats our [], so we need to use [ and ] instead.
53564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53565  if test "x$has_forbidden_chars" != x; then
53566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53570      # Going to short mode and back again did indeed matter. Since short mode is
53571      # case insensitive, let's make it lowercase to improve readability.
53572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53573      # Now convert it back to Unix-style (cygpath)
53574      input_path=`$CYGPATH -u "$shortmode_path"`
53575      new_path="$input_path"
53576    fi
53577  fi
53578
53579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53580  if test "x$test_cygdrive_prefix" = x; then
53581    # As a simple fix, exclude /usr/bin since it's not a real path.
53582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53584      # a path prefixed by /cygdrive for fixpath to work.
53585      new_path="$CYGWIN_ROOT_PATH$input_path"
53586    fi
53587  fi
53588
53589
53590  if test "x$path" != "x$new_path"; then
53591    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53593$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53594  fi
53595
53596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53597
53598  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53599  has_colon=`$ECHO $path | $GREP ^.:`
53600  new_path="$path"
53601  if test "x$has_colon" = x; then
53602    # Not in mixed or Windows style, start by that.
53603    new_path=`cmd //c echo $path`
53604  fi
53605
53606
53607  input_path="$new_path"
53608  # Check if we need to convert this using DOS-style short mode. If the path
53609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53610  # take no chances and rewrite it.
53611  # Note: m4 eats our [], so we need to use [ and ] instead.
53612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53613  if test "x$has_forbidden_chars" != x; then
53614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53616  fi
53617
53618
53619  windows_path="$new_path"
53620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53621    unix_path=`$CYGPATH -u "$windows_path"`
53622    new_path="$unix_path"
53623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53625    new_path="$unix_path"
53626  fi
53627
53628  if test "x$path" != "x$new_path"; then
53629    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53631$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53632  fi
53633
53634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53636
53637    else
53638      # We're on a unix platform. Hooray! :)
53639      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53640      has_space=`$ECHO "$path" | $GREP " "`
53641      if test "x$has_space" != x; then
53642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53645      fi
53646
53647      # Use eval to expand a potential ~
53648      eval path="$path"
53649      if test ! -f "$path" && test ! -d "$path"; then
53650        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53651      fi
53652
53653      if test -d "$path"; then
53654        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53655      else
53656        dir="`$DIRNAME "$path"`"
53657        base="`$BASENAME "$path"`"
53658        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53659      fi
53660    fi
53661  fi
53662
53663
53664  # Only process if variable expands to non-empty
53665
53666  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53667    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53668
53669  # Input might be given as Windows format, start by converting to
53670  # unix format.
53671  path="$POTENTIAL_FREETYPE_LIB_PATH"
53672  new_path=`$CYGPATH -u "$path"`
53673
53674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53677  # "foo.exe" is OK but "foo" is an error.
53678  #
53679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53680  # It is also a way to make sure we got the proper file name for the real test later on.
53681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53682  if test "x$test_shortpath" = x; then
53683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53685    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53686  fi
53687
53688  # Call helper function which possibly converts this using DOS-style short mode.
53689  # If so, the updated path is stored in $new_path.
53690
53691  input_path="$new_path"
53692  # Check if we need to convert this using DOS-style short mode. If the path
53693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53694  # take no chances and rewrite it.
53695  # Note: m4 eats our [], so we need to use [ and ] instead.
53696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53697  if test "x$has_forbidden_chars" != x; then
53698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53702      # Going to short mode and back again did indeed matter. Since short mode is
53703      # case insensitive, let's make it lowercase to improve readability.
53704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53705      # Now convert it back to Unix-style (cygpath)
53706      input_path=`$CYGPATH -u "$shortmode_path"`
53707      new_path="$input_path"
53708    fi
53709  fi
53710
53711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53712  if test "x$test_cygdrive_prefix" = x; then
53713    # As a simple fix, exclude /usr/bin since it's not a real path.
53714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53716      # a path prefixed by /cygdrive for fixpath to work.
53717      new_path="$CYGWIN_ROOT_PATH$input_path"
53718    fi
53719  fi
53720
53721
53722  if test "x$path" != "x$new_path"; then
53723    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53726  fi
53727
53728    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53729
53730  path="$POTENTIAL_FREETYPE_LIB_PATH"
53731  has_colon=`$ECHO $path | $GREP ^.:`
53732  new_path="$path"
53733  if test "x$has_colon" = x; then
53734    # Not in mixed or Windows style, start by that.
53735    new_path=`cmd //c echo $path`
53736  fi
53737
53738
53739  input_path="$new_path"
53740  # Check if we need to convert this using DOS-style short mode. If the path
53741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53742  # take no chances and rewrite it.
53743  # Note: m4 eats our [], so we need to use [ and ] instead.
53744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53745  if test "x$has_forbidden_chars" != x; then
53746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53748  fi
53749
53750
53751  windows_path="$new_path"
53752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53753    unix_path=`$CYGPATH -u "$windows_path"`
53754    new_path="$unix_path"
53755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53757    new_path="$unix_path"
53758  fi
53759
53760  if test "x$path" != "x$new_path"; then
53761    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53763$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53764  fi
53765
53766  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53768
53769    else
53770      # We're on a unix platform. Hooray! :)
53771      path="$POTENTIAL_FREETYPE_LIB_PATH"
53772      has_space=`$ECHO "$path" | $GREP " "`
53773      if test "x$has_space" != x; then
53774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53775$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53776        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53777      fi
53778
53779      # Use eval to expand a potential ~
53780      eval path="$path"
53781      if test ! -f "$path" && test ! -d "$path"; then
53782        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53783      fi
53784
53785      if test -d "$path"; then
53786        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53787      else
53788        dir="`$DIRNAME "$path"`"
53789        base="`$BASENAME "$path"`"
53790        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53791      fi
53792    fi
53793  fi
53794
53795
53796    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53798$as_echo_n "checking for freetype includes... " >&6; }
53799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53800$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53801    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53803$as_echo_n "checking for freetype libraries... " >&6; }
53804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53805$as_echo "$FREETYPE_LIB_PATH" >&6; }
53806  fi
53807
53808
53809          if test "x$FOUND_FREETYPE" != xyes; then
53810            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
53811
53812  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53813  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53814  METHOD="well-known location"
53815
53816  # Let's start with an optimistic view of the world :-)
53817  FOUND_FREETYPE=yes
53818
53819  # First look for the canonical freetype main include file ft2build.h.
53820  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53821    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53822    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53823    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53824      # Fail.
53825      FOUND_FREETYPE=no
53826    fi
53827  fi
53828
53829  if test "x$FOUND_FREETYPE" = xyes; then
53830    # Include file found, let's continue the sanity check.
53831    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53832$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53833
53834    # Reset to default value
53835    FREETYPE_BASE_NAME=freetype
53836    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53837    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53838      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53839          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53840        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53841        # for the .6 version explicitly.
53842        FREETYPE_BASE_NAME=freetype.6
53843        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53844        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53845$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53846      else
53847        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53848$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53849        FOUND_FREETYPE=no
53850      fi
53851    else
53852      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53853        # On Windows, we will need both .lib and .dll file.
53854        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53855          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53856$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53857          FOUND_FREETYPE=no
53858        fi
53859      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53860          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53861        # Found lib in isa dir, use that instead.
53862        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53863        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53864$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53865      fi
53866    fi
53867  fi
53868
53869  if test "x$FOUND_FREETYPE" = xyes; then
53870
53871  # Only process if variable expands to non-empty
53872
53873  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53875
53876  # Input might be given as Windows format, start by converting to
53877  # unix format.
53878  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53879  new_path=`$CYGPATH -u "$path"`
53880
53881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53884  # "foo.exe" is OK but "foo" is an error.
53885  #
53886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53887  # It is also a way to make sure we got the proper file name for the real test later on.
53888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53889  if test "x$test_shortpath" = x; then
53890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53891$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53892    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53893  fi
53894
53895  # Call helper function which possibly converts this using DOS-style short mode.
53896  # If so, the updated path is stored in $new_path.
53897
53898  input_path="$new_path"
53899  # Check if we need to convert this using DOS-style short mode. If the path
53900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53901  # take no chances and rewrite it.
53902  # Note: m4 eats our [], so we need to use [ and ] instead.
53903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53904  if test "x$has_forbidden_chars" != x; then
53905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53909      # Going to short mode and back again did indeed matter. Since short mode is
53910      # case insensitive, let's make it lowercase to improve readability.
53911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53912      # Now convert it back to Unix-style (cygpath)
53913      input_path=`$CYGPATH -u "$shortmode_path"`
53914      new_path="$input_path"
53915    fi
53916  fi
53917
53918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53919  if test "x$test_cygdrive_prefix" = x; then
53920    # As a simple fix, exclude /usr/bin since it's not a real path.
53921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53923      # a path prefixed by /cygdrive for fixpath to work.
53924      new_path="$CYGWIN_ROOT_PATH$input_path"
53925    fi
53926  fi
53927
53928
53929  if test "x$path" != "x$new_path"; then
53930    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53933  fi
53934
53935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53936
53937  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53938  has_colon=`$ECHO $path | $GREP ^.:`
53939  new_path="$path"
53940  if test "x$has_colon" = x; then
53941    # Not in mixed or Windows style, start by that.
53942    new_path=`cmd //c echo $path`
53943  fi
53944
53945
53946  input_path="$new_path"
53947  # Check if we need to convert this using DOS-style short mode. If the path
53948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53949  # take no chances and rewrite it.
53950  # Note: m4 eats our [], so we need to use [ and ] instead.
53951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53952  if test "x$has_forbidden_chars" != x; then
53953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53955  fi
53956
53957
53958  windows_path="$new_path"
53959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53960    unix_path=`$CYGPATH -u "$windows_path"`
53961    new_path="$unix_path"
53962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53964    new_path="$unix_path"
53965  fi
53966
53967  if test "x$path" != "x$new_path"; then
53968    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53971  fi
53972
53973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53975
53976    else
53977      # We're on a unix platform. Hooray! :)
53978      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53979      has_space=`$ECHO "$path" | $GREP " "`
53980      if test "x$has_space" != x; then
53981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53982$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53984      fi
53985
53986      # Use eval to expand a potential ~
53987      eval path="$path"
53988      if test ! -f "$path" && test ! -d "$path"; then
53989        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53990      fi
53991
53992      if test -d "$path"; then
53993        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53994      else
53995        dir="`$DIRNAME "$path"`"
53996        base="`$BASENAME "$path"`"
53997        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53998      fi
53999    fi
54000  fi
54001
54002
54003  # Only process if variable expands to non-empty
54004
54005  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54006    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54007
54008  # Input might be given as Windows format, start by converting to
54009  # unix format.
54010  path="$POTENTIAL_FREETYPE_LIB_PATH"
54011  new_path=`$CYGPATH -u "$path"`
54012
54013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54016  # "foo.exe" is OK but "foo" is an error.
54017  #
54018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54019  # It is also a way to make sure we got the proper file name for the real test later on.
54020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54021  if test "x$test_shortpath" = x; then
54022    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54023$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54024    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54025  fi
54026
54027  # Call helper function which possibly converts this using DOS-style short mode.
54028  # If so, the updated path is stored in $new_path.
54029
54030  input_path="$new_path"
54031  # Check if we need to convert this using DOS-style short mode. If the path
54032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54033  # take no chances and rewrite it.
54034  # Note: m4 eats our [], so we need to use [ and ] instead.
54035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54036  if test "x$has_forbidden_chars" != x; then
54037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54038    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54039    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54040    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54041      # Going to short mode and back again did indeed matter. Since short mode is
54042      # case insensitive, let's make it lowercase to improve readability.
54043      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54044      # Now convert it back to Unix-style (cygpath)
54045      input_path=`$CYGPATH -u "$shortmode_path"`
54046      new_path="$input_path"
54047    fi
54048  fi
54049
54050  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54051  if test "x$test_cygdrive_prefix" = x; then
54052    # As a simple fix, exclude /usr/bin since it's not a real path.
54053    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54054      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54055      # a path prefixed by /cygdrive for fixpath to work.
54056      new_path="$CYGWIN_ROOT_PATH$input_path"
54057    fi
54058  fi
54059
54060
54061  if test "x$path" != "x$new_path"; then
54062    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54064$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54065  fi
54066
54067    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54068
54069  path="$POTENTIAL_FREETYPE_LIB_PATH"
54070  has_colon=`$ECHO $path | $GREP ^.:`
54071  new_path="$path"
54072  if test "x$has_colon" = x; then
54073    # Not in mixed or Windows style, start by that.
54074    new_path=`cmd //c echo $path`
54075  fi
54076
54077
54078  input_path="$new_path"
54079  # Check if we need to convert this using DOS-style short mode. If the path
54080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54081  # take no chances and rewrite it.
54082  # Note: m4 eats our [], so we need to use [ and ] instead.
54083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54084  if test "x$has_forbidden_chars" != x; then
54085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54087  fi
54088
54089
54090  windows_path="$new_path"
54091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54092    unix_path=`$CYGPATH -u "$windows_path"`
54093    new_path="$unix_path"
54094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54096    new_path="$unix_path"
54097  fi
54098
54099  if test "x$path" != "x$new_path"; then
54100    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54103  fi
54104
54105  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54106  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54107
54108    else
54109      # We're on a unix platform. Hooray! :)
54110      path="$POTENTIAL_FREETYPE_LIB_PATH"
54111      has_space=`$ECHO "$path" | $GREP " "`
54112      if test "x$has_space" != x; then
54113        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54114$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54115        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54116      fi
54117
54118      # Use eval to expand a potential ~
54119      eval path="$path"
54120      if test ! -f "$path" && test ! -d "$path"; then
54121        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54122      fi
54123
54124      if test -d "$path"; then
54125        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54126      else
54127        dir="`$DIRNAME "$path"`"
54128        base="`$BASENAME "$path"`"
54129        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54130      fi
54131    fi
54132  fi
54133
54134
54135    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54137$as_echo_n "checking for freetype includes... " >&6; }
54138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54139$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54140    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54142$as_echo_n "checking for freetype libraries... " >&6; }
54143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54144$as_echo "$FREETYPE_LIB_PATH" >&6; }
54145  fi
54146
54147          fi
54148
54149          if test "x$FOUND_FREETYPE" != xyes; then
54150            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
54151
54152  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54153  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54154  METHOD="well-known location"
54155
54156  # Let's start with an optimistic view of the world :-)
54157  FOUND_FREETYPE=yes
54158
54159  # First look for the canonical freetype main include file ft2build.h.
54160  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54161    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54162    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54163    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54164      # Fail.
54165      FOUND_FREETYPE=no
54166    fi
54167  fi
54168
54169  if test "x$FOUND_FREETYPE" = xyes; then
54170    # Include file found, let's continue the sanity check.
54171    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54172$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54173
54174    # Reset to default value
54175    FREETYPE_BASE_NAME=freetype
54176    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54177    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54178      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54179          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54180        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54181        # for the .6 version explicitly.
54182        FREETYPE_BASE_NAME=freetype.6
54183        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54184        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54185$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54186      else
54187        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54188$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54189        FOUND_FREETYPE=no
54190      fi
54191    else
54192      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54193        # On Windows, we will need both .lib and .dll file.
54194        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54195          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54196$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54197          FOUND_FREETYPE=no
54198        fi
54199      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54200          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54201        # Found lib in isa dir, use that instead.
54202        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54203        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54204$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54205      fi
54206    fi
54207  fi
54208
54209  if test "x$FOUND_FREETYPE" = xyes; then
54210
54211  # Only process if variable expands to non-empty
54212
54213  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54215
54216  # Input might be given as Windows format, start by converting to
54217  # unix format.
54218  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54219  new_path=`$CYGPATH -u "$path"`
54220
54221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54224  # "foo.exe" is OK but "foo" is an error.
54225  #
54226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54227  # It is also a way to make sure we got the proper file name for the real test later on.
54228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54229  if test "x$test_shortpath" = x; then
54230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54231$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54232    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54233  fi
54234
54235  # Call helper function which possibly converts this using DOS-style short mode.
54236  # If so, the updated path is stored in $new_path.
54237
54238  input_path="$new_path"
54239  # Check if we need to convert this using DOS-style short mode. If the path
54240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54241  # take no chances and rewrite it.
54242  # Note: m4 eats our [], so we need to use [ and ] instead.
54243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54244  if test "x$has_forbidden_chars" != x; then
54245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54249      # Going to short mode and back again did indeed matter. Since short mode is
54250      # case insensitive, let's make it lowercase to improve readability.
54251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54252      # Now convert it back to Unix-style (cygpath)
54253      input_path=`$CYGPATH -u "$shortmode_path"`
54254      new_path="$input_path"
54255    fi
54256  fi
54257
54258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54259  if test "x$test_cygdrive_prefix" = x; then
54260    # As a simple fix, exclude /usr/bin since it's not a real path.
54261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54263      # a path prefixed by /cygdrive for fixpath to work.
54264      new_path="$CYGWIN_ROOT_PATH$input_path"
54265    fi
54266  fi
54267
54268
54269  if test "x$path" != "x$new_path"; then
54270    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54272$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54273  fi
54274
54275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54276
54277  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54278  has_colon=`$ECHO $path | $GREP ^.:`
54279  new_path="$path"
54280  if test "x$has_colon" = x; then
54281    # Not in mixed or Windows style, start by that.
54282    new_path=`cmd //c echo $path`
54283  fi
54284
54285
54286  input_path="$new_path"
54287  # Check if we need to convert this using DOS-style short mode. If the path
54288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54289  # take no chances and rewrite it.
54290  # Note: m4 eats our [], so we need to use [ and ] instead.
54291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54292  if test "x$has_forbidden_chars" != x; then
54293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54295  fi
54296
54297
54298  windows_path="$new_path"
54299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54300    unix_path=`$CYGPATH -u "$windows_path"`
54301    new_path="$unix_path"
54302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54304    new_path="$unix_path"
54305  fi
54306
54307  if test "x$path" != "x$new_path"; then
54308    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54310$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54311  fi
54312
54313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54315
54316    else
54317      # We're on a unix platform. Hooray! :)
54318      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54319      has_space=`$ECHO "$path" | $GREP " "`
54320      if test "x$has_space" != x; then
54321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54322$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54324      fi
54325
54326      # Use eval to expand a potential ~
54327      eval path="$path"
54328      if test ! -f "$path" && test ! -d "$path"; then
54329        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54330      fi
54331
54332      if test -d "$path"; then
54333        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54334      else
54335        dir="`$DIRNAME "$path"`"
54336        base="`$BASENAME "$path"`"
54337        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54338      fi
54339    fi
54340  fi
54341
54342
54343  # Only process if variable expands to non-empty
54344
54345  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54347
54348  # Input might be given as Windows format, start by converting to
54349  # unix format.
54350  path="$POTENTIAL_FREETYPE_LIB_PATH"
54351  new_path=`$CYGPATH -u "$path"`
54352
54353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54356  # "foo.exe" is OK but "foo" is an error.
54357  #
54358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54359  # It is also a way to make sure we got the proper file name for the real test later on.
54360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54361  if test "x$test_shortpath" = x; then
54362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54363$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54364    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54365  fi
54366
54367  # Call helper function which possibly converts this using DOS-style short mode.
54368  # If so, the updated path is stored in $new_path.
54369
54370  input_path="$new_path"
54371  # Check if we need to convert this using DOS-style short mode. If the path
54372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54373  # take no chances and rewrite it.
54374  # Note: m4 eats our [], so we need to use [ and ] instead.
54375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54376  if test "x$has_forbidden_chars" != x; then
54377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54381      # Going to short mode and back again did indeed matter. Since short mode is
54382      # case insensitive, let's make it lowercase to improve readability.
54383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54384      # Now convert it back to Unix-style (cygpath)
54385      input_path=`$CYGPATH -u "$shortmode_path"`
54386      new_path="$input_path"
54387    fi
54388  fi
54389
54390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54391  if test "x$test_cygdrive_prefix" = x; then
54392    # As a simple fix, exclude /usr/bin since it's not a real path.
54393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54395      # a path prefixed by /cygdrive for fixpath to work.
54396      new_path="$CYGWIN_ROOT_PATH$input_path"
54397    fi
54398  fi
54399
54400
54401  if test "x$path" != "x$new_path"; then
54402    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54404$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54405  fi
54406
54407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54408
54409  path="$POTENTIAL_FREETYPE_LIB_PATH"
54410  has_colon=`$ECHO $path | $GREP ^.:`
54411  new_path="$path"
54412  if test "x$has_colon" = x; then
54413    # Not in mixed or Windows style, start by that.
54414    new_path=`cmd //c echo $path`
54415  fi
54416
54417
54418  input_path="$new_path"
54419  # Check if we need to convert this using DOS-style short mode. If the path
54420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54421  # take no chances and rewrite it.
54422  # Note: m4 eats our [], so we need to use [ and ] instead.
54423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54424  if test "x$has_forbidden_chars" != x; then
54425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54427  fi
54428
54429
54430  windows_path="$new_path"
54431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54432    unix_path=`$CYGPATH -u "$windows_path"`
54433    new_path="$unix_path"
54434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54436    new_path="$unix_path"
54437  fi
54438
54439  if test "x$path" != "x$new_path"; then
54440    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54442$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54443  fi
54444
54445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54447
54448    else
54449      # We're on a unix platform. Hooray! :)
54450      path="$POTENTIAL_FREETYPE_LIB_PATH"
54451      has_space=`$ECHO "$path" | $GREP " "`
54452      if test "x$has_space" != x; then
54453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54454$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54455        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54456      fi
54457
54458      # Use eval to expand a potential ~
54459      eval path="$path"
54460      if test ! -f "$path" && test ! -d "$path"; then
54461        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54462      fi
54463
54464      if test -d "$path"; then
54465        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54466      else
54467        dir="`$DIRNAME "$path"`"
54468        base="`$BASENAME "$path"`"
54469        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54470      fi
54471    fi
54472  fi
54473
54474
54475    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54477$as_echo_n "checking for freetype includes... " >&6; }
54478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54479$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54480    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54482$as_echo_n "checking for freetype libraries... " >&6; }
54483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54484$as_echo "$FREETYPE_LIB_PATH" >&6; }
54485  fi
54486
54487          fi
54488
54489          if test "x$FOUND_FREETYPE" != xyes; then
54490            FREETYPE_BASE_DIR="$SYSROOT/usr"
54491            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54492
54493  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54494  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
54495  METHOD="well-known location"
54496
54497  # Let's start with an optimistic view of the world :-)
54498  FOUND_FREETYPE=yes
54499
54500  # First look for the canonical freetype main include file ft2build.h.
54501  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54502    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54503    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54504    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54505      # Fail.
54506      FOUND_FREETYPE=no
54507    fi
54508  fi
54509
54510  if test "x$FOUND_FREETYPE" = xyes; then
54511    # Include file found, let's continue the sanity check.
54512    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54513$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54514
54515    # Reset to default value
54516    FREETYPE_BASE_NAME=freetype
54517    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54518    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54519      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54520          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54521        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54522        # for the .6 version explicitly.
54523        FREETYPE_BASE_NAME=freetype.6
54524        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54525        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54526$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54527      else
54528        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54529$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54530        FOUND_FREETYPE=no
54531      fi
54532    else
54533      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54534        # On Windows, we will need both .lib and .dll file.
54535        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54536          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54537$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54538          FOUND_FREETYPE=no
54539        fi
54540      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54541          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54542        # Found lib in isa dir, use that instead.
54543        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54544        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54545$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54546      fi
54547    fi
54548  fi
54549
54550  if test "x$FOUND_FREETYPE" = xyes; then
54551
54552  # Only process if variable expands to non-empty
54553
54554  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54555    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54556
54557  # Input might be given as Windows format, start by converting to
54558  # unix format.
54559  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54560  new_path=`$CYGPATH -u "$path"`
54561
54562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54565  # "foo.exe" is OK but "foo" is an error.
54566  #
54567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54568  # It is also a way to make sure we got the proper file name for the real test later on.
54569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54570  if test "x$test_shortpath" = x; then
54571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54572$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54573    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54574  fi
54575
54576  # Call helper function which possibly converts this using DOS-style short mode.
54577  # If so, the updated path is stored in $new_path.
54578
54579  input_path="$new_path"
54580  # Check if we need to convert this using DOS-style short mode. If the path
54581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54582  # take no chances and rewrite it.
54583  # Note: m4 eats our [], so we need to use [ and ] instead.
54584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54585  if test "x$has_forbidden_chars" != x; then
54586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54590      # Going to short mode and back again did indeed matter. Since short mode is
54591      # case insensitive, let's make it lowercase to improve readability.
54592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54593      # Now convert it back to Unix-style (cygpath)
54594      input_path=`$CYGPATH -u "$shortmode_path"`
54595      new_path="$input_path"
54596    fi
54597  fi
54598
54599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54600  if test "x$test_cygdrive_prefix" = x; then
54601    # As a simple fix, exclude /usr/bin since it's not a real path.
54602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54604      # a path prefixed by /cygdrive for fixpath to work.
54605      new_path="$CYGWIN_ROOT_PATH$input_path"
54606    fi
54607  fi
54608
54609
54610  if test "x$path" != "x$new_path"; then
54611    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54613$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54614  fi
54615
54616    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54617
54618  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54619  has_colon=`$ECHO $path | $GREP ^.:`
54620  new_path="$path"
54621  if test "x$has_colon" = x; then
54622    # Not in mixed or Windows style, start by that.
54623    new_path=`cmd //c echo $path`
54624  fi
54625
54626
54627  input_path="$new_path"
54628  # Check if we need to convert this using DOS-style short mode. If the path
54629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54630  # take no chances and rewrite it.
54631  # Note: m4 eats our [], so we need to use [ and ] instead.
54632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54633  if test "x$has_forbidden_chars" != x; then
54634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54636  fi
54637
54638
54639  windows_path="$new_path"
54640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54641    unix_path=`$CYGPATH -u "$windows_path"`
54642    new_path="$unix_path"
54643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54645    new_path="$unix_path"
54646  fi
54647
54648  if test "x$path" != "x$new_path"; then
54649    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54651$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54652  fi
54653
54654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54656
54657    else
54658      # We're on a unix platform. Hooray! :)
54659      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54660      has_space=`$ECHO "$path" | $GREP " "`
54661      if test "x$has_space" != x; then
54662        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54663$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54664        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54665      fi
54666
54667      # Use eval to expand a potential ~
54668      eval path="$path"
54669      if test ! -f "$path" && test ! -d "$path"; then
54670        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54671      fi
54672
54673      if test -d "$path"; then
54674        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54675      else
54676        dir="`$DIRNAME "$path"`"
54677        base="`$BASENAME "$path"`"
54678        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54679      fi
54680    fi
54681  fi
54682
54683
54684  # Only process if variable expands to non-empty
54685
54686  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54688
54689  # Input might be given as Windows format, start by converting to
54690  # unix format.
54691  path="$POTENTIAL_FREETYPE_LIB_PATH"
54692  new_path=`$CYGPATH -u "$path"`
54693
54694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54697  # "foo.exe" is OK but "foo" is an error.
54698  #
54699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54700  # It is also a way to make sure we got the proper file name for the real test later on.
54701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54702  if test "x$test_shortpath" = x; then
54703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54704$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54705    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54706  fi
54707
54708  # Call helper function which possibly converts this using DOS-style short mode.
54709  # If so, the updated path is stored in $new_path.
54710
54711  input_path="$new_path"
54712  # Check if we need to convert this using DOS-style short mode. If the path
54713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54714  # take no chances and rewrite it.
54715  # Note: m4 eats our [], so we need to use [ and ] instead.
54716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54717  if test "x$has_forbidden_chars" != x; then
54718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54722      # Going to short mode and back again did indeed matter. Since short mode is
54723      # case insensitive, let's make it lowercase to improve readability.
54724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54725      # Now convert it back to Unix-style (cygpath)
54726      input_path=`$CYGPATH -u "$shortmode_path"`
54727      new_path="$input_path"
54728    fi
54729  fi
54730
54731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54732  if test "x$test_cygdrive_prefix" = x; then
54733    # As a simple fix, exclude /usr/bin since it's not a real path.
54734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54736      # a path prefixed by /cygdrive for fixpath to work.
54737      new_path="$CYGWIN_ROOT_PATH$input_path"
54738    fi
54739  fi
54740
54741
54742  if test "x$path" != "x$new_path"; then
54743    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54745$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54746  fi
54747
54748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54749
54750  path="$POTENTIAL_FREETYPE_LIB_PATH"
54751  has_colon=`$ECHO $path | $GREP ^.:`
54752  new_path="$path"
54753  if test "x$has_colon" = x; then
54754    # Not in mixed or Windows style, start by that.
54755    new_path=`cmd //c echo $path`
54756  fi
54757
54758
54759  input_path="$new_path"
54760  # Check if we need to convert this using DOS-style short mode. If the path
54761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54762  # take no chances and rewrite it.
54763  # Note: m4 eats our [], so we need to use [ and ] instead.
54764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54765  if test "x$has_forbidden_chars" != x; then
54766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54768  fi
54769
54770
54771  windows_path="$new_path"
54772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54773    unix_path=`$CYGPATH -u "$windows_path"`
54774    new_path="$unix_path"
54775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54777    new_path="$unix_path"
54778  fi
54779
54780  if test "x$path" != "x$new_path"; then
54781    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54783$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54784  fi
54785
54786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54788
54789    else
54790      # We're on a unix platform. Hooray! :)
54791      path="$POTENTIAL_FREETYPE_LIB_PATH"
54792      has_space=`$ECHO "$path" | $GREP " "`
54793      if test "x$has_space" != x; then
54794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54795$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54796        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54797      fi
54798
54799      # Use eval to expand a potential ~
54800      eval path="$path"
54801      if test ! -f "$path" && test ! -d "$path"; then
54802        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54803      fi
54804
54805      if test -d "$path"; then
54806        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54807      else
54808        dir="`$DIRNAME "$path"`"
54809        base="`$BASENAME "$path"`"
54810        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54811      fi
54812    fi
54813  fi
54814
54815
54816    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54818$as_echo_n "checking for freetype includes... " >&6; }
54819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54820$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54821    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54823$as_echo_n "checking for freetype libraries... " >&6; }
54824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54825$as_echo "$FREETYPE_LIB_PATH" >&6; }
54826  fi
54827
54828            else
54829
54830  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54831  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
54832  METHOD="well-known location"
54833
54834  # Let's start with an optimistic view of the world :-)
54835  FOUND_FREETYPE=yes
54836
54837  # First look for the canonical freetype main include file ft2build.h.
54838  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54839    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54840    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54841    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54842      # Fail.
54843      FOUND_FREETYPE=no
54844    fi
54845  fi
54846
54847  if test "x$FOUND_FREETYPE" = xyes; then
54848    # Include file found, let's continue the sanity check.
54849    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54850$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54851
54852    # Reset to default value
54853    FREETYPE_BASE_NAME=freetype
54854    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54855    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54856      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54857          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54858        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54859        # for the .6 version explicitly.
54860        FREETYPE_BASE_NAME=freetype.6
54861        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54862        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54863$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54864      else
54865        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54866$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54867        FOUND_FREETYPE=no
54868      fi
54869    else
54870      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54871        # On Windows, we will need both .lib and .dll file.
54872        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54873          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54874$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54875          FOUND_FREETYPE=no
54876        fi
54877      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54878          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54879        # Found lib in isa dir, use that instead.
54880        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54881        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54882$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54883      fi
54884    fi
54885  fi
54886
54887  if test "x$FOUND_FREETYPE" = xyes; then
54888
54889  # Only process if variable expands to non-empty
54890
54891  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54893
54894  # Input might be given as Windows format, start by converting to
54895  # unix format.
54896  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54897  new_path=`$CYGPATH -u "$path"`
54898
54899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54902  # "foo.exe" is OK but "foo" is an error.
54903  #
54904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54905  # It is also a way to make sure we got the proper file name for the real test later on.
54906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54907  if test "x$test_shortpath" = x; then
54908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54909$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54910    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54911  fi
54912
54913  # Call helper function which possibly converts this using DOS-style short mode.
54914  # If so, the updated path is stored in $new_path.
54915
54916  input_path="$new_path"
54917  # Check if we need to convert this using DOS-style short mode. If the path
54918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54919  # take no chances and rewrite it.
54920  # Note: m4 eats our [], so we need to use [ and ] instead.
54921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54922  if test "x$has_forbidden_chars" != x; then
54923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54927      # Going to short mode and back again did indeed matter. Since short mode is
54928      # case insensitive, let's make it lowercase to improve readability.
54929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54930      # Now convert it back to Unix-style (cygpath)
54931      input_path=`$CYGPATH -u "$shortmode_path"`
54932      new_path="$input_path"
54933    fi
54934  fi
54935
54936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54937  if test "x$test_cygdrive_prefix" = x; then
54938    # As a simple fix, exclude /usr/bin since it's not a real path.
54939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54941      # a path prefixed by /cygdrive for fixpath to work.
54942      new_path="$CYGWIN_ROOT_PATH$input_path"
54943    fi
54944  fi
54945
54946
54947  if test "x$path" != "x$new_path"; then
54948    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54950$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54951  fi
54952
54953    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54954
54955  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54956  has_colon=`$ECHO $path | $GREP ^.:`
54957  new_path="$path"
54958  if test "x$has_colon" = x; then
54959    # Not in mixed or Windows style, start by that.
54960    new_path=`cmd //c echo $path`
54961  fi
54962
54963
54964  input_path="$new_path"
54965  # Check if we need to convert this using DOS-style short mode. If the path
54966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54967  # take no chances and rewrite it.
54968  # Note: m4 eats our [], so we need to use [ and ] instead.
54969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54970  if test "x$has_forbidden_chars" != x; then
54971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54973  fi
54974
54975
54976  windows_path="$new_path"
54977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54978    unix_path=`$CYGPATH -u "$windows_path"`
54979    new_path="$unix_path"
54980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54982    new_path="$unix_path"
54983  fi
54984
54985  if test "x$path" != "x$new_path"; then
54986    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54988$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54989  fi
54990
54991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54993
54994    else
54995      # We're on a unix platform. Hooray! :)
54996      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54997      has_space=`$ECHO "$path" | $GREP " "`
54998      if test "x$has_space" != x; then
54999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55001        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55002      fi
55003
55004      # Use eval to expand a potential ~
55005      eval path="$path"
55006      if test ! -f "$path" && test ! -d "$path"; then
55007        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55008      fi
55009
55010      if test -d "$path"; then
55011        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55012      else
55013        dir="`$DIRNAME "$path"`"
55014        base="`$BASENAME "$path"`"
55015        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55016      fi
55017    fi
55018  fi
55019
55020
55021  # Only process if variable expands to non-empty
55022
55023  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55025
55026  # Input might be given as Windows format, start by converting to
55027  # unix format.
55028  path="$POTENTIAL_FREETYPE_LIB_PATH"
55029  new_path=`$CYGPATH -u "$path"`
55030
55031  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55032  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55033  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55034  # "foo.exe" is OK but "foo" is an error.
55035  #
55036  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55037  # It is also a way to make sure we got the proper file name for the real test later on.
55038  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55039  if test "x$test_shortpath" = x; then
55040    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55041$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55042    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55043  fi
55044
55045  # Call helper function which possibly converts this using DOS-style short mode.
55046  # If so, the updated path is stored in $new_path.
55047
55048  input_path="$new_path"
55049  # Check if we need to convert this using DOS-style short mode. If the path
55050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55051  # take no chances and rewrite it.
55052  # Note: m4 eats our [], so we need to use [ and ] instead.
55053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55054  if test "x$has_forbidden_chars" != x; then
55055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55059      # Going to short mode and back again did indeed matter. Since short mode is
55060      # case insensitive, let's make it lowercase to improve readability.
55061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55062      # Now convert it back to Unix-style (cygpath)
55063      input_path=`$CYGPATH -u "$shortmode_path"`
55064      new_path="$input_path"
55065    fi
55066  fi
55067
55068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55069  if test "x$test_cygdrive_prefix" = x; then
55070    # As a simple fix, exclude /usr/bin since it's not a real path.
55071    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55073      # a path prefixed by /cygdrive for fixpath to work.
55074      new_path="$CYGWIN_ROOT_PATH$input_path"
55075    fi
55076  fi
55077
55078
55079  if test "x$path" != "x$new_path"; then
55080    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55082$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55083  fi
55084
55085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55086
55087  path="$POTENTIAL_FREETYPE_LIB_PATH"
55088  has_colon=`$ECHO $path | $GREP ^.:`
55089  new_path="$path"
55090  if test "x$has_colon" = x; then
55091    # Not in mixed or Windows style, start by that.
55092    new_path=`cmd //c echo $path`
55093  fi
55094
55095
55096  input_path="$new_path"
55097  # Check if we need to convert this using DOS-style short mode. If the path
55098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55099  # take no chances and rewrite it.
55100  # Note: m4 eats our [], so we need to use [ and ] instead.
55101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55102  if test "x$has_forbidden_chars" != x; then
55103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55104    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55105  fi
55106
55107
55108  windows_path="$new_path"
55109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55110    unix_path=`$CYGPATH -u "$windows_path"`
55111    new_path="$unix_path"
55112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55114    new_path="$unix_path"
55115  fi
55116
55117  if test "x$path" != "x$new_path"; then
55118    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55120$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55121  fi
55122
55123  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55124  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55125
55126    else
55127      # We're on a unix platform. Hooray! :)
55128      path="$POTENTIAL_FREETYPE_LIB_PATH"
55129      has_space=`$ECHO "$path" | $GREP " "`
55130      if test "x$has_space" != x; then
55131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55132$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55133        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55134      fi
55135
55136      # Use eval to expand a potential ~
55137      eval path="$path"
55138      if test ! -f "$path" && test ! -d "$path"; then
55139        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55140      fi
55141
55142      if test -d "$path"; then
55143        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55144      else
55145        dir="`$DIRNAME "$path"`"
55146        base="`$BASENAME "$path"`"
55147        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55148      fi
55149    fi
55150  fi
55151
55152
55153    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55155$as_echo_n "checking for freetype includes... " >&6; }
55156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55157$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55158    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55160$as_echo_n "checking for freetype libraries... " >&6; }
55161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55162$as_echo "$FREETYPE_LIB_PATH" >&6; }
55163  fi
55164
55165              if test "x$FOUND_FREETYPE" != xyes; then
55166
55167  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55168  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
55169  METHOD="well-known location"
55170
55171  # Let's start with an optimistic view of the world :-)
55172  FOUND_FREETYPE=yes
55173
55174  # First look for the canonical freetype main include file ft2build.h.
55175  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55176    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55177    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55178    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55179      # Fail.
55180      FOUND_FREETYPE=no
55181    fi
55182  fi
55183
55184  if test "x$FOUND_FREETYPE" = xyes; then
55185    # Include file found, let's continue the sanity check.
55186    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55187$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55188
55189    # Reset to default value
55190    FREETYPE_BASE_NAME=freetype
55191    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55192    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55193      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55194          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55195        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55196        # for the .6 version explicitly.
55197        FREETYPE_BASE_NAME=freetype.6
55198        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55199        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55200$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55201      else
55202        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55203$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55204        FOUND_FREETYPE=no
55205      fi
55206    else
55207      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55208        # On Windows, we will need both .lib and .dll file.
55209        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55210          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55211$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55212          FOUND_FREETYPE=no
55213        fi
55214      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55215          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55216        # Found lib in isa dir, use that instead.
55217        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55218        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55219$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55220      fi
55221    fi
55222  fi
55223
55224  if test "x$FOUND_FREETYPE" = xyes; then
55225
55226  # Only process if variable expands to non-empty
55227
55228  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55230
55231  # Input might be given as Windows format, start by converting to
55232  # unix format.
55233  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55234  new_path=`$CYGPATH -u "$path"`
55235
55236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55239  # "foo.exe" is OK but "foo" is an error.
55240  #
55241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55242  # It is also a way to make sure we got the proper file name for the real test later on.
55243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55244  if test "x$test_shortpath" = x; then
55245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55246$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55247    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55248  fi
55249
55250  # Call helper function which possibly converts this using DOS-style short mode.
55251  # If so, the updated path is stored in $new_path.
55252
55253  input_path="$new_path"
55254  # Check if we need to convert this using DOS-style short mode. If the path
55255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55256  # take no chances and rewrite it.
55257  # Note: m4 eats our [], so we need to use [ and ] instead.
55258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55259  if test "x$has_forbidden_chars" != x; then
55260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55264      # Going to short mode and back again did indeed matter. Since short mode is
55265      # case insensitive, let's make it lowercase to improve readability.
55266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55267      # Now convert it back to Unix-style (cygpath)
55268      input_path=`$CYGPATH -u "$shortmode_path"`
55269      new_path="$input_path"
55270    fi
55271  fi
55272
55273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55274  if test "x$test_cygdrive_prefix" = x; then
55275    # As a simple fix, exclude /usr/bin since it's not a real path.
55276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55278      # a path prefixed by /cygdrive for fixpath to work.
55279      new_path="$CYGWIN_ROOT_PATH$input_path"
55280    fi
55281  fi
55282
55283
55284  if test "x$path" != "x$new_path"; then
55285    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55287$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55288  fi
55289
55290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55291
55292  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55293  has_colon=`$ECHO $path | $GREP ^.:`
55294  new_path="$path"
55295  if test "x$has_colon" = x; then
55296    # Not in mixed or Windows style, start by that.
55297    new_path=`cmd //c echo $path`
55298  fi
55299
55300
55301  input_path="$new_path"
55302  # Check if we need to convert this using DOS-style short mode. If the path
55303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55304  # take no chances and rewrite it.
55305  # Note: m4 eats our [], so we need to use [ and ] instead.
55306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55307  if test "x$has_forbidden_chars" != x; then
55308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55310  fi
55311
55312
55313  windows_path="$new_path"
55314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55315    unix_path=`$CYGPATH -u "$windows_path"`
55316    new_path="$unix_path"
55317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55319    new_path="$unix_path"
55320  fi
55321
55322  if test "x$path" != "x$new_path"; then
55323    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55325$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55326  fi
55327
55328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55330
55331    else
55332      # We're on a unix platform. Hooray! :)
55333      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55334      has_space=`$ECHO "$path" | $GREP " "`
55335      if test "x$has_space" != x; then
55336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55337$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55339      fi
55340
55341      # Use eval to expand a potential ~
55342      eval path="$path"
55343      if test ! -f "$path" && test ! -d "$path"; then
55344        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55345      fi
55346
55347      if test -d "$path"; then
55348        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55349      else
55350        dir="`$DIRNAME "$path"`"
55351        base="`$BASENAME "$path"`"
55352        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55353      fi
55354    fi
55355  fi
55356
55357
55358  # Only process if variable expands to non-empty
55359
55360  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55362
55363  # Input might be given as Windows format, start by converting to
55364  # unix format.
55365  path="$POTENTIAL_FREETYPE_LIB_PATH"
55366  new_path=`$CYGPATH -u "$path"`
55367
55368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55371  # "foo.exe" is OK but "foo" is an error.
55372  #
55373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55374  # It is also a way to make sure we got the proper file name for the real test later on.
55375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55376  if test "x$test_shortpath" = x; then
55377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55378$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55379    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55380  fi
55381
55382  # Call helper function which possibly converts this using DOS-style short mode.
55383  # If so, the updated path is stored in $new_path.
55384
55385  input_path="$new_path"
55386  # Check if we need to convert this using DOS-style short mode. If the path
55387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55388  # take no chances and rewrite it.
55389  # Note: m4 eats our [], so we need to use [ and ] instead.
55390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55391  if test "x$has_forbidden_chars" != x; then
55392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55396      # Going to short mode and back again did indeed matter. Since short mode is
55397      # case insensitive, let's make it lowercase to improve readability.
55398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55399      # Now convert it back to Unix-style (cygpath)
55400      input_path=`$CYGPATH -u "$shortmode_path"`
55401      new_path="$input_path"
55402    fi
55403  fi
55404
55405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55406  if test "x$test_cygdrive_prefix" = x; then
55407    # As a simple fix, exclude /usr/bin since it's not a real path.
55408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55410      # a path prefixed by /cygdrive for fixpath to work.
55411      new_path="$CYGWIN_ROOT_PATH$input_path"
55412    fi
55413  fi
55414
55415
55416  if test "x$path" != "x$new_path"; then
55417    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55419$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55420  fi
55421
55422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55423
55424  path="$POTENTIAL_FREETYPE_LIB_PATH"
55425  has_colon=`$ECHO $path | $GREP ^.:`
55426  new_path="$path"
55427  if test "x$has_colon" = x; then
55428    # Not in mixed or Windows style, start by that.
55429    new_path=`cmd //c echo $path`
55430  fi
55431
55432
55433  input_path="$new_path"
55434  # Check if we need to convert this using DOS-style short mode. If the path
55435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55436  # take no chances and rewrite it.
55437  # Note: m4 eats our [], so we need to use [ and ] instead.
55438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55439  if test "x$has_forbidden_chars" != x; then
55440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55442  fi
55443
55444
55445  windows_path="$new_path"
55446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55447    unix_path=`$CYGPATH -u "$windows_path"`
55448    new_path="$unix_path"
55449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55451    new_path="$unix_path"
55452  fi
55453
55454  if test "x$path" != "x$new_path"; then
55455    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55457$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55458  fi
55459
55460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55462
55463    else
55464      # We're on a unix platform. Hooray! :)
55465      path="$POTENTIAL_FREETYPE_LIB_PATH"
55466      has_space=`$ECHO "$path" | $GREP " "`
55467      if test "x$has_space" != x; then
55468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55469$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55470        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55471      fi
55472
55473      # Use eval to expand a potential ~
55474      eval path="$path"
55475      if test ! -f "$path" && test ! -d "$path"; then
55476        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55477      fi
55478
55479      if test -d "$path"; then
55480        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55481      else
55482        dir="`$DIRNAME "$path"`"
55483        base="`$BASENAME "$path"`"
55484        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55485      fi
55486    fi
55487  fi
55488
55489
55490    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55492$as_echo_n "checking for freetype includes... " >&6; }
55493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55494$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55495    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55497$as_echo_n "checking for freetype libraries... " >&6; }
55498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55499$as_echo "$FREETYPE_LIB_PATH" >&6; }
55500  fi
55501
55502              fi
55503            fi
55504          fi
55505        fi
55506      fi # end check in well-known locations
55507
55508      if test "x$FOUND_FREETYPE" != xyes; then
55509
55510  # Print a helpful message on how to acquire the necessary build dependency.
55511  # freetype is the help tag: freetype, cups, alsa etc
55512  MISSING_DEPENDENCY=freetype
55513
55514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55515    cygwin_help $MISSING_DEPENDENCY
55516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55517    msys_help $MISSING_DEPENDENCY
55518  else
55519    PKGHANDLER_COMMAND=
55520
55521    case $PKGHANDLER in
55522      apt-get)
55523        apt_help     $MISSING_DEPENDENCY ;;
55524      yum)
55525        yum_help     $MISSING_DEPENDENCY ;;
55526      port)
55527        port_help    $MISSING_DEPENDENCY ;;
55528      pkgutil)
55529        pkgutil_help $MISSING_DEPENDENCY ;;
55530      pkgadd)
55531        pkgadd_help  $MISSING_DEPENDENCY ;;
55532    esac
55533
55534    if test "x$PKGHANDLER_COMMAND" != x; then
55535      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55536    fi
55537  fi
55538
55539        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
55540      fi
55541    fi # end user specified settings
55542
55543    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
55544    if test "x$FREETYPE_CFLAGS" = x; then
55545
55546  # Only process if variable expands to non-empty
55547
55548  if test "x$FREETYPE_INCLUDE_PATH" != x; then
55549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55550
55551  # Input might be given as Windows format, start by converting to
55552  # unix format.
55553  path="$FREETYPE_INCLUDE_PATH"
55554  new_path=`$CYGPATH -u "$path"`
55555
55556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55559  # "foo.exe" is OK but "foo" is an error.
55560  #
55561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55562  # It is also a way to make sure we got the proper file name for the real test later on.
55563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55564  if test "x$test_shortpath" = x; then
55565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55566$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55567    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
55568  fi
55569
55570  # Call helper function which possibly converts this using DOS-style short mode.
55571  # If so, the updated path is stored in $new_path.
55572
55573  input_path="$new_path"
55574  # Check if we need to convert this using DOS-style short mode. If the path
55575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55576  # take no chances and rewrite it.
55577  # Note: m4 eats our [], so we need to use [ and ] instead.
55578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55579  if test "x$has_forbidden_chars" != x; then
55580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55584      # Going to short mode and back again did indeed matter. Since short mode is
55585      # case insensitive, let's make it lowercase to improve readability.
55586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55587      # Now convert it back to Unix-style (cygpath)
55588      input_path=`$CYGPATH -u "$shortmode_path"`
55589      new_path="$input_path"
55590    fi
55591  fi
55592
55593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55594  if test "x$test_cygdrive_prefix" = x; then
55595    # As a simple fix, exclude /usr/bin since it's not a real path.
55596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55598      # a path prefixed by /cygdrive for fixpath to work.
55599      new_path="$CYGWIN_ROOT_PATH$input_path"
55600    fi
55601  fi
55602
55603
55604  if test "x$path" != "x$new_path"; then
55605    FREETYPE_INCLUDE_PATH="$new_path"
55606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55607$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55608  fi
55609
55610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55611
55612  path="$FREETYPE_INCLUDE_PATH"
55613  has_colon=`$ECHO $path | $GREP ^.:`
55614  new_path="$path"
55615  if test "x$has_colon" = x; then
55616    # Not in mixed or Windows style, start by that.
55617    new_path=`cmd //c echo $path`
55618  fi
55619
55620
55621  input_path="$new_path"
55622  # Check if we need to convert this using DOS-style short mode. If the path
55623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55624  # take no chances and rewrite it.
55625  # Note: m4 eats our [], so we need to use [ and ] instead.
55626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55627  if test "x$has_forbidden_chars" != x; then
55628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55630  fi
55631
55632
55633  windows_path="$new_path"
55634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55635    unix_path=`$CYGPATH -u "$windows_path"`
55636    new_path="$unix_path"
55637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55639    new_path="$unix_path"
55640  fi
55641
55642  if test "x$path" != "x$new_path"; then
55643    FREETYPE_INCLUDE_PATH="$new_path"
55644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55645$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55646  fi
55647
55648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55650
55651    else
55652      # We're on a unix platform. Hooray! :)
55653      path="$FREETYPE_INCLUDE_PATH"
55654      has_space=`$ECHO "$path" | $GREP " "`
55655      if test "x$has_space" != x; then
55656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55657$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55658        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55659      fi
55660
55661      # Use eval to expand a potential ~
55662      eval path="$path"
55663      if test ! -f "$path" && test ! -d "$path"; then
55664        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55665      fi
55666
55667      if test -d "$path"; then
55668        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55669      else
55670        dir="`$DIRNAME "$path"`"
55671        base="`$BASENAME "$path"`"
55672        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55673      fi
55674    fi
55675  fi
55676
55677      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
55678        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
55679      else
55680        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
55681      fi
55682    fi
55683
55684    if test "x$FREETYPE_LIBS" = x; then
55685
55686  # Only process if variable expands to non-empty
55687
55688  if test "x$FREETYPE_LIB_PATH" != x; then
55689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55690
55691  # Input might be given as Windows format, start by converting to
55692  # unix format.
55693  path="$FREETYPE_LIB_PATH"
55694  new_path=`$CYGPATH -u "$path"`
55695
55696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55699  # "foo.exe" is OK but "foo" is an error.
55700  #
55701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55702  # It is also a way to make sure we got the proper file name for the real test later on.
55703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55704  if test "x$test_shortpath" = x; then
55705    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55706$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55707    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
55708  fi
55709
55710  # Call helper function which possibly converts this using DOS-style short mode.
55711  # If so, the updated path is stored in $new_path.
55712
55713  input_path="$new_path"
55714  # Check if we need to convert this using DOS-style short mode. If the path
55715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55716  # take no chances and rewrite it.
55717  # Note: m4 eats our [], so we need to use [ and ] instead.
55718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55719  if test "x$has_forbidden_chars" != x; then
55720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55724      # Going to short mode and back again did indeed matter. Since short mode is
55725      # case insensitive, let's make it lowercase to improve readability.
55726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55727      # Now convert it back to Unix-style (cygpath)
55728      input_path=`$CYGPATH -u "$shortmode_path"`
55729      new_path="$input_path"
55730    fi
55731  fi
55732
55733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55734  if test "x$test_cygdrive_prefix" = x; then
55735    # As a simple fix, exclude /usr/bin since it's not a real path.
55736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55738      # a path prefixed by /cygdrive for fixpath to work.
55739      new_path="$CYGWIN_ROOT_PATH$input_path"
55740    fi
55741  fi
55742
55743
55744  if test "x$path" != "x$new_path"; then
55745    FREETYPE_LIB_PATH="$new_path"
55746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
55747$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55748  fi
55749
55750    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55751
55752  path="$FREETYPE_LIB_PATH"
55753  has_colon=`$ECHO $path | $GREP ^.:`
55754  new_path="$path"
55755  if test "x$has_colon" = x; then
55756    # Not in mixed or Windows style, start by that.
55757    new_path=`cmd //c echo $path`
55758  fi
55759
55760
55761  input_path="$new_path"
55762  # Check if we need to convert this using DOS-style short mode. If the path
55763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55764  # take no chances and rewrite it.
55765  # Note: m4 eats our [], so we need to use [ and ] instead.
55766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55767  if test "x$has_forbidden_chars" != x; then
55768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55770  fi
55771
55772
55773  windows_path="$new_path"
55774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55775    unix_path=`$CYGPATH -u "$windows_path"`
55776    new_path="$unix_path"
55777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55779    new_path="$unix_path"
55780  fi
55781
55782  if test "x$path" != "x$new_path"; then
55783    FREETYPE_LIB_PATH="$new_path"
55784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
55785$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55786  fi
55787
55788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55790
55791    else
55792      # We're on a unix platform. Hooray! :)
55793      path="$FREETYPE_LIB_PATH"
55794      has_space=`$ECHO "$path" | $GREP " "`
55795      if test "x$has_space" != x; then
55796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55797$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55798        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55799      fi
55800
55801      # Use eval to expand a potential ~
55802      eval path="$path"
55803      if test ! -f "$path" && test ! -d "$path"; then
55804        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55805      fi
55806
55807      if test -d "$path"; then
55808        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55809      else
55810        dir="`$DIRNAME "$path"`"
55811        base="`$BASENAME "$path"`"
55812        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55813      fi
55814    fi
55815  fi
55816
55817      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55818        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
55819      else
55820        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
55821      fi
55822    fi
55823
55824    # Try to compile it
55825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
55826$as_echo_n "checking if we can compile and link with freetype... " >&6; }
55827    ac_ext=cpp
55828ac_cpp='$CXXCPP $CPPFLAGS'
55829ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55830ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55831ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55832
55833    PREV_CXXCFLAGS="$CXXFLAGS"
55834    PREV_LIBS="$LIBS"
55835    PREV_CXX="$CXX"
55836    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
55837    LIBS="$LIBS $FREETYPE_LIBS"
55838    CXX="$FIXPATH $CXX"
55839    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55840/* end confdefs.h.  */
55841
55842          #include<ft2build.h>
55843          #include FT_FREETYPE_H
55844          int main () {
55845            FT_Init_FreeType(NULL);
55846            return 0;
55847          }
55848
55849_ACEOF
55850if ac_fn_cxx_try_link "$LINENO"; then :
55851
55852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55853$as_echo "yes" >&6; }
55854
55855else
55856
55857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55858$as_echo "no" >&6; }
55859          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
55860$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
55861          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
55862$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
55863
55864
55865  # Print a helpful message on how to acquire the necessary build dependency.
55866  # freetype is the help tag: freetype, cups, alsa etc
55867  MISSING_DEPENDENCY=freetype
55868
55869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55870    cygwin_help $MISSING_DEPENDENCY
55871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55872    msys_help $MISSING_DEPENDENCY
55873  else
55874    PKGHANDLER_COMMAND=
55875
55876    case $PKGHANDLER in
55877      apt-get)
55878        apt_help     $MISSING_DEPENDENCY ;;
55879      yum)
55880        yum_help     $MISSING_DEPENDENCY ;;
55881      port)
55882        port_help    $MISSING_DEPENDENCY ;;
55883      pkgutil)
55884        pkgutil_help $MISSING_DEPENDENCY ;;
55885      pkgadd)
55886        pkgadd_help  $MISSING_DEPENDENCY ;;
55887    esac
55888
55889    if test "x$PKGHANDLER_COMMAND" != x; then
55890      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55891    fi
55892  fi
55893
55894
55895          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
55896
55897
55898fi
55899rm -f core conftest.err conftest.$ac_objext \
55900    conftest$ac_exeext conftest.$ac_ext
55901    CXXCFLAGS="$PREV_CXXFLAGS"
55902    LIBS="$PREV_LIBS"
55903    CXX="$PREV_CXX"
55904    ac_ext=cpp
55905ac_cpp='$CXXCPP $CPPFLAGS'
55906ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55907ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55908ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55909
55910
55911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
55912$as_echo_n "checking if we should bundle freetype... " >&6; }
55913    if test "x$BUNDLE_FREETYPE" = xyes; then
55914      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
55915    fi
55916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
55917$as_echo "$BUNDLE_FREETYPE" >&6; }
55918
55919  fi # end freetype needed
55920
55921
55922
55923
55924
55925
55926
55927# Check whether --with-alsa was given.
55928if test "${with_alsa+set}" = set; then :
55929  withval=$with_alsa;
55930fi
55931
55932
55933# Check whether --with-alsa-include was given.
55934if test "${with_alsa_include+set}" = set; then :
55935  withval=$with_alsa_include;
55936fi
55937
55938
55939# Check whether --with-alsa-lib was given.
55940if test "${with_alsa_lib+set}" = set; then :
55941  withval=$with_alsa_lib;
55942fi
55943
55944
55945  if test "x$NEEDS_LIB_ALSA" = xfalse; then
55946    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
55947        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
55948        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
55949      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
55950$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
55951    fi
55952    ALSA_CFLAGS=
55953    ALSA_LIBS=
55954  else
55955    ALSA_FOUND=no
55956
55957    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
55958      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
55959    fi
55960
55961    if test "x${with_alsa}" != x; then
55962      ALSA_LIBS="-L${with_alsa}/lib -lasound"
55963      ALSA_CFLAGS="-I${with_alsa}/include"
55964      ALSA_FOUND=yes
55965    fi
55966    if test "x${with_alsa_include}" != x; then
55967      ALSA_CFLAGS="-I${with_alsa_include}"
55968      ALSA_FOUND=yes
55969    fi
55970    if test "x${with_alsa_lib}" != x; then
55971      ALSA_LIBS="-L${with_alsa_lib} -lasound"
55972      ALSA_FOUND=yes
55973    fi
55974    # Do not try pkg-config if we have a sysroot set.
55975    if test "x$SYSROOT" = x; then
55976      if test "x$ALSA_FOUND" = xno; then
55977
55978pkg_failed=no
55979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
55980$as_echo_n "checking for ALSA... " >&6; }
55981
55982if test -n "$ALSA_CFLAGS"; then
55983    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
55984 elif test -n "$PKG_CONFIG"; then
55985    if test -n "$PKG_CONFIG" && \
55986    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55987  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55988  ac_status=$?
55989  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55990  test $ac_status = 0; }; then
55991  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
55992else
55993  pkg_failed=yes
55994fi
55995 else
55996    pkg_failed=untried
55997fi
55998if test -n "$ALSA_LIBS"; then
55999    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
56000 elif test -n "$PKG_CONFIG"; then
56001    if test -n "$PKG_CONFIG" && \
56002    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
56003  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
56004  ac_status=$?
56005  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56006  test $ac_status = 0; }; then
56007  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
56008else
56009  pkg_failed=yes
56010fi
56011 else
56012    pkg_failed=untried
56013fi
56014
56015
56016
56017if test $pkg_failed = yes; then
56018
56019if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56020        _pkg_short_errors_supported=yes
56021else
56022        _pkg_short_errors_supported=no
56023fi
56024        if test $_pkg_short_errors_supported = yes; then
56025	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
56026        else
56027	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
56028        fi
56029	# Put the nasty error message in config.log where it belongs
56030	echo "$ALSA_PKG_ERRORS" >&5
56031
56032	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56033$as_echo "no" >&6; }
56034                ALSA_FOUND=no
56035elif test $pkg_failed = untried; then
56036	ALSA_FOUND=no
56037else
56038	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
56039	ALSA_LIBS=$pkg_cv_ALSA_LIBS
56040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56041$as_echo "yes" >&6; }
56042	ALSA_FOUND=yes
56043fi
56044      fi
56045    fi
56046    if test "x$ALSA_FOUND" = xno; then
56047      for ac_header in alsa/asoundlib.h
56048do :
56049  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
56050if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
56051  cat >>confdefs.h <<_ACEOF
56052#define HAVE_ALSA_ASOUNDLIB_H 1
56053_ACEOF
56054
56055            ALSA_FOUND=yes
56056            ALSA_CFLAGS=-Iignoreme
56057            ALSA_LIBS=-lasound
56058            DEFAULT_ALSA=yes
56059
56060else
56061  ALSA_FOUND=no
56062
56063fi
56064
56065done
56066
56067    fi
56068    if test "x$ALSA_FOUND" = xno; then
56069
56070  # Print a helpful message on how to acquire the necessary build dependency.
56071  # alsa is the help tag: freetype, cups, alsa etc
56072  MISSING_DEPENDENCY=alsa
56073
56074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56075    cygwin_help $MISSING_DEPENDENCY
56076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56077    msys_help $MISSING_DEPENDENCY
56078  else
56079    PKGHANDLER_COMMAND=
56080
56081    case $PKGHANDLER in
56082      apt-get)
56083        apt_help     $MISSING_DEPENDENCY ;;
56084      yum)
56085        yum_help     $MISSING_DEPENDENCY ;;
56086      port)
56087        port_help    $MISSING_DEPENDENCY ;;
56088      pkgutil)
56089        pkgutil_help $MISSING_DEPENDENCY ;;
56090      pkgadd)
56091        pkgadd_help  $MISSING_DEPENDENCY ;;
56092    esac
56093
56094    if test "x$PKGHANDLER_COMMAND" != x; then
56095      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56096    fi
56097  fi
56098
56099      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
56100    fi
56101  fi
56102
56103
56104
56105
56106
56107
56108# Check whether --with-libffi was given.
56109if test "${with_libffi+set}" = set; then :
56110  withval=$with_libffi;
56111fi
56112
56113
56114# Check whether --with-libffi-include was given.
56115if test "${with_libffi_include+set}" = set; then :
56116  withval=$with_libffi_include;
56117fi
56118
56119
56120# Check whether --with-libffi-lib was given.
56121if test "${with_libffi_lib+set}" = set; then :
56122  withval=$with_libffi_lib;
56123fi
56124
56125
56126  if test "x$NEEDS_LIB_FFI" = xfalse; then
56127    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
56128        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
56129        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
56130      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
56131$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
56132    fi
56133    LIBFFI_CFLAGS=
56134    LIBFFI_LIBS=
56135  else
56136    LIBFFI_FOUND=no
56137
56138    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
56139      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
56140    fi
56141
56142    if test "x${with_libffi}" != x; then
56143      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
56144      LIBFFI_CFLAGS="-I${with_libffi}/include"
56145      LIBFFI_FOUND=yes
56146    fi
56147    if test "x${with_libffi_include}" != x; then
56148      LIBFFI_CFLAGS="-I${with_libffi_include}"
56149      LIBFFI_FOUND=yes
56150    fi
56151    if test "x${with_libffi_lib}" != x; then
56152      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
56153      LIBFFI_FOUND=yes
56154    fi
56155    # Do not try pkg-config if we have a sysroot set.
56156    if test "x$SYSROOT" = x; then
56157      if test "x$LIBFFI_FOUND" = xno; then
56158        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
56159
56160pkg_failed=no
56161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
56162$as_echo_n "checking for LIBFFI... " >&6; }
56163
56164if test -n "$LIBFFI_CFLAGS"; then
56165    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
56166 elif test -n "$PKG_CONFIG"; then
56167    if test -n "$PKG_CONFIG" && \
56168    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
56169  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
56170  ac_status=$?
56171  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56172  test $ac_status = 0; }; then
56173  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
56174else
56175  pkg_failed=yes
56176fi
56177 else
56178    pkg_failed=untried
56179fi
56180if test -n "$LIBFFI_LIBS"; then
56181    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
56182 elif test -n "$PKG_CONFIG"; then
56183    if test -n "$PKG_CONFIG" && \
56184    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
56185  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
56186  ac_status=$?
56187  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56188  test $ac_status = 0; }; then
56189  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
56190else
56191  pkg_failed=yes
56192fi
56193 else
56194    pkg_failed=untried
56195fi
56196
56197
56198
56199if test $pkg_failed = yes; then
56200
56201if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56202        _pkg_short_errors_supported=yes
56203else
56204        _pkg_short_errors_supported=no
56205fi
56206        if test $_pkg_short_errors_supported = yes; then
56207	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
56208        else
56209	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
56210        fi
56211	# Put the nasty error message in config.log where it belongs
56212	echo "$LIBFFI_PKG_ERRORS" >&5
56213
56214	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56215$as_echo "no" >&6; }
56216                LIBFFI_FOUND=no
56217elif test $pkg_failed = untried; then
56218	LIBFFI_FOUND=no
56219else
56220	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
56221	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
56222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56223$as_echo "yes" >&6; }
56224	LIBFFI_FOUND=yes
56225fi
56226      fi
56227    fi
56228    if test "x$LIBFFI_FOUND" = xno; then
56229      for ac_header in ffi.h
56230do :
56231  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
56232if test "x$ac_cv_header_ffi_h" = xyes; then :
56233  cat >>confdefs.h <<_ACEOF
56234#define HAVE_FFI_H 1
56235_ACEOF
56236
56237            LIBFFI_FOUND=yes
56238            LIBFFI_CFLAGS=
56239            LIBFFI_LIBS=-lffi
56240
56241else
56242  LIBFFI_FOUND=no
56243
56244fi
56245
56246done
56247
56248    fi
56249    if test "x$LIBFFI_FOUND" = xno; then
56250
56251  # Print a helpful message on how to acquire the necessary build dependency.
56252  # ffi is the help tag: freetype, cups, alsa etc
56253  MISSING_DEPENDENCY=ffi
56254
56255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56256    cygwin_help $MISSING_DEPENDENCY
56257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56258    msys_help $MISSING_DEPENDENCY
56259  else
56260    PKGHANDLER_COMMAND=
56261
56262    case $PKGHANDLER in
56263      apt-get)
56264        apt_help     $MISSING_DEPENDENCY ;;
56265      yum)
56266        yum_help     $MISSING_DEPENDENCY ;;
56267      port)
56268        port_help    $MISSING_DEPENDENCY ;;
56269      pkgutil)
56270        pkgutil_help $MISSING_DEPENDENCY ;;
56271      pkgadd)
56272        pkgadd_help  $MISSING_DEPENDENCY ;;
56273    esac
56274
56275    if test "x$PKGHANDLER_COMMAND" != x; then
56276      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56277    fi
56278  fi
56279
56280      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
56281    fi
56282
56283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
56284$as_echo_n "checking if libffi works... " >&6; }
56285    ac_ext=c
56286ac_cpp='$CPP $CPPFLAGS'
56287ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56288ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56289ac_compiler_gnu=$ac_cv_c_compiler_gnu
56290
56291    OLD_CFLAGS="$CFLAGS"
56292    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
56293    OLD_LIBS="$LIBS"
56294    LIBS="$LIBS $LIBFFI_LIBS"
56295    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56296/* end confdefs.h.  */
56297#include <ffi.h>
56298int
56299main ()
56300{
56301
56302          ffi_call(NULL, NULL, NULL, NULL);
56303          return 0;
56304
56305  ;
56306  return 0;
56307}
56308_ACEOF
56309if ac_fn_c_try_link "$LINENO"; then :
56310  LIBFFI_WORKS=yes
56311else
56312  LIBFFI_WORKS=no
56313
56314fi
56315rm -f core conftest.err conftest.$ac_objext \
56316    conftest$ac_exeext conftest.$ac_ext
56317    CFLAGS="$OLD_CFLAGS"
56318    LIBS="$OLD_LIBS"
56319    ac_ext=cpp
56320ac_cpp='$CXXCPP $CPPFLAGS'
56321ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56322ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56323ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56324
56325    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
56326$as_echo "$LIBFFI_WORKS" >&6; }
56327
56328    if test "x$LIBFFI_WORKS" = xno; then
56329
56330  # Print a helpful message on how to acquire the necessary build dependency.
56331  # ffi is the help tag: freetype, cups, alsa etc
56332  MISSING_DEPENDENCY=ffi
56333
56334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56335    cygwin_help $MISSING_DEPENDENCY
56336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56337    msys_help $MISSING_DEPENDENCY
56338  else
56339    PKGHANDLER_COMMAND=
56340
56341    case $PKGHANDLER in
56342      apt-get)
56343        apt_help     $MISSING_DEPENDENCY ;;
56344      yum)
56345        yum_help     $MISSING_DEPENDENCY ;;
56346      port)
56347        port_help    $MISSING_DEPENDENCY ;;
56348      pkgutil)
56349        pkgutil_help $MISSING_DEPENDENCY ;;
56350      pkgadd)
56351        pkgadd_help  $MISSING_DEPENDENCY ;;
56352    esac
56353
56354    if test "x$PKGHANDLER_COMMAND" != x; then
56355      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56356    fi
56357  fi
56358
56359      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
56360    fi
56361  fi
56362
56363
56364
56365
56366
56367  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
56368    # Extract the first word of "llvm-config", so it can be a program name with args.
56369set dummy llvm-config; ac_word=$2
56370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56371$as_echo_n "checking for $ac_word... " >&6; }
56372if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
56373  $as_echo_n "(cached) " >&6
56374else
56375  if test -n "$LLVM_CONFIG"; then
56376  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
56377else
56378as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56379for as_dir in $PATH
56380do
56381  IFS=$as_save_IFS
56382  test -z "$as_dir" && as_dir=.
56383    for ac_exec_ext in '' $ac_executable_extensions; do
56384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56385    ac_cv_prog_LLVM_CONFIG="llvm-config"
56386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56387    break 2
56388  fi
56389done
56390  done
56391IFS=$as_save_IFS
56392
56393fi
56394fi
56395LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
56396if test -n "$LLVM_CONFIG"; then
56397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
56398$as_echo "$LLVM_CONFIG" >&6; }
56399else
56400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56401$as_echo "no" >&6; }
56402fi
56403
56404
56405
56406    if test "x$LLVM_CONFIG" != xllvm-config; then
56407      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
56408    fi
56409
56410    llvm_components="jit mcjit engine nativecodegen native"
56411    unset LLVM_CFLAGS
56412    for flag in $("$LLVM_CONFIG" --cxxflags); do
56413      if echo "${flag}" | grep -q '^-[ID]'; then
56414        if test "${flag}" != "-D_DEBUG" ; then
56415          if test "${LLVM_CFLAGS}" != "" ; then
56416            LLVM_CFLAGS="${LLVM_CFLAGS} "
56417          fi
56418          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
56419        fi
56420      fi
56421    done
56422    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
56423    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
56424
56425    unset LLVM_LDFLAGS
56426    for flag in $("${LLVM_CONFIG}" --ldflags); do
56427      if echo "${flag}" | grep -q '^-L'; then
56428        if test "${LLVM_LDFLAGS}" != ""; then
56429          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
56430        fi
56431        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
56432      fi
56433    done
56434
56435    unset LLVM_LIBS
56436    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
56437      if echo "${flag}" | grep -q '^-l'; then
56438        if test "${LLVM_LIBS}" != ""; then
56439          LLVM_LIBS="${LLVM_LIBS} "
56440        fi
56441        LLVM_LIBS="${LLVM_LIBS}${flag}"
56442      fi
56443    done
56444
56445
56446
56447
56448  fi
56449
56450
56451
56452# Check whether --with-libjpeg was given.
56453if test "${with_libjpeg+set}" = set; then :
56454  withval=$with_libjpeg;
56455fi
56456
56457
56458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
56459$as_echo_n "checking for which libjpeg to use... " >&6; }
56460  # default is bundled
56461  DEFAULT_LIBJPEG=bundled
56462  # if user didn't specify, use DEFAULT_LIBJPEG
56463  if test "x${with_libjpeg}" = "x"; then
56464    with_libjpeg=${DEFAULT_LIBJPEG}
56465  fi
56466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
56467$as_echo "${with_libjpeg}" >&6; }
56468
56469  if test "x${with_libjpeg}" = "xbundled"; then
56470    USE_EXTERNAL_LIBJPEG=false
56471  elif test "x${with_libjpeg}" = "xsystem"; then
56472    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
56473if test "x$ac_cv_header_jpeglib_h" = xyes; then :
56474
56475else
56476   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
56477fi
56478
56479
56480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
56481$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
56482if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
56483  $as_echo_n "(cached) " >&6
56484else
56485  ac_check_lib_save_LIBS=$LIBS
56486LIBS="-ljpeg  $LIBS"
56487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56488/* end confdefs.h.  */
56489
56490/* Override any GCC internal prototype to avoid an error.
56491   Use char because int might match the return type of a GCC
56492   builtin and then its argument prototype would still apply.  */
56493#ifdef __cplusplus
56494extern "C"
56495#endif
56496char jpeg_CreateDecompress ();
56497int
56498main ()
56499{
56500return jpeg_CreateDecompress ();
56501  ;
56502  return 0;
56503}
56504_ACEOF
56505if ac_fn_cxx_try_link "$LINENO"; then :
56506  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
56507else
56508  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
56509fi
56510rm -f core conftest.err conftest.$ac_objext \
56511    conftest$ac_exeext conftest.$ac_ext
56512LIBS=$ac_check_lib_save_LIBS
56513fi
56514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
56515$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
56516if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
56517  cat >>confdefs.h <<_ACEOF
56518#define HAVE_LIBJPEG 1
56519_ACEOF
56520
56521  LIBS="-ljpeg $LIBS"
56522
56523else
56524   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
56525fi
56526
56527
56528    USE_EXTERNAL_LIBJPEG=true
56529  else
56530    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
56531  fi
56532
56533
56534
56535
56536
56537# Check whether --with-giflib was given.
56538if test "${with_giflib+set}" = set; then :
56539  withval=$with_giflib;
56540fi
56541
56542
56543  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
56544$as_echo_n "checking for which giflib to use... " >&6; }
56545  # default is bundled
56546  DEFAULT_GIFLIB=bundled
56547  # if user didn't specify, use DEFAULT_GIFLIB
56548  if test "x${with_giflib}" = "x"; then
56549    with_giflib=${DEFAULT_GIFLIB}
56550  fi
56551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
56552$as_echo "${with_giflib}" >&6; }
56553
56554  if test "x${with_giflib}" = "xbundled"; then
56555    USE_EXTERNAL_LIBGIF=false
56556  elif test "x${with_giflib}" = "xsystem"; then
56557    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
56558if test "x$ac_cv_header_gif_lib_h" = xyes; then :
56559
56560else
56561   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
56562fi
56563
56564
56565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
56566$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
56567if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
56568  $as_echo_n "(cached) " >&6
56569else
56570  ac_check_lib_save_LIBS=$LIBS
56571LIBS="-lgif  $LIBS"
56572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56573/* end confdefs.h.  */
56574
56575/* Override any GCC internal prototype to avoid an error.
56576   Use char because int might match the return type of a GCC
56577   builtin and then its argument prototype would still apply.  */
56578#ifdef __cplusplus
56579extern "C"
56580#endif
56581char DGifGetCode ();
56582int
56583main ()
56584{
56585return DGifGetCode ();
56586  ;
56587  return 0;
56588}
56589_ACEOF
56590if ac_fn_cxx_try_link "$LINENO"; then :
56591  ac_cv_lib_gif_DGifGetCode=yes
56592else
56593  ac_cv_lib_gif_DGifGetCode=no
56594fi
56595rm -f core conftest.err conftest.$ac_objext \
56596    conftest$ac_exeext conftest.$ac_ext
56597LIBS=$ac_check_lib_save_LIBS
56598fi
56599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
56600$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
56601if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
56602  cat >>confdefs.h <<_ACEOF
56603#define HAVE_LIBGIF 1
56604_ACEOF
56605
56606  LIBS="-lgif $LIBS"
56607
56608else
56609   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
56610fi
56611
56612
56613    USE_EXTERNAL_LIBGIF=true
56614  else
56615    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
56616  fi
56617
56618
56619
56620
56621
56622# Check whether --with-libpng was given.
56623if test "${with_libpng+set}" = set; then :
56624  withval=$with_libpng;
56625fi
56626
56627
56628  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
56629$as_echo_n "checking for which libpng to use... " >&6; }
56630
56631  # default is bundled
56632  DEFAULT_LIBPNG=bundled
56633  # if user didn't specify, use DEFAULT_LIBPNG
56634  if test "x${with_libpng}" = "x"; then
56635      with_libpng=${DEFAULT_LIBPNG}
56636  fi
56637
56638  if test "x${with_libpng}" = "xbundled"; then
56639      USE_EXTERNAL_LIBPNG=false
56640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56641$as_echo "bundled" >&6; }
56642  elif test "x${with_libpng}" = "xsystem"; then
56643
56644pkg_failed=no
56645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
56646$as_echo_n "checking for PNG... " >&6; }
56647
56648if test -n "$PNG_CFLAGS"; then
56649    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
56650 elif test -n "$PKG_CONFIG"; then
56651    if test -n "$PKG_CONFIG" && \
56652    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
56653  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
56654  ac_status=$?
56655  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56656  test $ac_status = 0; }; then
56657  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
56658else
56659  pkg_failed=yes
56660fi
56661 else
56662    pkg_failed=untried
56663fi
56664if test -n "$PNG_LIBS"; then
56665    pkg_cv_PNG_LIBS="$PNG_LIBS"
56666 elif test -n "$PKG_CONFIG"; then
56667    if test -n "$PKG_CONFIG" && \
56668    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
56669  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
56670  ac_status=$?
56671  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56672  test $ac_status = 0; }; then
56673  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
56674else
56675  pkg_failed=yes
56676fi
56677 else
56678    pkg_failed=untried
56679fi
56680
56681
56682
56683if test $pkg_failed = yes; then
56684
56685if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56686        _pkg_short_errors_supported=yes
56687else
56688        _pkg_short_errors_supported=no
56689fi
56690        if test $_pkg_short_errors_supported = yes; then
56691	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
56692        else
56693	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
56694        fi
56695	# Put the nasty error message in config.log where it belongs
56696	echo "$PNG_PKG_ERRORS" >&5
56697
56698	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56699$as_echo "no" >&6; }
56700                 LIBPNG_FOUND=no
56701elif test $pkg_failed = untried; then
56702	 LIBPNG_FOUND=no
56703else
56704	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
56705	PNG_LIBS=$pkg_cv_PNG_LIBS
56706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56707$as_echo "yes" >&6; }
56708	 LIBPNG_FOUND=yes
56709fi
56710      if test "x${LIBPNG_FOUND}" = "xyes"; then
56711          USE_EXTERNAL_LIBPNG=true
56712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56713$as_echo "system" >&6; }
56714      else
56715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
56716$as_echo "system not found" >&6; }
56717          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
56718      fi
56719  else
56720      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
56721  fi
56722
56723
56724
56725
56726
56727# Check whether --with-zlib was given.
56728if test "${with_zlib+set}" = set; then :
56729  withval=$with_zlib;
56730fi
56731
56732
56733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
56734$as_echo_n "checking for compress in -lz... " >&6; }
56735if ${ac_cv_lib_z_compress+:} false; then :
56736  $as_echo_n "(cached) " >&6
56737else
56738  ac_check_lib_save_LIBS=$LIBS
56739LIBS="-lz  $LIBS"
56740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56741/* end confdefs.h.  */
56742
56743/* Override any GCC internal prototype to avoid an error.
56744   Use char because int might match the return type of a GCC
56745   builtin and then its argument prototype would still apply.  */
56746#ifdef __cplusplus
56747extern "C"
56748#endif
56749char compress ();
56750int
56751main ()
56752{
56753return compress ();
56754  ;
56755  return 0;
56756}
56757_ACEOF
56758if ac_fn_cxx_try_link "$LINENO"; then :
56759  ac_cv_lib_z_compress=yes
56760else
56761  ac_cv_lib_z_compress=no
56762fi
56763rm -f core conftest.err conftest.$ac_objext \
56764    conftest$ac_exeext conftest.$ac_ext
56765LIBS=$ac_check_lib_save_LIBS
56766fi
56767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
56768$as_echo "$ac_cv_lib_z_compress" >&6; }
56769if test "x$ac_cv_lib_z_compress" = xyes; then :
56770   ZLIB_FOUND=yes
56771else
56772   ZLIB_FOUND=no
56773fi
56774
56775
56776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
56777$as_echo_n "checking for which zlib to use... " >&6; }
56778
56779  DEFAULT_ZLIB=bundled
56780  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
56781    # On macosx default is system...on others default is bundled
56782    DEFAULT_ZLIB=system
56783  fi
56784
56785  if test "x${ZLIB_FOUND}" != "xyes"; then
56786    # If we don't find any system...set default to bundled
56787    DEFAULT_ZLIB=bundled
56788  fi
56789
56790  # If user didn't specify, use DEFAULT_ZLIB
56791  if test "x${with_zlib}" = "x"; then
56792    with_zlib=${DEFAULT_ZLIB}
56793  fi
56794
56795  if test "x${with_zlib}" = "xbundled"; then
56796    USE_EXTERNAL_LIBZ=false
56797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56798$as_echo "bundled" >&6; }
56799  elif test "x${with_zlib}" = "xsystem"; then
56800    if test "x${ZLIB_FOUND}" = "xyes"; then
56801      USE_EXTERNAL_LIBZ=true
56802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56803$as_echo "system" >&6; }
56804    else
56805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
56806$as_echo "system not found" >&6; }
56807      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
56808    fi
56809  else
56810    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
56811  fi
56812
56813
56814
56815
56816
56817# Check whether --with-lcms was given.
56818if test "${with_lcms+set}" = set; then :
56819  withval=$with_lcms;
56820fi
56821
56822
56823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
56824$as_echo_n "checking for which lcms to use... " >&6; }
56825
56826  DEFAULT_LCMS=bundled
56827  # If user didn't specify, use DEFAULT_LCMS
56828  if test "x${with_lcms}" = "x"; then
56829      with_lcms=${DEFAULT_LCMS}
56830  fi
56831
56832  if test "x${with_lcms}" = "xbundled"; then
56833    USE_EXTERNAL_LCMS=false
56834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56835$as_echo "bundled" >&6; }
56836  elif test "x${with_lcms}" = "xsystem"; then
56837    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56838$as_echo "system" >&6; }
56839
56840pkg_failed=no
56841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
56842$as_echo_n "checking for LCMS... " >&6; }
56843
56844if test -n "$LCMS_CFLAGS"; then
56845    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
56846 elif test -n "$PKG_CONFIG"; then
56847    if test -n "$PKG_CONFIG" && \
56848    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
56849  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
56850  ac_status=$?
56851  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56852  test $ac_status = 0; }; then
56853  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
56854else
56855  pkg_failed=yes
56856fi
56857 else
56858    pkg_failed=untried
56859fi
56860if test -n "$LCMS_LIBS"; then
56861    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
56862 elif test -n "$PKG_CONFIG"; then
56863    if test -n "$PKG_CONFIG" && \
56864    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
56865  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
56866  ac_status=$?
56867  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56868  test $ac_status = 0; }; then
56869  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
56870else
56871  pkg_failed=yes
56872fi
56873 else
56874    pkg_failed=untried
56875fi
56876
56877
56878
56879if test $pkg_failed = yes; then
56880
56881if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56882        _pkg_short_errors_supported=yes
56883else
56884        _pkg_short_errors_supported=no
56885fi
56886        if test $_pkg_short_errors_supported = yes; then
56887	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
56888        else
56889	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
56890        fi
56891	# Put the nasty error message in config.log where it belongs
56892	echo "$LCMS_PKG_ERRORS" >&5
56893
56894	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56895$as_echo "no" >&6; }
56896                LCMS_FOUND=no
56897elif test $pkg_failed = untried; then
56898	LCMS_FOUND=no
56899else
56900	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
56901	LCMS_LIBS=$pkg_cv_LCMS_LIBS
56902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56903$as_echo "yes" >&6; }
56904	LCMS_FOUND=yes
56905fi
56906    if test "x${LCMS_FOUND}" = "xyes"; then
56907      USE_EXTERNAL_LCMS=true
56908    else
56909      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
56910    fi
56911  else
56912    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
56913  fi
56914
56915
56916
56917
56918
56919
56920
56921
56922
56923
56924
56925  # Setup libm (the maths library)
56926  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
56927$as_echo_n "checking for cos in -lm... " >&6; }
56928if ${ac_cv_lib_m_cos+:} false; then :
56929  $as_echo_n "(cached) " >&6
56930else
56931  ac_check_lib_save_LIBS=$LIBS
56932LIBS="-lm  $LIBS"
56933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56934/* end confdefs.h.  */
56935
56936/* Override any GCC internal prototype to avoid an error.
56937   Use char because int might match the return type of a GCC
56938   builtin and then its argument prototype would still apply.  */
56939#ifdef __cplusplus
56940extern "C"
56941#endif
56942char cos ();
56943int
56944main ()
56945{
56946return cos ();
56947  ;
56948  return 0;
56949}
56950_ACEOF
56951if ac_fn_cxx_try_link "$LINENO"; then :
56952  ac_cv_lib_m_cos=yes
56953else
56954  ac_cv_lib_m_cos=no
56955fi
56956rm -f core conftest.err conftest.$ac_objext \
56957    conftest$ac_exeext conftest.$ac_ext
56958LIBS=$ac_check_lib_save_LIBS
56959fi
56960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
56961$as_echo "$ac_cv_lib_m_cos" >&6; }
56962if test "x$ac_cv_lib_m_cos" = xyes; then :
56963  cat >>confdefs.h <<_ACEOF
56964#define HAVE_LIBM 1
56965_ACEOF
56966
56967  LIBS="-lm $LIBS"
56968
56969else
56970
56971      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
56972$as_echo "$as_me: Maths library was not found" >&6;}
56973
56974fi
56975
56976  LIBM=-lm
56977
56978
56979  # Setup libdl (for dynamic library loading)
56980  save_LIBS="$LIBS"
56981  LIBS=""
56982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
56983$as_echo_n "checking for dlopen in -ldl... " >&6; }
56984if ${ac_cv_lib_dl_dlopen+:} false; then :
56985  $as_echo_n "(cached) " >&6
56986else
56987  ac_check_lib_save_LIBS=$LIBS
56988LIBS="-ldl  $LIBS"
56989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56990/* end confdefs.h.  */
56991
56992/* Override any GCC internal prototype to avoid an error.
56993   Use char because int might match the return type of a GCC
56994   builtin and then its argument prototype would still apply.  */
56995#ifdef __cplusplus
56996extern "C"
56997#endif
56998char dlopen ();
56999int
57000main ()
57001{
57002return dlopen ();
57003  ;
57004  return 0;
57005}
57006_ACEOF
57007if ac_fn_cxx_try_link "$LINENO"; then :
57008  ac_cv_lib_dl_dlopen=yes
57009else
57010  ac_cv_lib_dl_dlopen=no
57011fi
57012rm -f core conftest.err conftest.$ac_objext \
57013    conftest$ac_exeext conftest.$ac_ext
57014LIBS=$ac_check_lib_save_LIBS
57015fi
57016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
57017$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
57018if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
57019  cat >>confdefs.h <<_ACEOF
57020#define HAVE_LIBDL 1
57021_ACEOF
57022
57023  LIBS="-ldl $LIBS"
57024
57025fi
57026
57027  LIBDL="$LIBS"
57028
57029  LIBS="$save_LIBS"
57030
57031  # Deprecated libraries, keep the flags for backwards compatibility
57032  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
57033
57034
57035# Check whether --with-dxsdk was given.
57036if test "${with_dxsdk+set}" = set; then :
57037  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
57038$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
57039fi
57040
57041
57042
57043
57044# Check whether --with-dxsdk-lib was given.
57045if test "${with_dxsdk_lib+set}" = set; then :
57046  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
57047$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
57048fi
57049
57050
57051
57052
57053# Check whether --with-dxsdk-include was given.
57054if test "${with_dxsdk_include+set}" = set; then :
57055  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
57056$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
57057fi
57058
57059
57060  fi
57061
57062  # Control if libzip can use mmap. Available for purposes of overriding.
57063  LIBZIP_CAN_USE_MMAP=true
57064
57065
57066
57067
57068
57069
57070
57071
57072
57073
57074
57075
57076
57077
57078###############################################################################
57079#
57080# We need to do some final tweaking, when everything else is done.
57081#
57082###############################################################################
57083
57084
57085  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
57086
57087
57088  # The name of the Service Agent jar.
57089  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
57090  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
57091    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
57092  fi
57093
57094
57095
57096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
57097$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
57098
57099  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
57100    ENABLE_INTREE_EC=yes
57101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57102$as_echo "yes" >&6; }
57103  else
57104    ENABLE_INTREE_EC=no
57105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57106$as_echo "no" >&6; }
57107  fi
57108
57109
57110
57111
57112###############################################################################
57113#
57114# Configure parts of the build that only affect the build performance,
57115# not the result.
57116#
57117###############################################################################
57118
57119
57120  # How many cores do we have on this build system?
57121
57122# Check whether --with-num-cores was given.
57123if test "${with_num_cores+set}" = set; then :
57124  withval=$with_num_cores;
57125fi
57126
57127  if test "x$with_num_cores" = x; then
57128    # The number of cores were not specified, try to probe them.
57129
57130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
57131$as_echo_n "checking for number of cores... " >&6; }
57132  NUM_CORES=1
57133  FOUND_CORES=no
57134
57135  if test -f /proc/cpuinfo; then
57136    # Looks like a Linux (or cygwin) system
57137    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
57138    FOUND_CORES=yes
57139  elif test -x /usr/sbin/psrinfo; then
57140    # Looks like a Solaris system
57141    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
57142    FOUND_CORES=yes
57143  elif test -x /usr/sbin/system_profiler; then
57144    # Looks like a MacOSX system
57145    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
57146    FOUND_CORES=yes
57147  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
57148    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
57149    FOUND_CORES=yes
57150  elif test -n "$NUMBER_OF_PROCESSORS"; then
57151    # On windows, look in the env
57152    NUM_CORES=$NUMBER_OF_PROCESSORS
57153    FOUND_CORES=yes
57154  fi
57155
57156  if test "x$FOUND_CORES" = xyes; then
57157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
57158$as_echo "$NUM_CORES" >&6; }
57159  else
57160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
57161$as_echo "could not detect number of cores, defaulting to 1" >&6; }
57162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
57163$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
57164  fi
57165
57166  else
57167    NUM_CORES=$with_num_cores
57168  fi
57169
57170
57171
57172  # How much memory do we have on this build system?
57173
57174# Check whether --with-memory-size was given.
57175if test "${with_memory_size+set}" = set; then :
57176  withval=$with_memory_size;
57177fi
57178
57179  if test "x$with_memory_size" = x; then
57180    # The memory size was not specified, try to probe it.
57181
57182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
57183$as_echo_n "checking for memory size... " >&6; }
57184  # Default to 1024 MB
57185  MEMORY_SIZE=1024
57186  FOUND_MEM=no
57187
57188  if test -f /proc/meminfo; then
57189    # Looks like a Linux (or cygwin) system
57190    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
57191    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
57192    FOUND_MEM=yes
57193  elif test -x /usr/sbin/prtconf; then
57194    # Looks like a Solaris or AIX system
57195    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
57196    FOUND_MEM=yes
57197  elif test -x /usr/sbin/system_profiler; then
57198    # Looks like a MacOSX system
57199    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
57200    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
57201    FOUND_MEM=yes
57202  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
57203    # Windows, but without cygwin
57204    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
57205    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
57206    FOUND_MEM=yes
57207  fi
57208
57209  if test "x$FOUND_MEM" = xyes; then
57210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
57211$as_echo "$MEMORY_SIZE MB" >&6; }
57212  else
57213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
57214$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
57215    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
57216$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
57217  fi
57218
57219  else
57220    MEMORY_SIZE=$with_memory_size
57221  fi
57222
57223
57224
57225  # Provide a decent default number of parallel jobs for make depending on
57226  # number of cores, amount of memory and machine architecture.
57227
57228# Check whether --with-jobs was given.
57229if test "${with_jobs+set}" = set; then :
57230  withval=$with_jobs;
57231fi
57232
57233  if test "x$with_jobs" = x; then
57234    # Number of jobs was not specified, calculate.
57235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
57236$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
57237    # Approximate memory in GB.
57238    memory_gb=`expr $MEMORY_SIZE / 1024`
57239    # Pick the lowest of memory in gb and number of cores.
57240    if test "$memory_gb" -lt "$NUM_CORES"; then
57241      JOBS="$memory_gb"
57242    else
57243      JOBS="$NUM_CORES"
57244    fi
57245    if test "$JOBS" -eq "0"; then
57246      JOBS=1
57247    fi
57248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
57249$as_echo "$JOBS" >&6; }
57250  else
57251    JOBS=$with_jobs
57252  fi
57253
57254
57255
57256# Setup arguments for the boot jdk (after cores and memory have been setup)
57257
57258  ##############################################################################
57259  #
57260  # Specify jvm options for anything that is run with the Boot JDK.
57261  # Not all JVM:s accept the same arguments on the command line.
57262  #
57263
57264# Check whether --with-boot-jdk-jvmargs was given.
57265if test "${with_boot_jdk_jvmargs+set}" = set; then :
57266  withval=$with_boot_jdk_jvmargs;
57267fi
57268
57269
57270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
57271$as_echo_n "checking flags for boot jdk java command ... " >&6; }
57272
57273  # Disable special log output when a debug build is used as Boot JDK...
57274
57275  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
57276  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
57277  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
57278  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57279  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57280  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57281    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
57282    JVM_ARG_OK=true
57283  else
57284    $ECHO "Arg failed:" >&5
57285    $ECHO "$OUTPUT" >&5
57286    JVM_ARG_OK=false
57287  fi
57288
57289
57290  # Apply user provided options.
57291
57292  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
57293  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
57294  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
57295  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57296  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57297  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57298    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
57299    JVM_ARG_OK=true
57300  else
57301    $ECHO "Arg failed:" >&5
57302    $ECHO "$OUTPUT" >&5
57303    JVM_ARG_OK=false
57304  fi
57305
57306
57307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
57308$as_echo "$boot_jdk_jvmargs" >&6; }
57309
57310  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
57311  JAVA_FLAGS=$boot_jdk_jvmargs
57312
57313
57314
57315  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
57316$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
57317
57318  # Starting amount of heap memory.
57319
57320  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
57321  $ECHO "Command: $JAVA -Xms64M -version" >&5
57322  OUTPUT=`$JAVA -Xms64M -version 2>&1`
57323  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57324  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57325  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57326    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
57327    JVM_ARG_OK=true
57328  else
57329    $ECHO "Arg failed:" >&5
57330    $ECHO "$OUTPUT" >&5
57331    JVM_ARG_OK=false
57332  fi
57333
57334
57335  # Maximum amount of heap memory.
57336  # Maximum stack size.
57337  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
57338  if test "x$BOOT_JDK_BITS" = "x32"; then
57339    if test "$JVM_MAX_HEAP" -gt "1100"; then
57340      JVM_MAX_HEAP=1100
57341    elif test "$JVM_MAX_HEAP" -lt "512"; then
57342      JVM_MAX_HEAP=512
57343    fi
57344    STACK_SIZE=768
57345  else
57346    # Running a 64 bit JVM allows for and requires a bigger heap
57347    if test "$JVM_MAX_HEAP" -gt "1600"; then
57348      JVM_MAX_HEAP=1600
57349    elif test "$JVM_MAX_HEAP" -lt "512"; then
57350      JVM_MAX_HEAP=512
57351    fi
57352    STACK_SIZE=1536
57353  fi
57354
57355  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
57356  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
57357  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
57358  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57359  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57360  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57361    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
57362    JVM_ARG_OK=true
57363  else
57364    $ECHO "Arg failed:" >&5
57365    $ECHO "$OUTPUT" >&5
57366    JVM_ARG_OK=false
57367  fi
57368
57369
57370  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
57371  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
57372  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
57373  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57374  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57375  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57376    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
57377    JVM_ARG_OK=true
57378  else
57379    $ECHO "Arg failed:" >&5
57380    $ECHO "$OUTPUT" >&5
57381    JVM_ARG_OK=false
57382  fi
57383
57384
57385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
57386$as_echo "$boot_jdk_jvmargs_big" >&6; }
57387
57388  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
57389
57390
57391  # By default, the main javac compilations use big
57392  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
57393
57394
57395  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
57396$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
57397
57398  # Use serial gc for small short lived tools if possible
57399
57400  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
57401  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
57402  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
57403  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57404  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57405  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57406    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
57407    JVM_ARG_OK=true
57408  else
57409    $ECHO "Arg failed:" >&5
57410    $ECHO "$OUTPUT" >&5
57411    JVM_ARG_OK=false
57412  fi
57413
57414
57415  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
57416  $ECHO "Command: $JAVA -Xms32M -version" >&5
57417  OUTPUT=`$JAVA -Xms32M -version 2>&1`
57418  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57419  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57420  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57421    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
57422    JVM_ARG_OK=true
57423  else
57424    $ECHO "Arg failed:" >&5
57425    $ECHO "$OUTPUT" >&5
57426    JVM_ARG_OK=false
57427  fi
57428
57429
57430  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
57431  $ECHO "Command: $JAVA -Xmx512M -version" >&5
57432  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
57433  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57434  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57435  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57436    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
57437    JVM_ARG_OK=true
57438  else
57439    $ECHO "Arg failed:" >&5
57440    $ECHO "$OUTPUT" >&5
57441    JVM_ARG_OK=false
57442  fi
57443
57444
57445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
57446$as_echo "$boot_jdk_jvmargs_small" >&6; }
57447
57448  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
57449
57450
57451  JAVA_TOOL_FLAGS_SMALL=""
57452  for f in $JAVA_FLAGS_SMALL; do
57453    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
57454  done
57455
57456
57457
57458# Setup smart javac (after cores and memory have been setup)
57459
57460
57461# Check whether --with-sjavac-server-java was given.
57462if test "${with_sjavac_server_java+set}" = set; then :
57463  withval=$with_sjavac_server_java;
57464fi
57465
57466
57467  if test "x$with_sjavac_server_java" != x; then
57468    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
57469    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
57470    if test "x$FOUND_VERSION" = x; then
57471      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
57472    fi
57473  else
57474    SJAVAC_SERVER_JAVA="$JAVA"
57475  fi
57476
57477
57478  if test "$MEMORY_SIZE" -gt "3000"; then
57479
57480  $ECHO "Check if jvm arg is ok: -d64" >&5
57481  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
57482  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
57483  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57484  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57485  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57486    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
57487    JVM_ARG_OK=true
57488  else
57489    $ECHO "Arg failed:" >&5
57490    $ECHO "$OUTPUT" >&5
57491    JVM_ARG_OK=false
57492  fi
57493
57494    if test "$JVM_ARG_OK" = true; then
57495      JVM_64BIT=true
57496      JVM_ARG_OK=false
57497    fi
57498  fi
57499
57500  MX_VALUE=`expr $MEMORY_SIZE / 2`
57501  if test "$JVM_64BIT" = true; then
57502    # Set ms lower than mx since more than one instance of the server might
57503    # get launched at the same time before they figure out which instance won.
57504    MS_VALUE=512
57505    if test "$MX_VALUE" -gt "2048"; then
57506      MX_VALUE=2048
57507    fi
57508  else
57509    MS_VALUE=256
57510    if test "$MX_VALUE" -gt "1500"; then
57511      MX_VALUE=1500
57512    fi
57513  fi
57514  if test "$MX_VALUE" -lt "512"; then
57515    MX_VALUE=512
57516  fi
57517
57518  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
57519  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
57520  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
57521  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57522  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57523  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57524    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
57525    JVM_ARG_OK=true
57526  else
57527    $ECHO "Arg failed:" >&5
57528    $ECHO "$OUTPUT" >&5
57529    JVM_ARG_OK=false
57530  fi
57531
57532
57533
57534  # Check whether --enable-sjavac was given.
57535if test "${enable_sjavac+set}" = set; then :
57536  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
57537else
57538  ENABLE_SJAVAC="no"
57539fi
57540
57541  if test "x$JVM_ARG_OK" = "xfalse"; then
57542    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
57543$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
57544    ENABLE_SJAVAC="no"
57545  fi
57546  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
57547$as_echo_n "checking whether to use sjavac... " >&6; }
57548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
57549$as_echo "$ENABLE_SJAVAC" >&6; }
57550
57551
57552  # Check whether --enable-javac-server was given.
57553if test "${enable_javac_server+set}" = set; then :
57554  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
57555else
57556  ENABLE_JAVAC_SERVER="yes"
57557fi
57558
57559  if test "x$JVM_ARG_OK" = "xfalse"; then
57560    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
57561$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
57562    ENABLE_JAVAC_SERVER="no"
57563  fi
57564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
57565$as_echo_n "checking whether to use javac server... " >&6; }
57566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
57567$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
57568
57569
57570  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
57571    # When using a server javac, the small client instances do not need much
57572    # resources.
57573    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
57574  fi
57575
57576
57577# Setup use of icecc if requested
57578
57579  # Check whether --enable-icecc was given.
57580if test "${enable_icecc+set}" = set; then :
57581  enableval=$enable_icecc;
57582fi
57583
57584
57585  if test "x${enable_icecc}" = "xyes"; then
57586
57587
57588
57589  # Publish this variable in the help.
57590
57591
57592  if [ -z "${ICECC_CMD+x}" ]; then
57593    # The variable is not set by user, try to locate tool using the code snippet
57594    for ac_prog in icecc
57595do
57596  # Extract the first word of "$ac_prog", so it can be a program name with args.
57597set dummy $ac_prog; ac_word=$2
57598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57599$as_echo_n "checking for $ac_word... " >&6; }
57600if ${ac_cv_path_ICECC_CMD+:} false; then :
57601  $as_echo_n "(cached) " >&6
57602else
57603  case $ICECC_CMD in
57604  [\\/]* | ?:[\\/]*)
57605  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57606  ;;
57607  *)
57608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57609for as_dir in $PATH
57610do
57611  IFS=$as_save_IFS
57612  test -z "$as_dir" && as_dir=.
57613    for ac_exec_ext in '' $ac_executable_extensions; do
57614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57615    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57617    break 2
57618  fi
57619done
57620  done
57621IFS=$as_save_IFS
57622
57623  ;;
57624esac
57625fi
57626ICECC_CMD=$ac_cv_path_ICECC_CMD
57627if test -n "$ICECC_CMD"; then
57628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57629$as_echo "$ICECC_CMD" >&6; }
57630else
57631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57632$as_echo "no" >&6; }
57633fi
57634
57635
57636  test -n "$ICECC_CMD" && break
57637done
57638
57639  else
57640    # The variable is set, but is it from the command line or the environment?
57641
57642    # Try to remove the string !ICECC_CMD! from our list.
57643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
57644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57645      # If it failed, the variable was not from the command line. Ignore it,
57646      # but warn the user (except for BASH, which is always set by the calling BASH).
57647      if test "xICECC_CMD" != xBASH; then
57648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
57649$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
57650      fi
57651      # Try to locate tool using the code snippet
57652      for ac_prog in icecc
57653do
57654  # Extract the first word of "$ac_prog", so it can be a program name with args.
57655set dummy $ac_prog; ac_word=$2
57656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57657$as_echo_n "checking for $ac_word... " >&6; }
57658if ${ac_cv_path_ICECC_CMD+:} false; then :
57659  $as_echo_n "(cached) " >&6
57660else
57661  case $ICECC_CMD in
57662  [\\/]* | ?:[\\/]*)
57663  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57664  ;;
57665  *)
57666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57667for as_dir in $PATH
57668do
57669  IFS=$as_save_IFS
57670  test -z "$as_dir" && as_dir=.
57671    for ac_exec_ext in '' $ac_executable_extensions; do
57672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57673    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57675    break 2
57676  fi
57677done
57678  done
57679IFS=$as_save_IFS
57680
57681  ;;
57682esac
57683fi
57684ICECC_CMD=$ac_cv_path_ICECC_CMD
57685if test -n "$ICECC_CMD"; then
57686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57687$as_echo "$ICECC_CMD" >&6; }
57688else
57689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57690$as_echo "no" >&6; }
57691fi
57692
57693
57694  test -n "$ICECC_CMD" && break
57695done
57696
57697    else
57698      # If it succeeded, then it was overridden by the user. We will use it
57699      # for the tool.
57700
57701      # First remove it from the list of overridden variables, so we can test
57702      # for unknown variables in the end.
57703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57704
57705      # Check if we try to supply an empty value
57706      if test "x$ICECC_CMD" = x; then
57707        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
57708$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
57709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
57710$as_echo_n "checking for ICECC_CMD... " >&6; }
57711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57712$as_echo "disabled" >&6; }
57713      else
57714        # Check if the provided tool contains a complete path.
57715        tool_specified="$ICECC_CMD"
57716        tool_basename="${tool_specified##*/}"
57717        if test "x$tool_basename" = "x$tool_specified"; then
57718          # A command without a complete path is provided, search $PATH.
57719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
57720$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
57721          # Extract the first word of "$tool_basename", so it can be a program name with args.
57722set dummy $tool_basename; ac_word=$2
57723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57724$as_echo_n "checking for $ac_word... " >&6; }
57725if ${ac_cv_path_ICECC_CMD+:} false; then :
57726  $as_echo_n "(cached) " >&6
57727else
57728  case $ICECC_CMD in
57729  [\\/]* | ?:[\\/]*)
57730  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57731  ;;
57732  *)
57733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57734for as_dir in $PATH
57735do
57736  IFS=$as_save_IFS
57737  test -z "$as_dir" && as_dir=.
57738    for ac_exec_ext in '' $ac_executable_extensions; do
57739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57740    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57742    break 2
57743  fi
57744done
57745  done
57746IFS=$as_save_IFS
57747
57748  ;;
57749esac
57750fi
57751ICECC_CMD=$ac_cv_path_ICECC_CMD
57752if test -n "$ICECC_CMD"; then
57753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57754$as_echo "$ICECC_CMD" >&6; }
57755else
57756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57757$as_echo "no" >&6; }
57758fi
57759
57760
57761          if test "x$ICECC_CMD" = x; then
57762            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57763          fi
57764        else
57765          # Otherwise we believe it is a complete path. Use it as it is.
57766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
57767$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
57768          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
57769$as_echo_n "checking for ICECC_CMD... " >&6; }
57770          if test ! -x "$tool_specified"; then
57771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57772$as_echo "not found" >&6; }
57773            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
57774          fi
57775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57776$as_echo "$tool_specified" >&6; }
57777        fi
57778      fi
57779    fi
57780
57781  fi
57782
57783
57784
57785  if test "x$ICECC_CMD" = x; then
57786    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
57787  fi
57788
57789
57790    old_path="$PATH"
57791
57792    # Look for icecc-create-env in some known places
57793    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
57794
57795
57796
57797  # Publish this variable in the help.
57798
57799
57800  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
57801    # The variable is not set by user, try to locate tool using the code snippet
57802    for ac_prog in icecc-create-env
57803do
57804  # Extract the first word of "$ac_prog", so it can be a program name with args.
57805set dummy $ac_prog; ac_word=$2
57806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57807$as_echo_n "checking for $ac_word... " >&6; }
57808if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57809  $as_echo_n "(cached) " >&6
57810else
57811  case $ICECC_CREATE_ENV in
57812  [\\/]* | ?:[\\/]*)
57813  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57814  ;;
57815  *)
57816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57817for as_dir in $PATH
57818do
57819  IFS=$as_save_IFS
57820  test -z "$as_dir" && as_dir=.
57821    for ac_exec_ext in '' $ac_executable_extensions; do
57822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57823    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57825    break 2
57826  fi
57827done
57828  done
57829IFS=$as_save_IFS
57830
57831  ;;
57832esac
57833fi
57834ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57835if test -n "$ICECC_CREATE_ENV"; then
57836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57837$as_echo "$ICECC_CREATE_ENV" >&6; }
57838else
57839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57840$as_echo "no" >&6; }
57841fi
57842
57843
57844  test -n "$ICECC_CREATE_ENV" && break
57845done
57846
57847  else
57848    # The variable is set, but is it from the command line or the environment?
57849
57850    # Try to remove the string !ICECC_CREATE_ENV! from our list.
57851    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
57852    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57853      # If it failed, the variable was not from the command line. Ignore it,
57854      # but warn the user (except for BASH, which is always set by the calling BASH).
57855      if test "xICECC_CREATE_ENV" != xBASH; then
57856        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
57857$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
57858      fi
57859      # Try to locate tool using the code snippet
57860      for ac_prog in icecc-create-env
57861do
57862  # Extract the first word of "$ac_prog", so it can be a program name with args.
57863set dummy $ac_prog; ac_word=$2
57864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57865$as_echo_n "checking for $ac_word... " >&6; }
57866if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57867  $as_echo_n "(cached) " >&6
57868else
57869  case $ICECC_CREATE_ENV in
57870  [\\/]* | ?:[\\/]*)
57871  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57872  ;;
57873  *)
57874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57875for as_dir in $PATH
57876do
57877  IFS=$as_save_IFS
57878  test -z "$as_dir" && as_dir=.
57879    for ac_exec_ext in '' $ac_executable_extensions; do
57880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57881    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57883    break 2
57884  fi
57885done
57886  done
57887IFS=$as_save_IFS
57888
57889  ;;
57890esac
57891fi
57892ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57893if test -n "$ICECC_CREATE_ENV"; then
57894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57895$as_echo "$ICECC_CREATE_ENV" >&6; }
57896else
57897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57898$as_echo "no" >&6; }
57899fi
57900
57901
57902  test -n "$ICECC_CREATE_ENV" && break
57903done
57904
57905    else
57906      # If it succeeded, then it was overridden by the user. We will use it
57907      # for the tool.
57908
57909      # First remove it from the list of overridden variables, so we can test
57910      # for unknown variables in the end.
57911      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57912
57913      # Check if we try to supply an empty value
57914      if test "x$ICECC_CREATE_ENV" = x; then
57915        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
57916$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
57917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57918$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57920$as_echo "disabled" >&6; }
57921      else
57922        # Check if the provided tool contains a complete path.
57923        tool_specified="$ICECC_CREATE_ENV"
57924        tool_basename="${tool_specified##*/}"
57925        if test "x$tool_basename" = "x$tool_specified"; then
57926          # A command without a complete path is provided, search $PATH.
57927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
57928$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
57929          # Extract the first word of "$tool_basename", so it can be a program name with args.
57930set dummy $tool_basename; ac_word=$2
57931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57932$as_echo_n "checking for $ac_word... " >&6; }
57933if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57934  $as_echo_n "(cached) " >&6
57935else
57936  case $ICECC_CREATE_ENV in
57937  [\\/]* | ?:[\\/]*)
57938  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57939  ;;
57940  *)
57941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57942for as_dir in $PATH
57943do
57944  IFS=$as_save_IFS
57945  test -z "$as_dir" && as_dir=.
57946    for ac_exec_ext in '' $ac_executable_extensions; do
57947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57948    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57950    break 2
57951  fi
57952done
57953  done
57954IFS=$as_save_IFS
57955
57956  ;;
57957esac
57958fi
57959ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57960if test -n "$ICECC_CREATE_ENV"; then
57961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57962$as_echo "$ICECC_CREATE_ENV" >&6; }
57963else
57964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57965$as_echo "no" >&6; }
57966fi
57967
57968
57969          if test "x$ICECC_CREATE_ENV" = x; then
57970            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57971          fi
57972        else
57973          # Otherwise we believe it is a complete path. Use it as it is.
57974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
57975$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
57976          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57977$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57978          if test ! -x "$tool_specified"; then
57979            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57980$as_echo "not found" >&6; }
57981            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
57982          fi
57983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57984$as_echo "$tool_specified" >&6; }
57985        fi
57986      fi
57987    fi
57988
57989  fi
57990
57991
57992
57993  if test "x$ICECC_CREATE_ENV" = x; then
57994    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
57995  fi
57996
57997
57998    # Use icecc-create-env to create a minimal compilation environment that can
57999    # be sent to the other hosts in the icecream cluster.
58000    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
58001    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
58002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
58003$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
58004    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
58005      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
58006          && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
58007    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
58008      # For clang, the icecc compilerwrapper is needed. It usually resides next
58009      # to icecc-create-env.
58010
58011
58012
58013  # Publish this variable in the help.
58014
58015
58016  if [ -z "${ICECC_WRAPPER+x}" ]; then
58017    # The variable is not set by user, try to locate tool using the code snippet
58018    for ac_prog in compilerwrapper
58019do
58020  # Extract the first word of "$ac_prog", so it can be a program name with args.
58021set dummy $ac_prog; ac_word=$2
58022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58023$as_echo_n "checking for $ac_word... " >&6; }
58024if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
58025  $as_echo_n "(cached) " >&6
58026else
58027  case $ICECC_WRAPPER in
58028  [\\/]* | ?:[\\/]*)
58029  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
58030  ;;
58031  *)
58032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58033for as_dir in $PATH
58034do
58035  IFS=$as_save_IFS
58036  test -z "$as_dir" && as_dir=.
58037    for ac_exec_ext in '' $ac_executable_extensions; do
58038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58039    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
58040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58041    break 2
58042  fi
58043done
58044  done
58045IFS=$as_save_IFS
58046
58047  ;;
58048esac
58049fi
58050ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
58051if test -n "$ICECC_WRAPPER"; then
58052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
58053$as_echo "$ICECC_WRAPPER" >&6; }
58054else
58055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58056$as_echo "no" >&6; }
58057fi
58058
58059
58060  test -n "$ICECC_WRAPPER" && break
58061done
58062
58063  else
58064    # The variable is set, but is it from the command line or the environment?
58065
58066    # Try to remove the string !ICECC_WRAPPER! from our list.
58067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
58068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
58069      # If it failed, the variable was not from the command line. Ignore it,
58070      # but warn the user (except for BASH, which is always set by the calling BASH).
58071      if test "xICECC_WRAPPER" != xBASH; then
58072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
58073$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
58074      fi
58075      # Try to locate tool using the code snippet
58076      for ac_prog in compilerwrapper
58077do
58078  # Extract the first word of "$ac_prog", so it can be a program name with args.
58079set dummy $ac_prog; ac_word=$2
58080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58081$as_echo_n "checking for $ac_word... " >&6; }
58082if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
58083  $as_echo_n "(cached) " >&6
58084else
58085  case $ICECC_WRAPPER in
58086  [\\/]* | ?:[\\/]*)
58087  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
58088  ;;
58089  *)
58090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58091for as_dir in $PATH
58092do
58093  IFS=$as_save_IFS
58094  test -z "$as_dir" && as_dir=.
58095    for ac_exec_ext in '' $ac_executable_extensions; do
58096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58097    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
58098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58099    break 2
58100  fi
58101done
58102  done
58103IFS=$as_save_IFS
58104
58105  ;;
58106esac
58107fi
58108ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
58109if test -n "$ICECC_WRAPPER"; then
58110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
58111$as_echo "$ICECC_WRAPPER" >&6; }
58112else
58113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58114$as_echo "no" >&6; }
58115fi
58116
58117
58118  test -n "$ICECC_WRAPPER" && break
58119done
58120
58121    else
58122      # If it succeeded, then it was overridden by the user. We will use it
58123      # for the tool.
58124
58125      # First remove it from the list of overridden variables, so we can test
58126      # for unknown variables in the end.
58127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
58128
58129      # Check if we try to supply an empty value
58130      if test "x$ICECC_WRAPPER" = x; then
58131        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
58132$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
58133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
58134$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
58135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
58136$as_echo "disabled" >&6; }
58137      else
58138        # Check if the provided tool contains a complete path.
58139        tool_specified="$ICECC_WRAPPER"
58140        tool_basename="${tool_specified##*/}"
58141        if test "x$tool_basename" = "x$tool_specified"; then
58142          # A command without a complete path is provided, search $PATH.
58143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
58144$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
58145          # Extract the first word of "$tool_basename", so it can be a program name with args.
58146set dummy $tool_basename; ac_word=$2
58147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58148$as_echo_n "checking for $ac_word... " >&6; }
58149if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
58150  $as_echo_n "(cached) " >&6
58151else
58152  case $ICECC_WRAPPER in
58153  [\\/]* | ?:[\\/]*)
58154  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
58155  ;;
58156  *)
58157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58158for as_dir in $PATH
58159do
58160  IFS=$as_save_IFS
58161  test -z "$as_dir" && as_dir=.
58162    for ac_exec_ext in '' $ac_executable_extensions; do
58163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58164    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
58165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58166    break 2
58167  fi
58168done
58169  done
58170IFS=$as_save_IFS
58171
58172  ;;
58173esac
58174fi
58175ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
58176if test -n "$ICECC_WRAPPER"; then
58177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
58178$as_echo "$ICECC_WRAPPER" >&6; }
58179else
58180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58181$as_echo "no" >&6; }
58182fi
58183
58184
58185          if test "x$ICECC_WRAPPER" = x; then
58186            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
58187          fi
58188        else
58189          # Otherwise we believe it is a complete path. Use it as it is.
58190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
58191$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
58192          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
58193$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
58194          if test ! -x "$tool_specified"; then
58195            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
58196$as_echo "not found" >&6; }
58197            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
58198          fi
58199          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
58200$as_echo "$tool_specified" >&6; }
58201        fi
58202      fi
58203    fi
58204
58205  fi
58206
58207
58208
58209  if test "x$ICECC_WRAPPER" = x; then
58210    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
58211  fi
58212
58213
58214      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
58215          && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
58216    else
58217      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
58218    fi
58219    PATH="$old_path"
58220    # The bundle with the compiler gets a name based on checksums. Parse log file
58221    # to find it.
58222    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
58223    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
58224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
58225$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
58226    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
58227
58228    if test "x${COMPILE_TYPE}" = "xcross"; then
58229      # If cross compiling, create a separate env package for the build compiler
58230      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
58231$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
58232      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
58233      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
58234        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
58235            && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
58236      elif test "x${BUILD_CC##*/}" = "xclang"; then
58237        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
58238            && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
58239      else
58240        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
58241      fi
58242      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
58243      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
58244      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
58245$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
58246      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
58247          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
58248    else
58249      BUILD_ICECC="${ICECC}"
58250    fi
58251
58252
58253  fi
58254
58255
58256# Can the C/C++ compiler use precompiled headers?
58257
58258
58259  ###############################################################################
58260  #
58261  # Can the C/C++ compiler use precompiled headers?
58262  #
58263  # Check whether --enable-precompiled-headers was given.
58264if test "${enable_precompiled_headers+set}" = set; then :
58265  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
58266else
58267  ENABLE_PRECOMPH=yes
58268fi
58269
58270
58271  USE_PRECOMPILED_HEADER=1
58272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
58273$as_echo_n "checking If precompiled header is enabled... " >&6; }
58274  if test "x$ENABLE_PRECOMPH" = xno; then
58275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
58276$as_echo "no, forced" >&6; }
58277    USE_PRECOMPILED_HEADER=0
58278  elif test "x$ICECC" != "x"; then
58279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
58280$as_echo "no, does not work effectively with icecc" >&6; }
58281    USE_PRECOMPILED_HEADER=0
58282  else
58283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58284$as_echo "yes" >&6; }
58285  fi
58286
58287  if test "x$ENABLE_PRECOMPH" = xyes; then
58288    # Check that the compiler actually supports precomp headers.
58289    if test "x$TOOLCHAIN_TYPE" = xgcc; then
58290      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
58291$as_echo_n "checking that precompiled headers work... " >&6; }
58292      echo "int alfa();" > conftest.h
58293      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
58294      if test ! -f conftest.hpp.gch; then
58295        USE_PRECOMPILED_HEADER=0
58296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58297$as_echo "no" >&6; }
58298      else
58299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58300$as_echo "yes" >&6; }
58301      fi
58302      rm -f conftest.h conftest.hpp.gch
58303    fi
58304  fi
58305
58306
58307
58308
58309# Setup use of ccache, if available
58310
58311  # Check whether --enable-ccache was given.
58312if test "${enable_ccache+set}" = set; then :
58313  enableval=$enable_ccache;
58314fi
58315
58316
58317  CCACHE=
58318  CCACHE_STATUS=
58319  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
58320$as_echo_n "checking is ccache enabled... " >&6; }
58321  if test "x$enable_ccache" = xyes; then
58322    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
58323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58324$as_echo "yes" >&6; }
58325      OLD_PATH="$PATH"
58326      if test "x$TOOLCHAIN_PATH" != x; then
58327        PATH=$TOOLCHAIN_PATH:$PATH
58328      fi
58329
58330
58331
58332  # Publish this variable in the help.
58333
58334
58335  if [ -z "${CCACHE+x}" ]; then
58336    # The variable is not set by user, try to locate tool using the code snippet
58337    for ac_prog in ccache
58338do
58339  # Extract the first word of "$ac_prog", so it can be a program name with args.
58340set dummy $ac_prog; ac_word=$2
58341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58342$as_echo_n "checking for $ac_word... " >&6; }
58343if ${ac_cv_path_CCACHE+:} false; then :
58344  $as_echo_n "(cached) " >&6
58345else
58346  case $CCACHE in
58347  [\\/]* | ?:[\\/]*)
58348  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
58349  ;;
58350  *)
58351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58352for as_dir in $PATH
58353do
58354  IFS=$as_save_IFS
58355  test -z "$as_dir" && as_dir=.
58356    for ac_exec_ext in '' $ac_executable_extensions; do
58357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58358    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
58359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58360    break 2
58361  fi
58362done
58363  done
58364IFS=$as_save_IFS
58365
58366  ;;
58367esac
58368fi
58369CCACHE=$ac_cv_path_CCACHE
58370if test -n "$CCACHE"; then
58371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
58372$as_echo "$CCACHE" >&6; }
58373else
58374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58375$as_echo "no" >&6; }
58376fi
58377
58378
58379  test -n "$CCACHE" && break
58380done
58381
58382  else
58383    # The variable is set, but is it from the command line or the environment?
58384
58385    # Try to remove the string !CCACHE! from our list.
58386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
58387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
58388      # If it failed, the variable was not from the command line. Ignore it,
58389      # but warn the user (except for BASH, which is always set by the calling BASH).
58390      if test "xCCACHE" != xBASH; then
58391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
58392$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
58393      fi
58394      # Try to locate tool using the code snippet
58395      for ac_prog in ccache
58396do
58397  # Extract the first word of "$ac_prog", so it can be a program name with args.
58398set dummy $ac_prog; ac_word=$2
58399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58400$as_echo_n "checking for $ac_word... " >&6; }
58401if ${ac_cv_path_CCACHE+:} false; then :
58402  $as_echo_n "(cached) " >&6
58403else
58404  case $CCACHE in
58405  [\\/]* | ?:[\\/]*)
58406  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
58407  ;;
58408  *)
58409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58410for as_dir in $PATH
58411do
58412  IFS=$as_save_IFS
58413  test -z "$as_dir" && as_dir=.
58414    for ac_exec_ext in '' $ac_executable_extensions; do
58415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58416    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
58417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58418    break 2
58419  fi
58420done
58421  done
58422IFS=$as_save_IFS
58423
58424  ;;
58425esac
58426fi
58427CCACHE=$ac_cv_path_CCACHE
58428if test -n "$CCACHE"; then
58429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
58430$as_echo "$CCACHE" >&6; }
58431else
58432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58433$as_echo "no" >&6; }
58434fi
58435
58436
58437  test -n "$CCACHE" && break
58438done
58439
58440    else
58441      # If it succeeded, then it was overridden by the user. We will use it
58442      # for the tool.
58443
58444      # First remove it from the list of overridden variables, so we can test
58445      # for unknown variables in the end.
58446      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
58447
58448      # Check if we try to supply an empty value
58449      if test "x$CCACHE" = x; then
58450        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
58451$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
58452        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
58453$as_echo_n "checking for CCACHE... " >&6; }
58454        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
58455$as_echo "disabled" >&6; }
58456      else
58457        # Check if the provided tool contains a complete path.
58458        tool_specified="$CCACHE"
58459        tool_basename="${tool_specified##*/}"
58460        if test "x$tool_basename" = "x$tool_specified"; then
58461          # A command without a complete path is provided, search $PATH.
58462          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
58463$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
58464          # Extract the first word of "$tool_basename", so it can be a program name with args.
58465set dummy $tool_basename; ac_word=$2
58466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58467$as_echo_n "checking for $ac_word... " >&6; }
58468if ${ac_cv_path_CCACHE+:} false; then :
58469  $as_echo_n "(cached) " >&6
58470else
58471  case $CCACHE in
58472  [\\/]* | ?:[\\/]*)
58473  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
58474  ;;
58475  *)
58476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58477for as_dir in $PATH
58478do
58479  IFS=$as_save_IFS
58480  test -z "$as_dir" && as_dir=.
58481    for ac_exec_ext in '' $ac_executable_extensions; do
58482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58483    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
58484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58485    break 2
58486  fi
58487done
58488  done
58489IFS=$as_save_IFS
58490
58491  ;;
58492esac
58493fi
58494CCACHE=$ac_cv_path_CCACHE
58495if test -n "$CCACHE"; then
58496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
58497$as_echo "$CCACHE" >&6; }
58498else
58499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58500$as_echo "no" >&6; }
58501fi
58502
58503
58504          if test "x$CCACHE" = x; then
58505            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
58506          fi
58507        else
58508          # Otherwise we believe it is a complete path. Use it as it is.
58509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
58510$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
58511          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
58512$as_echo_n "checking for CCACHE... " >&6; }
58513          if test ! -x "$tool_specified"; then
58514            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
58515$as_echo "not found" >&6; }
58516            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
58517          fi
58518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
58519$as_echo "$tool_specified" >&6; }
58520        fi
58521      fi
58522    fi
58523
58524  fi
58525
58526
58527
58528  if test "x$CCACHE" = x; then
58529    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
58530  fi
58531
58532
58533      PATH="$OLD_PATH"
58534      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
58535      CCACHE_STATUS="Active ($CCACHE_VERSION)"
58536    else
58537      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58538$as_echo "no" >&6; }
58539      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
58540$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
58541    fi
58542  elif test "x$enable_ccache" = xno; then
58543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
58544$as_echo "no, explicitly disabled" >&6; }
58545    CCACHE_STATUS="Disabled"
58546  elif test "x$enable_ccache" = x; then
58547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58548$as_echo "no" >&6; }
58549  else
58550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
58551$as_echo "unknown" >&6; }
58552    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
58553  fi
58554
58555
58556
58557# Check whether --with-ccache-dir was given.
58558if test "${with_ccache_dir+set}" = set; then :
58559  withval=$with_ccache_dir;
58560fi
58561
58562
58563  if test "x$with_ccache_dir" != x; then
58564    # When using a non home ccache directory, assume the use is to share ccache files
58565    # with other users. Thus change the umask.
58566    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
58567    if test "x$CCACHE" = x; then
58568      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
58569$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
58570    fi
58571  fi
58572
58573  if test "x$CCACHE" != x; then
58574
58575  if test "x$CCACHE" != x; then
58576    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
58577      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
58578          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
58579      if test "x$HAS_BAD_CCACHE" != "x"; then
58580        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
58581      fi
58582      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
58583$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
58584      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
58585      PUSHED_FLAGS="$CXXFLAGS"
58586      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
58587      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58588/* end confdefs.h.  */
58589
58590int
58591main ()
58592{
58593
58594  ;
58595  return 0;
58596}
58597_ACEOF
58598if ac_fn_cxx_try_compile "$LINENO"; then :
58599  CC_KNOWS_CCACHE_TRICK=yes
58600else
58601  CC_KNOWS_CCACHE_TRICK=no
58602fi
58603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58604      CXXFLAGS="$PUSHED_FLAGS"
58605      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
58606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58607$as_echo "yes" >&6; }
58608        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
58609
58610        CCACHE_SLOPPINESS=pch_defines,time_macros
58611      else
58612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58613$as_echo "no" >&6; }
58614        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
58615      fi
58616    fi
58617
58618    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
58619        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
58620
58621    if test "x$SET_CCACHE_DIR" != x; then
58622      mkdir -p $CCACHE_DIR > /dev/null 2>&1
58623      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
58624    fi
58625  fi
58626
58627  fi
58628
58629
58630###############################################################################
58631#
58632# And now the finish...
58633#
58634###############################################################################
58635
58636# Check for some common pitfalls
58637
58638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58639    file_to_test="$SRC_ROOT/LICENSE"
58640    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
58641      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
58642    fi
58643  fi
58644
58645
58646  # Did user specify any unknown variables?
58647
58648  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
58649    # Replace the separating ! with spaces before presenting for end user.
58650    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
58651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
58652$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
58653  fi
58654
58655
58656  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
58657$as_echo_n "checking if build directory is on local disk... " >&6; }
58658
58659  # df -l lists only local disks; if the given directory is not found then
58660  # a non-zero exit code is given
58661  if test "x$DF" = x; then
58662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58663      # msys does not have df; use Windows "net use" instead.
58664      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
58665      if test "x$IS_NETWORK_DISK" = x; then
58666        OUTPUT_DIR_IS_LOCAL="yes"
58667      else
58668        OUTPUT_DIR_IS_LOCAL="no"
58669      fi
58670    else
58671      # No df here, say it's local
58672      OUTPUT_DIR_IS_LOCAL="yes"
58673    fi
58674  else
58675    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
58676      OUTPUT_DIR_IS_LOCAL="yes"
58677    else
58678      OUTPUT_DIR_IS_LOCAL="no"
58679    fi
58680  fi
58681
58682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
58683$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
58684
58685
58686
58687  # Check if the user has any old-style ALT_ variables set.
58688  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
58689
58690  # Before generating output files, test if they exist. If they do, this is a reconfigure.
58691  # Since we can't properly handle the dependencies for this, warn the user about the situation
58692  if test -e $OUTPUT_ROOT/spec.gmk; then
58693    IS_RECONFIGURE=yes
58694  else
58695    IS_RECONFIGURE=no
58696  fi
58697
58698
58699# At the end, call the custom hook. (Dummy macro if no custom sources available)
58700
58701
58702# We're messing a bit with internal autoconf variables to put the config.status
58703# in the output directory instead of the current directory.
58704CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
58705
58706# Create the actual output files. Now the main work of configure is done.
58707cat >confcache <<\_ACEOF
58708# This file is a shell script that caches the results of configure
58709# tests run on this system so they can be shared between configure
58710# scripts and configure runs, see configure's option --config-cache.
58711# It is not useful on other systems.  If it contains results you don't
58712# want to keep, you may remove or edit it.
58713#
58714# config.status only pays attention to the cache file if you give it
58715# the --recheck option to rerun configure.
58716#
58717# `ac_cv_env_foo' variables (set or unset) will be overridden when
58718# loading this file, other *unset* `ac_cv_foo' will be assigned the
58719# following values.
58720
58721_ACEOF
58722
58723# The following way of writing the cache mishandles newlines in values,
58724# but we know of no workaround that is simple, portable, and efficient.
58725# So, we kill variables containing newlines.
58726# Ultrix sh set writes to stderr and can't be redirected directly,
58727# and sets the high bit in the cache file unless we assign to the vars.
58728(
58729  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
58730    eval ac_val=\$$ac_var
58731    case $ac_val in #(
58732    *${as_nl}*)
58733      case $ac_var in #(
58734      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
58735$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
58736      esac
58737      case $ac_var in #(
58738      _ | IFS | as_nl) ;; #(
58739      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
58740      *) { eval $ac_var=; unset $ac_var;} ;;
58741      esac ;;
58742    esac
58743  done
58744
58745  (set) 2>&1 |
58746    case $as_nl`(ac_space=' '; set) 2>&1` in #(
58747    *${as_nl}ac_space=\ *)
58748      # `set' does not quote correctly, so add quotes: double-quote
58749      # substitution turns \\\\ into \\, and sed turns \\ into \.
58750      sed -n \
58751	"s/'/'\\\\''/g;
58752	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
58753      ;; #(
58754    *)
58755      # `set' quotes correctly as required by POSIX, so do not add quotes.
58756      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
58757      ;;
58758    esac |
58759    sort
58760) |
58761  sed '
58762     /^ac_cv_env_/b end
58763     t clear
58764     :clear
58765     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
58766     t end
58767     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
58768     :end' >>confcache
58769if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
58770  if test -w "$cache_file"; then
58771    if test "x$cache_file" != "x/dev/null"; then
58772      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
58773$as_echo "$as_me: updating cache $cache_file" >&6;}
58774      if test ! -f "$cache_file" || test -h "$cache_file"; then
58775	cat confcache >"$cache_file"
58776      else
58777        case $cache_file in #(
58778        */* | ?:*)
58779	  mv -f confcache "$cache_file"$$ &&
58780	  mv -f "$cache_file"$$ "$cache_file" ;; #(
58781        *)
58782	  mv -f confcache "$cache_file" ;;
58783	esac
58784      fi
58785    fi
58786  else
58787    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
58788$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
58789  fi
58790fi
58791rm -f confcache
58792
58793test "x$prefix" = xNONE && prefix=$ac_default_prefix
58794# Let make expand exec_prefix.
58795test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
58796
58797# Transform confdefs.h into DEFS.
58798# Protect against shell expansion while executing Makefile rules.
58799# Protect against Makefile macro expansion.
58800#
58801# If the first sed substitution is executed (which looks for macros that
58802# take arguments), then branch to the quote section.  Otherwise,
58803# look for a macro that doesn't take arguments.
58804ac_script='
58805:mline
58806/\\$/{
58807 N
58808 s,\\\n,,
58809 b mline
58810}
58811t clear
58812:clear
58813s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
58814t quote
58815s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
58816t quote
58817b any
58818:quote
58819s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
58820s/\[/\\&/g
58821s/\]/\\&/g
58822s/\$/$$/g
58823H
58824:any
58825${
58826	g
58827	s/^\n//
58828	s/\n/ /g
58829	p
58830}
58831'
58832DEFS=`sed -n "$ac_script" confdefs.h`
58833
58834
58835ac_libobjs=
58836ac_ltlibobjs=
58837U=
58838for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
58839  # 1. Remove the extension, and $U if already installed.
58840  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
58841  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
58842  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
58843  #    will be set to the directory where LIBOBJS objects are built.
58844  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
58845  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
58846done
58847LIBOBJS=$ac_libobjs
58848
58849LTLIBOBJS=$ac_ltlibobjs
58850
58851
58852
58853: "${CONFIG_STATUS=./config.status}"
58854ac_write_fail=0
58855ac_clean_files_save=$ac_clean_files
58856ac_clean_files="$ac_clean_files $CONFIG_STATUS"
58857{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
58858$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
58859as_write_fail=0
58860cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
58861#! $SHELL
58862# Generated by $as_me.
58863# Run this file to recreate the current configuration.
58864# Compiler output produced by configure, useful for debugging
58865# configure, is in config.log if it exists.
58866
58867debug=false
58868ac_cs_recheck=false
58869ac_cs_silent=false
58870
58871SHELL=\${CONFIG_SHELL-$SHELL}
58872export SHELL
58873_ASEOF
58874cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
58875## -------------------- ##
58876## M4sh Initialization. ##
58877## -------------------- ##
58878
58879# Be more Bourne compatible
58880DUALCASE=1; export DUALCASE # for MKS sh
58881if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
58882  emulate sh
58883  NULLCMD=:
58884  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
58885  # is contrary to our usage.  Disable this feature.
58886  alias -g '${1+"$@"}'='"$@"'
58887  setopt NO_GLOB_SUBST
58888else
58889  case `(set -o) 2>/dev/null` in #(
58890  *posix*) :
58891    set -o posix ;; #(
58892  *) :
58893     ;;
58894esac
58895fi
58896
58897
58898as_nl='
58899'
58900export as_nl
58901# Printing a long string crashes Solaris 7 /usr/bin/printf.
58902as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
58903as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
58904as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
58905# Prefer a ksh shell builtin over an external printf program on Solaris,
58906# but without wasting forks for bash or zsh.
58907if test -z "$BASH_VERSION$ZSH_VERSION" \
58908    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
58909  as_echo='print -r --'
58910  as_echo_n='print -rn --'
58911elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
58912  as_echo='printf %s\n'
58913  as_echo_n='printf %s'
58914else
58915  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58916    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58917    as_echo_n='/usr/ucb/echo -n'
58918  else
58919    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58920    as_echo_n_body='eval
58921      arg=$1;
58922      case $arg in #(
58923      *"$as_nl"*)
58924	expr "X$arg" : "X\\(.*\\)$as_nl";
58925	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
58926      esac;
58927      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
58928    '
58929    export as_echo_n_body
58930    as_echo_n='sh -c $as_echo_n_body as_echo'
58931  fi
58932  export as_echo_body
58933  as_echo='sh -c $as_echo_body as_echo'
58934fi
58935
58936# The user is always right.
58937if test "${PATH_SEPARATOR+set}" != set; then
58938  PATH_SEPARATOR=:
58939  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
58940    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
58941      PATH_SEPARATOR=';'
58942  }
58943fi
58944
58945
58946# IFS
58947# We need space, tab and new line, in precisely that order.  Quoting is
58948# there to prevent editors from complaining about space-tab.
58949# (If _AS_PATH_WALK were called with IFS unset, it would disable word
58950# splitting by setting IFS to empty value.)
58951IFS=" ""	$as_nl"
58952
58953# Find who we are.  Look in the path if we contain no directory separator.
58954as_myself=
58955case $0 in #((
58956  *[\\/]* ) as_myself=$0 ;;
58957  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58958for as_dir in $PATH
58959do
58960  IFS=$as_save_IFS
58961  test -z "$as_dir" && as_dir=.
58962    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
58963  done
58964IFS=$as_save_IFS
58965
58966     ;;
58967esac
58968# We did not find ourselves, most probably we were run as `sh COMMAND'
58969# in which case we are not to be found in the path.
58970if test "x$as_myself" = x; then
58971  as_myself=$0
58972fi
58973if test ! -f "$as_myself"; then
58974  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
58975  exit 1
58976fi
58977
58978# Unset variables that we do not need and which cause bugs (e.g. in
58979# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
58980# suppresses any "Segmentation fault" message there.  '((' could
58981# trigger a bug in pdksh 5.2.14.
58982for as_var in BASH_ENV ENV MAIL MAILPATH
58983do eval test x\${$as_var+set} = xset \
58984  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
58985done
58986PS1='$ '
58987PS2='> '
58988PS4='+ '
58989
58990# NLS nuisances.
58991LC_ALL=C
58992export LC_ALL
58993LANGUAGE=C
58994export LANGUAGE
58995
58996# CDPATH.
58997(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
58998
58999
59000# as_fn_error STATUS ERROR [LINENO LOG_FD]
59001# ----------------------------------------
59002# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
59003# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
59004# script with STATUS, using 1 if that was 0.
59005as_fn_error ()
59006{
59007  as_status=$1; test $as_status -eq 0 && as_status=1
59008  if test "$4"; then
59009    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
59010    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
59011  fi
59012  $as_echo "$as_me: error: $2" >&2
59013  as_fn_exit $as_status
59014} # as_fn_error
59015
59016
59017# as_fn_set_status STATUS
59018# -----------------------
59019# Set $? to STATUS, without forking.
59020as_fn_set_status ()
59021{
59022  return $1
59023} # as_fn_set_status
59024
59025# as_fn_exit STATUS
59026# -----------------
59027# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
59028as_fn_exit ()
59029{
59030  set +e
59031  as_fn_set_status $1
59032  exit $1
59033} # as_fn_exit
59034
59035# as_fn_unset VAR
59036# ---------------
59037# Portably unset VAR.
59038as_fn_unset ()
59039{
59040  { eval $1=; unset $1;}
59041}
59042as_unset=as_fn_unset
59043# as_fn_append VAR VALUE
59044# ----------------------
59045# Append the text in VALUE to the end of the definition contained in VAR. Take
59046# advantage of any shell optimizations that allow amortized linear growth over
59047# repeated appends, instead of the typical quadratic growth present in naive
59048# implementations.
59049if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
59050  eval 'as_fn_append ()
59051  {
59052    eval $1+=\$2
59053  }'
59054else
59055  as_fn_append ()
59056  {
59057    eval $1=\$$1\$2
59058  }
59059fi # as_fn_append
59060
59061# as_fn_arith ARG...
59062# ------------------
59063# Perform arithmetic evaluation on the ARGs, and store the result in the
59064# global $as_val. Take advantage of shells that can avoid forks. The arguments
59065# must be portable across $(()) and expr.
59066if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
59067  eval 'as_fn_arith ()
59068  {
59069    as_val=$(( $* ))
59070  }'
59071else
59072  as_fn_arith ()
59073  {
59074    as_val=`expr "$@" || test $? -eq 1`
59075  }
59076fi # as_fn_arith
59077
59078
59079if expr a : '\(a\)' >/dev/null 2>&1 &&
59080   test "X`expr 00001 : '.*\(...\)'`" = X001; then
59081  as_expr=expr
59082else
59083  as_expr=false
59084fi
59085
59086if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
59087  as_basename=basename
59088else
59089  as_basename=false
59090fi
59091
59092if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
59093  as_dirname=dirname
59094else
59095  as_dirname=false
59096fi
59097
59098as_me=`$as_basename -- "$0" ||
59099$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
59100	 X"$0" : 'X\(//\)$' \| \
59101	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
59102$as_echo X/"$0" |
59103    sed '/^.*\/\([^/][^/]*\)\/*$/{
59104	    s//\1/
59105	    q
59106	  }
59107	  /^X\/\(\/\/\)$/{
59108	    s//\1/
59109	    q
59110	  }
59111	  /^X\/\(\/\).*/{
59112	    s//\1/
59113	    q
59114	  }
59115	  s/.*/./; q'`
59116
59117# Avoid depending upon Character Ranges.
59118as_cr_letters='abcdefghijklmnopqrstuvwxyz'
59119as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
59120as_cr_Letters=$as_cr_letters$as_cr_LETTERS
59121as_cr_digits='0123456789'
59122as_cr_alnum=$as_cr_Letters$as_cr_digits
59123
59124ECHO_C= ECHO_N= ECHO_T=
59125case `echo -n x` in #(((((
59126-n*)
59127  case `echo 'xy\c'` in
59128  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
59129  xy)  ECHO_C='\c';;
59130  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
59131       ECHO_T='	';;
59132  esac;;
59133*)
59134  ECHO_N='-n';;
59135esac
59136
59137rm -f conf$$ conf$$.exe conf$$.file
59138if test -d conf$$.dir; then
59139  rm -f conf$$.dir/conf$$.file
59140else
59141  rm -f conf$$.dir
59142  mkdir conf$$.dir 2>/dev/null
59143fi
59144if (echo >conf$$.file) 2>/dev/null; then
59145  if ln -s conf$$.file conf$$ 2>/dev/null; then
59146    as_ln_s='ln -s'
59147    # ... but there are two gotchas:
59148    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
59149    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
59150    # In both cases, we have to default to `cp -pR'.
59151    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
59152      as_ln_s='cp -pR'
59153  elif ln conf$$.file conf$$ 2>/dev/null; then
59154    as_ln_s=ln
59155  else
59156    as_ln_s='cp -pR'
59157  fi
59158else
59159  as_ln_s='cp -pR'
59160fi
59161rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
59162rmdir conf$$.dir 2>/dev/null
59163
59164
59165# as_fn_mkdir_p
59166# -------------
59167# Create "$as_dir" as a directory, including parents if necessary.
59168as_fn_mkdir_p ()
59169{
59170
59171  case $as_dir in #(
59172  -*) as_dir=./$as_dir;;
59173  esac
59174  test -d "$as_dir" || eval $as_mkdir_p || {
59175    as_dirs=
59176    while :; do
59177      case $as_dir in #(
59178      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
59179      *) as_qdir=$as_dir;;
59180      esac
59181      as_dirs="'$as_qdir' $as_dirs"
59182      as_dir=`$as_dirname -- "$as_dir" ||
59183$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
59184	 X"$as_dir" : 'X\(//\)[^/]' \| \
59185	 X"$as_dir" : 'X\(//\)$' \| \
59186	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
59187$as_echo X"$as_dir" |
59188    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
59189	    s//\1/
59190	    q
59191	  }
59192	  /^X\(\/\/\)[^/].*/{
59193	    s//\1/
59194	    q
59195	  }
59196	  /^X\(\/\/\)$/{
59197	    s//\1/
59198	    q
59199	  }
59200	  /^X\(\/\).*/{
59201	    s//\1/
59202	    q
59203	  }
59204	  s/.*/./; q'`
59205      test -d "$as_dir" && break
59206    done
59207    test -z "$as_dirs" || eval "mkdir $as_dirs"
59208  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
59209
59210
59211} # as_fn_mkdir_p
59212if mkdir -p . 2>/dev/null; then
59213  as_mkdir_p='mkdir -p "$as_dir"'
59214else
59215  test -d ./-p && rmdir ./-p
59216  as_mkdir_p=false
59217fi
59218
59219
59220# as_fn_executable_p FILE
59221# -----------------------
59222# Test if FILE is an executable regular file.
59223as_fn_executable_p ()
59224{
59225  test -f "$1" && test -x "$1"
59226} # as_fn_executable_p
59227as_test_x='test -x'
59228as_executable_p=as_fn_executable_p
59229
59230# Sed expression to map a string onto a valid CPP name.
59231as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
59232
59233# Sed expression to map a string onto a valid variable name.
59234as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
59235
59236
59237exec 6>&1
59238## ----------------------------------- ##
59239## Main body of $CONFIG_STATUS script. ##
59240## ----------------------------------- ##
59241_ASEOF
59242test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
59243
59244cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59245# Save the log message, to keep $0 and so on meaningful, and to
59246# report actual input values of CONFIG_FILES etc. instead of their
59247# values after options handling.
59248ac_log="
59249This file was extended by OpenJDK $as_me jdk9, which was
59250generated by GNU Autoconf 2.69.  Invocation command line was
59251
59252  CONFIG_FILES    = $CONFIG_FILES
59253  CONFIG_HEADERS  = $CONFIG_HEADERS
59254  CONFIG_LINKS    = $CONFIG_LINKS
59255  CONFIG_COMMANDS = $CONFIG_COMMANDS
59256  $ $0 $@
59257
59258on `(hostname || uname -n) 2>/dev/null | sed 1q`
59259"
59260
59261_ACEOF
59262
59263case $ac_config_files in *"
59264"*) set x $ac_config_files; shift; ac_config_files=$*;;
59265esac
59266
59267
59268
59269cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59270# Files that config.status was made for.
59271config_files="$ac_config_files"
59272
59273_ACEOF
59274
59275cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59276ac_cs_usage="\
59277\`$as_me' instantiates files and other configuration actions
59278from templates according to the current configuration.  Unless the files
59279and actions are specified as TAGs, all are instantiated by default.
59280
59281Usage: $0 [OPTION]... [TAG]...
59282
59283  -h, --help       print this help, then exit
59284  -V, --version    print version number and configuration settings, then exit
59285      --config     print configuration, then exit
59286  -q, --quiet, --silent
59287                   do not print progress messages
59288  -d, --debug      don't remove temporary files
59289      --recheck    update $as_me by reconfiguring in the same conditions
59290      --file=FILE[:TEMPLATE]
59291                   instantiate the configuration file FILE
59292
59293Configuration files:
59294$config_files
59295
59296Report bugs to <build-dev@openjdk.java.net>.
59297OpenJDK home page: <http://openjdk.java.net>."
59298
59299_ACEOF
59300cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59301ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
59302ac_cs_version="\\
59303OpenJDK config.status jdk9
59304configured by $0, generated by GNU Autoconf 2.69,
59305  with options \\"\$ac_cs_config\\"
59306
59307Copyright (C) 2012 Free Software Foundation, Inc.
59308This config.status script is free software; the Free Software Foundation
59309gives unlimited permission to copy, distribute and modify it."
59310
59311ac_pwd='$ac_pwd'
59312srcdir='$srcdir'
59313AWK='$AWK'
59314test -n "\$AWK" || AWK=awk
59315_ACEOF
59316
59317cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59318# The default lists apply if the user does not specify any file.
59319ac_need_defaults=:
59320while test $# != 0
59321do
59322  case $1 in
59323  --*=?*)
59324    ac_option=`expr "X$1" : 'X\([^=]*\)='`
59325    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
59326    ac_shift=:
59327    ;;
59328  --*=)
59329    ac_option=`expr "X$1" : 'X\([^=]*\)='`
59330    ac_optarg=
59331    ac_shift=:
59332    ;;
59333  *)
59334    ac_option=$1
59335    ac_optarg=$2
59336    ac_shift=shift
59337    ;;
59338  esac
59339
59340  case $ac_option in
59341  # Handling of the options.
59342  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
59343    ac_cs_recheck=: ;;
59344  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
59345    $as_echo "$ac_cs_version"; exit ;;
59346  --config | --confi | --conf | --con | --co | --c )
59347    $as_echo "$ac_cs_config"; exit ;;
59348  --debug | --debu | --deb | --de | --d | -d )
59349    debug=: ;;
59350  --file | --fil | --fi | --f )
59351    $ac_shift
59352    case $ac_optarg in
59353    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
59354    '') as_fn_error $? "missing file argument" ;;
59355    esac
59356    as_fn_append CONFIG_FILES " '$ac_optarg'"
59357    ac_need_defaults=false;;
59358  --he | --h |  --help | --hel | -h )
59359    $as_echo "$ac_cs_usage"; exit ;;
59360  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
59361  | -silent | --silent | --silen | --sile | --sil | --si | --s)
59362    ac_cs_silent=: ;;
59363
59364  # This is an error.
59365  -*) as_fn_error $? "unrecognized option: \`$1'
59366Try \`$0 --help' for more information." ;;
59367
59368  *) as_fn_append ac_config_targets " $1"
59369     ac_need_defaults=false ;;
59370
59371  esac
59372  shift
59373done
59374
59375ac_configure_extra_args=
59376
59377if $ac_cs_silent; then
59378  exec 6>/dev/null
59379  ac_configure_extra_args="$ac_configure_extra_args --silent"
59380fi
59381
59382_ACEOF
59383cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59384if \$ac_cs_recheck; then
59385  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
59386  shift
59387  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
59388  CONFIG_SHELL='$SHELL'
59389  export CONFIG_SHELL
59390  exec "\$@"
59391fi
59392
59393_ACEOF
59394cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59395exec 5>>config.log
59396{
59397  echo
59398  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
59399## Running $as_me. ##
59400_ASBOX
59401  $as_echo "$ac_log"
59402} >&5
59403
59404_ACEOF
59405cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59406_ACEOF
59407
59408cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59409
59410# Handling of arguments.
59411for ac_config_target in $ac_config_targets
59412do
59413  case $ac_config_target in
59414    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
59415    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
59416    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
59417    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
59418    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
59419
59420  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
59421  esac
59422done
59423
59424
59425# If the user did not use the arguments to specify the items to instantiate,
59426# then the envvar interface is used.  Set only those that are not.
59427# We use the long form for the default assignment because of an extremely
59428# bizarre bug on SunOS 4.1.3.
59429if $ac_need_defaults; then
59430  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
59431fi
59432
59433# Have a temporary directory for convenience.  Make it in the build tree
59434# simply because there is no reason against having it here, and in addition,
59435# creating and moving files from /tmp can sometimes cause problems.
59436# Hook for its removal unless debugging.
59437# Note that there is a small window in which the directory will not be cleaned:
59438# after its creation but before its name has been assigned to `$tmp'.
59439$debug ||
59440{
59441  tmp= ac_tmp=
59442  trap 'exit_status=$?
59443  : "${ac_tmp:=$tmp}"
59444  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
59445' 0
59446  trap 'as_fn_exit 1' 1 2 13 15
59447}
59448# Create a (secure) tmp directory for tmp files.
59449
59450{
59451  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
59452  test -d "$tmp"
59453}  ||
59454{
59455  tmp=./conf$$-$RANDOM
59456  (umask 077 && mkdir "$tmp")
59457} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
59458ac_tmp=$tmp
59459
59460# Set up the scripts for CONFIG_FILES section.
59461# No need to generate them if there are no CONFIG_FILES.
59462# This happens for instance with `./config.status config.h'.
59463if test -n "$CONFIG_FILES"; then
59464
59465
59466ac_cr=`echo X | tr X '\015'`
59467# On cygwin, bash can eat \r inside `` if the user requested igncr.
59468# But we know of no other shell where ac_cr would be empty at this
59469# point, so we can use a bashism as a fallback.
59470if test "x$ac_cr" = x; then
59471  eval ac_cr=\$\'\\r\'
59472fi
59473ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
59474if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
59475  ac_cs_awk_cr='\\r'
59476else
59477  ac_cs_awk_cr=$ac_cr
59478fi
59479
59480echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
59481_ACEOF
59482
59483
59484{
59485  echo "cat >conf$$subs.awk <<_ACEOF" &&
59486  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
59487  echo "_ACEOF"
59488} >conf$$subs.sh ||
59489  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
59490ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
59491ac_delim='%!_!# '
59492for ac_last_try in false false false false false :; do
59493  . ./conf$$subs.sh ||
59494    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
59495
59496  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
59497  if test $ac_delim_n = $ac_delim_num; then
59498    break
59499  elif $ac_last_try; then
59500    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
59501  else
59502    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
59503  fi
59504done
59505rm -f conf$$subs.sh
59506
59507cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59508cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
59509_ACEOF
59510sed -n '
59511h
59512s/^/S["/; s/!.*/"]=/
59513p
59514g
59515s/^[^!]*!//
59516:repl
59517t repl
59518s/'"$ac_delim"'$//
59519t delim
59520:nl
59521h
59522s/\(.\{148\}\)..*/\1/
59523t more1
59524s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
59525p
59526n
59527b repl
59528:more1
59529s/["\\]/\\&/g; s/^/"/; s/$/"\\/
59530p
59531g
59532s/.\{148\}//
59533t nl
59534:delim
59535h
59536s/\(.\{148\}\)..*/\1/
59537t more2
59538s/["\\]/\\&/g; s/^/"/; s/$/"/
59539p
59540b
59541:more2
59542s/["\\]/\\&/g; s/^/"/; s/$/"\\/
59543p
59544g
59545s/.\{148\}//
59546t delim
59547' <conf$$subs.awk | sed '
59548/^[^""]/{
59549  N
59550  s/\n//
59551}
59552' >>$CONFIG_STATUS || ac_write_fail=1
59553rm -f conf$$subs.awk
59554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59555_ACAWK
59556cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
59557  for (key in S) S_is_set[key] = 1
59558  FS = ""
59559
59560}
59561{
59562  line = $ 0
59563  nfields = split(line, field, "@")
59564  substed = 0
59565  len = length(field[1])
59566  for (i = 2; i < nfields; i++) {
59567    key = field[i]
59568    keylen = length(key)
59569    if (S_is_set[key]) {
59570      value = S[key]
59571      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
59572      len += length(value) + length(field[++i])
59573      substed = 1
59574    } else
59575      len += 1 + keylen
59576  }
59577
59578  print line
59579}
59580
59581_ACAWK
59582_ACEOF
59583cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59584if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
59585  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
59586else
59587  cat
59588fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
59589  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
59590_ACEOF
59591
59592# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
59593# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
59594# trailing colons and then remove the whole line if VPATH becomes empty
59595# (actually we leave an empty line to preserve line numbers).
59596if test "x$srcdir" = x.; then
59597  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
59598h
59599s///
59600s/^/:/
59601s/[	 ]*$/:/
59602s/:\$(srcdir):/:/g
59603s/:\${srcdir}:/:/g
59604s/:@srcdir@:/:/g
59605s/^:*//
59606s/:*$//
59607x
59608s/\(=[	 ]*\).*/\1/
59609G
59610s/\n//
59611s/^[^=]*=[	 ]*$//
59612}'
59613fi
59614
59615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59616fi # test -n "$CONFIG_FILES"
59617
59618
59619eval set X "  :F $CONFIG_FILES      "
59620shift
59621for ac_tag
59622do
59623  case $ac_tag in
59624  :[FHLC]) ac_mode=$ac_tag; continue;;
59625  esac
59626  case $ac_mode$ac_tag in
59627  :[FHL]*:*);;
59628  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
59629  :[FH]-) ac_tag=-:-;;
59630  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
59631  esac
59632  ac_save_IFS=$IFS
59633  IFS=:
59634  set x $ac_tag
59635  IFS=$ac_save_IFS
59636  shift
59637  ac_file=$1
59638  shift
59639
59640  case $ac_mode in
59641  :L) ac_source=$1;;
59642  :[FH])
59643    ac_file_inputs=
59644    for ac_f
59645    do
59646      case $ac_f in
59647      -) ac_f="$ac_tmp/stdin";;
59648      *) # Look for the file first in the build tree, then in the source tree
59649	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
59650	 # because $ac_f cannot contain `:'.
59651	 test -f "$ac_f" ||
59652	   case $ac_f in
59653	   [\\/$]*) false;;
59654	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
59655	   esac ||
59656	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
59657      esac
59658      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
59659      as_fn_append ac_file_inputs " '$ac_f'"
59660    done
59661
59662    # Let's still pretend it is `configure' which instantiates (i.e., don't
59663    # use $as_me), people would be surprised to read:
59664    #    /* config.h.  Generated by config.status.  */
59665    configure_input='Generated from '`
59666	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
59667	`' by configure.'
59668    if test x"$ac_file" != x-; then
59669      configure_input="$ac_file.  $configure_input"
59670      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
59671$as_echo "$as_me: creating $ac_file" >&6;}
59672    fi
59673    # Neutralize special characters interpreted by sed in replacement strings.
59674    case $configure_input in #(
59675    *\&* | *\|* | *\\* )
59676       ac_sed_conf_input=`$as_echo "$configure_input" |
59677       sed 's/[\\\\&|]/\\\\&/g'`;; #(
59678    *) ac_sed_conf_input=$configure_input;;
59679    esac
59680
59681    case $ac_tag in
59682    *:-:* | *:-) cat >"$ac_tmp/stdin" \
59683      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
59684    esac
59685    ;;
59686  esac
59687
59688  ac_dir=`$as_dirname -- "$ac_file" ||
59689$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
59690	 X"$ac_file" : 'X\(//\)[^/]' \| \
59691	 X"$ac_file" : 'X\(//\)$' \| \
59692	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
59693$as_echo X"$ac_file" |
59694    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
59695	    s//\1/
59696	    q
59697	  }
59698	  /^X\(\/\/\)[^/].*/{
59699	    s//\1/
59700	    q
59701	  }
59702	  /^X\(\/\/\)$/{
59703	    s//\1/
59704	    q
59705	  }
59706	  /^X\(\/\).*/{
59707	    s//\1/
59708	    q
59709	  }
59710	  s/.*/./; q'`
59711  as_dir="$ac_dir"; as_fn_mkdir_p
59712  ac_builddir=.
59713
59714case "$ac_dir" in
59715.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
59716*)
59717  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
59718  # A ".." for each directory in $ac_dir_suffix.
59719  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
59720  case $ac_top_builddir_sub in
59721  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
59722  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
59723  esac ;;
59724esac
59725ac_abs_top_builddir=$ac_pwd
59726ac_abs_builddir=$ac_pwd$ac_dir_suffix
59727# for backward compatibility:
59728ac_top_builddir=$ac_top_build_prefix
59729
59730case $srcdir in
59731  .)  # We are building in place.
59732    ac_srcdir=.
59733    ac_top_srcdir=$ac_top_builddir_sub
59734    ac_abs_top_srcdir=$ac_pwd ;;
59735  [\\/]* | ?:[\\/]* )  # Absolute name.
59736    ac_srcdir=$srcdir$ac_dir_suffix;
59737    ac_top_srcdir=$srcdir
59738    ac_abs_top_srcdir=$srcdir ;;
59739  *) # Relative name.
59740    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
59741    ac_top_srcdir=$ac_top_build_prefix$srcdir
59742    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
59743esac
59744ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
59745
59746
59747  case $ac_mode in
59748  :F)
59749  #
59750  # CONFIG_FILE
59751  #
59752
59753_ACEOF
59754
59755cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59756# If the template does not know about datarootdir, expand it.
59757# FIXME: This hack should be removed a few years after 2.60.
59758ac_datarootdir_hack=; ac_datarootdir_seen=
59759ac_sed_dataroot='
59760/datarootdir/ {
59761  p
59762  q
59763}
59764/@datadir@/p
59765/@docdir@/p
59766/@infodir@/p
59767/@localedir@/p
59768/@mandir@/p'
59769case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
59770*datarootdir*) ac_datarootdir_seen=yes;;
59771*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
59772  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
59773$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
59774_ACEOF
59775cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59776  ac_datarootdir_hack='
59777  s&@datadir@&$datadir&g
59778  s&@docdir@&$docdir&g
59779  s&@infodir@&$infodir&g
59780  s&@localedir@&$localedir&g
59781  s&@mandir@&$mandir&g
59782  s&\\\${datarootdir}&$datarootdir&g' ;;
59783esac
59784_ACEOF
59785
59786# Neutralize VPATH when `$srcdir' = `.'.
59787# Shell code in configure.ac might set extrasub.
59788# FIXME: do we really want to maintain this feature?
59789cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59790ac_sed_extra="$ac_vpsub
59791$extrasub
59792_ACEOF
59793cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59794:t
59795/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
59796s|@configure_input@|$ac_sed_conf_input|;t t
59797s&@top_builddir@&$ac_top_builddir_sub&;t t
59798s&@top_build_prefix@&$ac_top_build_prefix&;t t
59799s&@srcdir@&$ac_srcdir&;t t
59800s&@abs_srcdir@&$ac_abs_srcdir&;t t
59801s&@top_srcdir@&$ac_top_srcdir&;t t
59802s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
59803s&@builddir@&$ac_builddir&;t t
59804s&@abs_builddir@&$ac_abs_builddir&;t t
59805s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
59806$ac_datarootdir_hack
59807"
59808eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
59809  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
59810
59811test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
59812  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
59813  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
59814      "$ac_tmp/out"`; test -z "$ac_out"; } &&
59815  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
59816which seems to be undefined.  Please make sure it is defined" >&5
59817$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
59818which seems to be undefined.  Please make sure it is defined" >&2;}
59819
59820  rm -f "$ac_tmp/stdin"
59821  case $ac_file in
59822  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
59823  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
59824  esac \
59825  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
59826 ;;
59827
59828
59829
59830  esac
59831
59832done # for ac_tag
59833
59834
59835as_fn_exit 0
59836_ACEOF
59837ac_clean_files=$ac_clean_files_save
59838
59839test $ac_write_fail = 0 ||
59840  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
59841
59842
59843# configure is writing to config.log, and then calls config.status.
59844# config.status does its own redirection, appending to config.log.
59845# Unfortunately, on DOS this fails, as config.log is still kept open
59846# by configure, so config.status won't be able to write to it; its
59847# output is simply discarded.  So we exec the FD to /dev/null,
59848# effectively closing config.log, so it can be properly (re)opened and
59849# appended to by config.status.  When coming back to configure, we
59850# need to make the FD available again.
59851if test "$no_create" != yes; then
59852  ac_cs_success=:
59853  ac_config_status_args=
59854  test "$silent" = yes &&
59855    ac_config_status_args="$ac_config_status_args --quiet"
59856  exec 5>/dev/null
59857  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
59858  exec 5>>config.log
59859  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
59860  # would make configure fail if this is the last instruction.
59861  $ac_cs_success || as_fn_exit 1
59862fi
59863if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
59864  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
59865$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
59866fi
59867
59868
59869# After AC_OUTPUT, we need to do final work
59870
59871
59872  # Try to move config.log (generated by autoconf) to the configure-support directory.
59873  if test -e ./config.log; then
59874    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
59875  fi
59876
59877  # Rotate our log file (configure.log)
59878  if test -e "$OUTPUT_ROOT/configure.log.old"; then
59879    $RM -f "$OUTPUT_ROOT/configure.log.old"
59880  fi
59881  if test -e "$OUTPUT_ROOT/configure.log"; then
59882    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
59883  fi
59884
59885  # Move configure.log from current directory to the build output root
59886  if test -e ./configure.log; then
59887    echo found it
59888    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
59889  fi
59890
59891  # Make the compare script executable
59892  $CHMOD +x $OUTPUT_ROOT/compare.sh
59893
59894
59895# Finally output some useful information to the user
59896
59897  # Finally output some useful information to the user
59898
59899  printf "\n"
59900  printf "====================================================\n"
59901  if test "x$no_create" != "xyes"; then
59902    if test "x$IS_RECONFIGURE" != "xyes"; then
59903      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
59904    else
59905      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
59906    fi
59907  else
59908    if test "x$IS_RECONFIGURE" != "xyes"; then
59909      printf "A configuration has been successfully checked but not created\n"
59910    else
59911      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
59912    fi
59913  fi
59914  if test "x$CONFIGURE_COMMAND_LINE" != x; then
59915    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
59916  else
59917    printf "using default settings.\n"
59918  fi
59919
59920  printf "\n"
59921  printf "Configuration summary:\n"
59922  printf "* Debug level:    $DEBUG_LEVEL\n"
59923  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
59924  printf "* JDK variant:    $JDK_VARIANT\n"
59925  printf "* JVM variants:   $with_jvm_variants\n"
59926  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
59927  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
59928
59929  printf "\n"
59930  printf "Tools summary:\n"
59931  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
59932    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
59933  fi
59934  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
59935  if test "x$TOOLCHAIN_VERSION" != "x"; then
59936    print_version=" $TOOLCHAIN_VERSION"
59937  fi
59938  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
59939  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
59940  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
59941
59942  printf "\n"
59943  printf "Build performance summary:\n"
59944  printf "* Cores to use:   $JOBS\n"
59945  printf "* Memory limit:   $MEMORY_SIZE MB\n"
59946  if test "x$CCACHE_STATUS" != "x"; then
59947    printf "* ccache status:  $CCACHE_STATUS\n"
59948  fi
59949  printf "\n"
59950
59951  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
59952    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
59953    printf "will result in longer build times.\n"
59954    printf "\n"
59955  fi
59956
59957  if test "x$FOUND_ALT_VARIABLES" != "x"; then
59958    printf "WARNING: You have old-style ALT_ environment variables set.\n"
59959    printf "These are not respected, and will be ignored. It is recommended\n"
59960    printf "that you clean your environment. The following variables are set:\n"
59961    printf "$FOUND_ALT_VARIABLES\n"
59962    printf "\n"
59963  fi
59964
59965  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
59966    printf "WARNING: Your build output directory is not on a local disk.\n"
59967    printf "This will severely degrade build performance!\n"
59968    printf "It is recommended that you create an output directory on a local disk,\n"
59969    printf "and run the configure script again from that directory.\n"
59970    printf "\n"
59971  fi
59972
59973  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
59974    printf "WARNING: The result of this configuration has overridden an older\n"
59975    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
59976    printf "proper build. Failure to do so might result in strange build problems.\n"
59977    printf "\n"
59978  fi
59979
59980  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
59981    printf "WARNING: The result of this configuration was not saved.\n"
59982    printf "You should run without '--no-create | -n' to create the configuration.\n"
59983    printf "\n"
59984  fi
59985
59986
59987
59988  # Locate config.log.
59989  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
59990    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
59991  elif test -e "./config.log"; then
59992    CONFIG_LOG_PATH="."
59993  fi
59994
59995  if test -e "$CONFIG_LOG_PATH/config.log"; then
59996    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
59997    if test $? -eq 0; then
59998      printf "The following warnings were produced. Repeated here for convenience:\n"
59999      # We must quote sed expression (using []) to stop m4 from eating the [].
60000      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
60001      printf "\n"
60002    fi
60003  fi
60004
60005