generated-configure.sh revision 1817:a151b3ec17a1
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
693CFLAGS_WARNINGS_ARE_ERRORS
694DISABLE_WARNING_PREFIX
695HOTSPOT_SET_WARNINGS_AS_ERRORS
696WARNINGS_AS_ERRORS
697COMPILER_SUPPORTS_TARGET_BITS_FLAG
698ZERO_ARCHFLAG
699LDFLAGS_TESTEXE
700LDFLAGS_TESTLIB
701LDFLAGS_CXX_JDK
702JDKEXE_LIBS
703JDKLIB_LIBS
704LDFLAGS_JDKEXE
705LDFLAGS_JDKLIB
706CXXFLAGS_TESTEXE
707CXXFLAGS_TESTLIB
708CFLAGS_TESTEXE
709CFLAGS_TESTLIB
710CXXFLAGS_JDKEXE
711CXXFLAGS_JDKLIB
712CFLAGS_JDKEXE
713CFLAGS_JDKLIB
714MACOSX_VERSION_MIN
715CXX_O_FLAG_NONE
716CXX_O_FLAG_DEBUG
717CXX_O_FLAG_NORM
718CXX_O_FLAG_HI
719CXX_O_FLAG_HIGHEST
720C_O_FLAG_NONE
721C_O_FLAG_DEBUG
722C_O_FLAG_NORM
723C_O_FLAG_HI
724C_O_FLAG_HIGHEST
725CXXFLAGS_DEBUG_SYMBOLS
726CFLAGS_DEBUG_SYMBOLS
727CXX_FLAG_DEPS
728C_FLAG_DEPS
729SET_SHARED_LIBRARY_MAPFILE
730SET_SHARED_LIBRARY_NAME
731SET_SHARED_LIBRARY_ORIGIN
732SET_EXECUTABLE_ORIGIN
733CXX_FLAG_REORDER
734C_FLAG_REORDER
735RC_FLAGS
736AR_OUT_OPTION
737LD_OUT_OPTION
738EXE_OUT_OPTION
739CC_OUT_OPTION
740STRIPFLAGS
741ARFLAGS
742COMPILER_TARGET_BITS_FLAG
743JT_HOME
744JTREGEXE
745USING_BROKEN_SUSE_LD
746PACKAGE_PATH
747USE_CLANG
748HOTSPOT_LD
749HOTSPOT_CXX
750HOTSPOT_RC
751HOTSPOT_MT
752BUILD_AS
753BUILD_LD
754BUILD_AR
755BUILD_NM
756BUILD_CXX
757BUILD_CC
758BUILD_SYSROOT_LDFLAGS
759BUILD_SYSROOT_CFLAGS
760ac_ct_OBJDUMP
761OBJDUMP
762ac_ct_OBJCOPY
763OBJCOPY
764ac_ct_NM
765ac_ct_STRIP
766GNM
767NM
768STRIP
769MSBUILD
770DUMPBIN
771RC
772MT
773LIPO
774ac_ct_AR
775AR
776AS
777LDCXX
778LD
779CXXCPP
780CPP
781ac_ct_CXX
782CXXFLAGS
783CXX
784ac_ct_PROPER_COMPILER_CXX
785PROPER_COMPILER_CXX
786TOOLCHAIN_PATH_CXX
787POTENTIAL_CXX
788OBJEXT
789EXEEXT
790ac_ct_CC
791CPPFLAGS
792LDFLAGS
793CFLAGS
794CC
795ac_ct_PROPER_COMPILER_CC
796PROPER_COMPILER_CC
797TOOLCHAIN_PATH_CC
798POTENTIAL_CC
799VS_LIB
800VS_INCLUDE
801VS_PATH
802CYGWIN_LINK
803SYSROOT_LDFLAGS
804SYSROOT_CFLAGS
805LEGACY_EXTRA_LDFLAGS
806LEGACY_EXTRA_CXXFLAGS
807LEGACY_EXTRA_CFLAGS
808EXE_SUFFIX
809OBJ_SUFFIX
810STATIC_LIBRARY
811SHARED_LIBRARY
812STATIC_LIBRARY_SUFFIX
813SHARED_LIBRARY_SUFFIX
814LIBRARY_PREFIX
815TOOLCHAIN_TYPE
816STATIC_BUILD
817BUILD_HOTSPOT
818HOTSPOT_DIST
819BUILD_OUTPUT
820JDK_TOPDIR
821NASHORN_TOPDIR
822HOTSPOT_TOPDIR
823JAXWS_TOPDIR
824JAXP_TOPDIR
825CORBA_TOPDIR
826LANGTOOLS_TOPDIR
827BOOT_JDK_BITS
828JAVAC_FLAGS
829BOOT_JDK_SOURCETARGET
830JARSIGNER
831JAR
832JAVAH
833JAVAC
834JAVA
835BOOT_JDK
836JAVA_CHECK
837JAVAC_CHECK
838VERSION_IS_GA
839VERSION_SHORT
840VERSION_STRING
841VERSION_NUMBER_FOUR_POSITIONS
842VERSION_NUMBER
843VERSION_OPT
844VERSION_BUILD
845VERSION_PRE
846VERSION_PATCH
847VERSION_SECURITY
848VERSION_MINOR
849VERSION_MAJOR
850MACOSX_BUNDLE_ID_BASE
851MACOSX_BUNDLE_NAME_BASE
852COMPANY_NAME
853JDK_RC_PLATFORM_NAME
854PRODUCT_SUFFIX
855PRODUCT_NAME
856LAUNCHER_NAME
857COPYRIGHT_YEAR
858COMPRESS_JARS
859UNLIMITED_CRYPTO
860CACERTS_FILE
861TEST_IN_BUILD
862BUILD_HEADLESS
863SUPPORT_HEADFUL
864SUPPORT_HEADLESS
865DEFAULT_MAKE_TARGET
866OS_VERSION_MICRO
867OS_VERSION_MINOR
868OS_VERSION_MAJOR
869PKG_CONFIG
870BASH_ARGS
871SETFILE
872CODESIGN
873XATTR
874DSYMUTIL
875IS_GNU_TIME
876PATCH
877TIME
878STAT
879HG
880READELF
881OTOOL
882LDD
883ZIP
884UNZIP
885FIND_DELETE
886OUTPUT_SYNC
887OUTPUT_SYNC_SUPPORTED
888CHECK_TOOLSDIR_MAKE
889CHECK_TOOLSDIR_GMAKE
890CHECK_MAKE
891CHECK_GMAKE
892MAKE
893PKGHANDLER
894CONFIGURESUPPORT_OUTPUTDIR
895OUTPUT_ROOT
896CONF_NAME
897SPEC
898SDKROOT
899XCODEBUILD
900BUILD_VARIANT_RELEASE
901DEBUG_CLASSFILES
902FASTDEBUG
903VARIANT
904DEBUG_LEVEL
905MACOSX_UNIVERSAL
906INCLUDE_SA
907JVM_VARIANT_CORE
908JVM_VARIANT_ZEROSHARK
909JVM_VARIANT_ZERO
910JVM_VARIANT_KERNEL
911JVM_VARIANT_MINIMAL1
912JVM_VARIANT_CLIENT
913JVM_VARIANT_SERVER
914JVM_VARIANTS
915JVM_INTERPRETER
916JDK_VARIANT
917SET_OPENJDK
918CANONICAL_TOPDIR
919ORIGINAL_TOPDIR
920TOPDIR
921PATH_SEP
922ZERO_ARCHDEF
923DEFINE_CROSS_COMPILE_ARCH
924LP64
925OPENJDK_TARGET_OS_EXPORT_DIR
926OPENJDK_TARGET_CPU_JLI_CFLAGS
927OPENJDK_TARGET_CPU_OSARCH
928OPENJDK_TARGET_CPU_ISADIR
929OPENJDK_TARGET_CPU_LIBDIR
930OPENJDK_TARGET_CPU_LEGACY_LIB
931OPENJDK_TARGET_CPU_LEGACY
932REQUIRED_OS_VERSION
933REQUIRED_OS_NAME
934COMPILE_TYPE
935OPENJDK_TARGET_CPU_ENDIAN
936OPENJDK_TARGET_CPU_BITS
937OPENJDK_TARGET_CPU_ARCH
938OPENJDK_TARGET_CPU
939OPENJDK_TARGET_OS_ENV
940OPENJDK_TARGET_OS_TYPE
941OPENJDK_TARGET_OS
942OPENJDK_BUILD_CPU_ENDIAN
943OPENJDK_BUILD_CPU_BITS
944OPENJDK_BUILD_CPU_ARCH
945OPENJDK_BUILD_CPU
946OPENJDK_BUILD_OS_ENV
947OPENJDK_BUILD_OS_TYPE
948OPENJDK_BUILD_OS
949OPENJDK_BUILD_AUTOCONF_NAME
950OPENJDK_TARGET_AUTOCONF_NAME
951target_os
952target_vendor
953target_cpu
954target
955host_os
956host_vendor
957host_cpu
958host
959build_os
960build_vendor
961build_cpu
962build
963NICE
964CPIO
965DF
966READLINK
967CYGPATH
968SED
969FGREP
970EGREP
971GREP
972AWK
973XARGS
974WHICH
975WC
976UNIQ
977UNAME
978TR
979TOUCH
980TEE
981TAR
982TAIL
983SORT
984SH
985RMDIR
986RM
987PRINTF
988NAWK
989MV
990MKTEMP
991MKDIR
992LS
993LN
994HEAD
995FIND
996FILE
997EXPR
998ECHO
999DIRNAME
1000DIFF
1001DATE
1002CUT
1003CP
1004COMM
1005CMP
1006CHMOD
1007CAT
1008BASH
1009BASENAME
1010DATE_WHEN_CONFIGURED
1011ORIGINAL_PATH
1012CONFIGURE_COMMAND_LINE
1013target_alias
1014host_alias
1015build_alias
1016LIBS
1017ECHO_T
1018ECHO_N
1019ECHO_C
1020DEFS
1021mandir
1022localedir
1023libdir
1024psdir
1025pdfdir
1026dvidir
1027htmldir
1028infodir
1029docdir
1030oldincludedir
1031includedir
1032localstatedir
1033sharedstatedir
1034sysconfdir
1035datadir
1036datarootdir
1037libexecdir
1038sbindir
1039bindir
1040program_transform_name
1041prefix
1042exec_prefix
1043PACKAGE_URL
1044PACKAGE_BUGREPORT
1045PACKAGE_STRING
1046PACKAGE_VERSION
1047PACKAGE_TARNAME
1048PACKAGE_NAME
1049PATH_SEPARATOR
1050SHELL'
1051ac_subst_files=''
1052ac_user_opts='
1053enable_option_checking
1054with_target_bits
1055enable_openjdk_only
1056with_custom_make_dir
1057with_jdk_variant
1058with_jvm_interpreter
1059with_jvm_variants
1060enable_debug
1061with_debug_level
1062with_devkit
1063with_sys_root
1064with_sysroot
1065with_tools_dir
1066with_toolchain_path
1067with_extra_path
1068with_sdk_name
1069with_conf_name
1070with_output_sync
1071with_default_make_target
1072enable_headful
1073enable_hotspot_test_in_build
1074with_cacerts_file
1075enable_unlimited_crypto
1076with_copyright_year
1077with_milestone
1078with_update_version
1079with_user_release_suffix
1080with_build_number
1081with_version_string
1082with_version_pre
1083with_version_opt
1084with_version_build
1085with_version_major
1086with_version_minor
1087with_version_security
1088with_version_patch
1089with_boot_jdk
1090with_add_source_root
1091with_override_source_root
1092with_adds_and_overrides
1093with_override_langtools
1094with_override_corba
1095with_override_jaxp
1096with_override_jaxws
1097with_override_hotspot
1098with_override_nashorn
1099with_override_jdk
1100with_import_hotspot
1101enable_static_build
1102with_toolchain_type
1103with_extra_cflags
1104with_extra_cxxflags
1105with_extra_ldflags
1106with_toolchain_version
1107with_build_devkit
1108with_jtreg
1109enable_warnings_as_errors
1110enable_debug_symbols
1111enable_zip_debug_info
1112enable_native_coverage
1113with_stdc__lib
1114with_msvcr_dll
1115with_msvcp_dll
1116with_x
1117with_cups
1118with_cups_include
1119with_freetype
1120with_freetype_include
1121with_freetype_lib
1122with_freetype_src
1123enable_freetype_bundling
1124with_alsa
1125with_alsa_include
1126with_alsa_lib
1127with_libffi
1128with_libffi_include
1129with_libffi_lib
1130with_libjpeg
1131with_giflib
1132with_libpng
1133with_zlib
1134with_lcms
1135with_dxsdk
1136with_dxsdk_lib
1137with_dxsdk_include
1138with_num_cores
1139with_memory_size
1140with_jobs
1141with_boot_jdk_jvmargs
1142with_sjavac_server_java
1143enable_sjavac
1144enable_javac_server
1145enable_icecc
1146enable_precompiled_headers
1147enable_ccache
1148with_ccache_dir
1149'
1150      ac_precious_vars='build_alias
1151host_alias
1152target_alias
1153BASENAME
1154BASH
1155CAT
1156CHMOD
1157CMP
1158COMM
1159CP
1160CUT
1161DATE
1162DIFF
1163DIRNAME
1164ECHO
1165EXPR
1166FILE
1167FIND
1168HEAD
1169LN
1170LS
1171MKDIR
1172MKTEMP
1173MV
1174NAWK
1175PRINTF
1176RM
1177RMDIR
1178SH
1179SORT
1180TAIL
1181TAR
1182TEE
1183TOUCH
1184TR
1185UNAME
1186UNIQ
1187WC
1188WHICH
1189XARGS
1190AWK
1191GREP
1192EGREP
1193FGREP
1194SED
1195CYGPATH
1196READLINK
1197DF
1198CPIO
1199NICE
1200MAKE
1201UNZIP
1202ZIP
1203LDD
1204OTOOL
1205READELF
1206HG
1207STAT
1208TIME
1209PATCH
1210DSYMUTIL
1211XATTR
1212CODESIGN
1213SETFILE
1214PKG_CONFIG
1215JAVA
1216JAVAC
1217JAVAH
1218JAR
1219JARSIGNER
1220CC
1221CFLAGS
1222LDFLAGS
1223LIBS
1224CPPFLAGS
1225CXX
1226CXXFLAGS
1227CCC
1228CPP
1229CXXCPP
1230AS
1231AR
1232LIPO
1233STRIP
1234NM
1235GNM
1236OBJCOPY
1237OBJDUMP
1238BUILD_CC
1239BUILD_CXX
1240BUILD_NM
1241BUILD_AR
1242JTREGEXE
1243XMKMF
1244FREETYPE_CFLAGS
1245FREETYPE_LIBS
1246ALSA_CFLAGS
1247ALSA_LIBS
1248LIBFFI_CFLAGS
1249LIBFFI_LIBS
1250PNG_CFLAGS
1251PNG_LIBS
1252LCMS_CFLAGS
1253LCMS_LIBS
1254ICECC_CMD
1255ICECC_CREATE_ENV
1256ICECC_WRAPPER
1257CCACHE'
1258
1259
1260# Initialize some variables set by options.
1261ac_init_help=
1262ac_init_version=false
1263ac_unrecognized_opts=
1264ac_unrecognized_sep=
1265# The variables have the same names as the options, with
1266# dashes changed to underlines.
1267cache_file=/dev/null
1268exec_prefix=NONE
1269no_create=
1270no_recursion=
1271prefix=NONE
1272program_prefix=NONE
1273program_suffix=NONE
1274program_transform_name=s,x,x,
1275silent=
1276site=
1277srcdir=
1278verbose=
1279x_includes=NONE
1280x_libraries=NONE
1281
1282# Installation directory options.
1283# These are left unexpanded so users can "make install exec_prefix=/foo"
1284# and all the variables that are supposed to be based on exec_prefix
1285# by default will actually change.
1286# Use braces instead of parens because sh, perl, etc. also accept them.
1287# (The list follows the same order as the GNU Coding Standards.)
1288bindir='${exec_prefix}/bin'
1289sbindir='${exec_prefix}/sbin'
1290libexecdir='${exec_prefix}/libexec'
1291datarootdir='${prefix}/share'
1292datadir='${datarootdir}'
1293sysconfdir='${prefix}/etc'
1294sharedstatedir='${prefix}/com'
1295localstatedir='${prefix}/var'
1296includedir='${prefix}/include'
1297oldincludedir='/usr/include'
1298docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1299infodir='${datarootdir}/info'
1300htmldir='${docdir}'
1301dvidir='${docdir}'
1302pdfdir='${docdir}'
1303psdir='${docdir}'
1304libdir='${exec_prefix}/lib'
1305localedir='${datarootdir}/locale'
1306mandir='${datarootdir}/man'
1307
1308ac_prev=
1309ac_dashdash=
1310for ac_option
1311do
1312  # If the previous option needs an argument, assign it.
1313  if test -n "$ac_prev"; then
1314    eval $ac_prev=\$ac_option
1315    ac_prev=
1316    continue
1317  fi
1318
1319  case $ac_option in
1320  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1321  *=)   ac_optarg= ;;
1322  *)    ac_optarg=yes ;;
1323  esac
1324
1325  # Accept the important Cygnus configure options, so we can diagnose typos.
1326
1327  case $ac_dashdash$ac_option in
1328  --)
1329    ac_dashdash=yes ;;
1330
1331  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1332    ac_prev=bindir ;;
1333  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1334    bindir=$ac_optarg ;;
1335
1336  -build | --build | --buil | --bui | --bu)
1337    ac_prev=build_alias ;;
1338  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1339    build_alias=$ac_optarg ;;
1340
1341  -cache-file | --cache-file | --cache-fil | --cache-fi \
1342  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1343    ac_prev=cache_file ;;
1344  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1345  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1346    cache_file=$ac_optarg ;;
1347
1348  --config-cache | -C)
1349    cache_file=config.cache ;;
1350
1351  -datadir | --datadir | --datadi | --datad)
1352    ac_prev=datadir ;;
1353  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1354    datadir=$ac_optarg ;;
1355
1356  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1357  | --dataroo | --dataro | --datar)
1358    ac_prev=datarootdir ;;
1359  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1360  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1361    datarootdir=$ac_optarg ;;
1362
1363  -disable-* | --disable-*)
1364    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1365    # Reject names that are not valid shell variable names.
1366    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1367      as_fn_error $? "invalid feature name: $ac_useropt"
1368    ac_useropt_orig=$ac_useropt
1369    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1370    case $ac_user_opts in
1371      *"
1372"enable_$ac_useropt"
1373"*) ;;
1374      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1375	 ac_unrecognized_sep=', ';;
1376    esac
1377    eval enable_$ac_useropt=no ;;
1378
1379  -docdir | --docdir | --docdi | --doc | --do)
1380    ac_prev=docdir ;;
1381  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1382    docdir=$ac_optarg ;;
1383
1384  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1385    ac_prev=dvidir ;;
1386  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1387    dvidir=$ac_optarg ;;
1388
1389  -enable-* | --enable-*)
1390    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1391    # Reject names that are not valid shell variable names.
1392    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1393      as_fn_error $? "invalid feature name: $ac_useropt"
1394    ac_useropt_orig=$ac_useropt
1395    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1396    case $ac_user_opts in
1397      *"
1398"enable_$ac_useropt"
1399"*) ;;
1400      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1401	 ac_unrecognized_sep=', ';;
1402    esac
1403    eval enable_$ac_useropt=\$ac_optarg ;;
1404
1405  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1406  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1407  | --exec | --exe | --ex)
1408    ac_prev=exec_prefix ;;
1409  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1410  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1411  | --exec=* | --exe=* | --ex=*)
1412    exec_prefix=$ac_optarg ;;
1413
1414  -gas | --gas | --ga | --g)
1415    # Obsolete; use --with-gas.
1416    with_gas=yes ;;
1417
1418  -help | --help | --hel | --he | -h)
1419    ac_init_help=long ;;
1420  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1421    ac_init_help=recursive ;;
1422  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1423    ac_init_help=short ;;
1424
1425  -host | --host | --hos | --ho)
1426    ac_prev=host_alias ;;
1427  -host=* | --host=* | --hos=* | --ho=*)
1428    host_alias=$ac_optarg ;;
1429
1430  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1431    ac_prev=htmldir ;;
1432  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1433  | --ht=*)
1434    htmldir=$ac_optarg ;;
1435
1436  -includedir | --includedir | --includedi | --included | --include \
1437  | --includ | --inclu | --incl | --inc)
1438    ac_prev=includedir ;;
1439  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1440  | --includ=* | --inclu=* | --incl=* | --inc=*)
1441    includedir=$ac_optarg ;;
1442
1443  -infodir | --infodir | --infodi | --infod | --info | --inf)
1444    ac_prev=infodir ;;
1445  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1446    infodir=$ac_optarg ;;
1447
1448  -libdir | --libdir | --libdi | --libd)
1449    ac_prev=libdir ;;
1450  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1451    libdir=$ac_optarg ;;
1452
1453  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1454  | --libexe | --libex | --libe)
1455    ac_prev=libexecdir ;;
1456  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1457  | --libexe=* | --libex=* | --libe=*)
1458    libexecdir=$ac_optarg ;;
1459
1460  -localedir | --localedir | --localedi | --localed | --locale)
1461    ac_prev=localedir ;;
1462  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1463    localedir=$ac_optarg ;;
1464
1465  -localstatedir | --localstatedir | --localstatedi | --localstated \
1466  | --localstate | --localstat | --localsta | --localst | --locals)
1467    ac_prev=localstatedir ;;
1468  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1469  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1470    localstatedir=$ac_optarg ;;
1471
1472  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1473    ac_prev=mandir ;;
1474  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1475    mandir=$ac_optarg ;;
1476
1477  -nfp | --nfp | --nf)
1478    # Obsolete; use --without-fp.
1479    with_fp=no ;;
1480
1481  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1482  | --no-cr | --no-c | -n)
1483    no_create=yes ;;
1484
1485  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1486  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1487    no_recursion=yes ;;
1488
1489  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1490  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1491  | --oldin | --oldi | --old | --ol | --o)
1492    ac_prev=oldincludedir ;;
1493  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1494  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1495  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1496    oldincludedir=$ac_optarg ;;
1497
1498  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1499    ac_prev=prefix ;;
1500  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1501    prefix=$ac_optarg ;;
1502
1503  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1504  | --program-pre | --program-pr | --program-p)
1505    ac_prev=program_prefix ;;
1506  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1507  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1508    program_prefix=$ac_optarg ;;
1509
1510  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1511  | --program-suf | --program-su | --program-s)
1512    ac_prev=program_suffix ;;
1513  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1514  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1515    program_suffix=$ac_optarg ;;
1516
1517  -program-transform-name | --program-transform-name \
1518  | --program-transform-nam | --program-transform-na \
1519  | --program-transform-n | --program-transform- \
1520  | --program-transform | --program-transfor \
1521  | --program-transfo | --program-transf \
1522  | --program-trans | --program-tran \
1523  | --progr-tra | --program-tr | --program-t)
1524    ac_prev=program_transform_name ;;
1525  -program-transform-name=* | --program-transform-name=* \
1526  | --program-transform-nam=* | --program-transform-na=* \
1527  | --program-transform-n=* | --program-transform-=* \
1528  | --program-transform=* | --program-transfor=* \
1529  | --program-transfo=* | --program-transf=* \
1530  | --program-trans=* | --program-tran=* \
1531  | --progr-tra=* | --program-tr=* | --program-t=*)
1532    program_transform_name=$ac_optarg ;;
1533
1534  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1535    ac_prev=pdfdir ;;
1536  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1537    pdfdir=$ac_optarg ;;
1538
1539  -psdir | --psdir | --psdi | --psd | --ps)
1540    ac_prev=psdir ;;
1541  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1542    psdir=$ac_optarg ;;
1543
1544  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1545  | -silent | --silent | --silen | --sile | --sil)
1546    silent=yes ;;
1547
1548  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1549    ac_prev=sbindir ;;
1550  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1551  | --sbi=* | --sb=*)
1552    sbindir=$ac_optarg ;;
1553
1554  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1555  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1556  | --sharedst | --shareds | --shared | --share | --shar \
1557  | --sha | --sh)
1558    ac_prev=sharedstatedir ;;
1559  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1560  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1561  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1562  | --sha=* | --sh=*)
1563    sharedstatedir=$ac_optarg ;;
1564
1565  -site | --site | --sit)
1566    ac_prev=site ;;
1567  -site=* | --site=* | --sit=*)
1568    site=$ac_optarg ;;
1569
1570  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1571    ac_prev=srcdir ;;
1572  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1573    srcdir=$ac_optarg ;;
1574
1575  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1576  | --syscon | --sysco | --sysc | --sys | --sy)
1577    ac_prev=sysconfdir ;;
1578  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1579  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1580    sysconfdir=$ac_optarg ;;
1581
1582  -target | --target | --targe | --targ | --tar | --ta | --t)
1583    ac_prev=target_alias ;;
1584  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1585    target_alias=$ac_optarg ;;
1586
1587  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1588    verbose=yes ;;
1589
1590  -version | --version | --versio | --versi | --vers | -V)
1591    ac_init_version=: ;;
1592
1593  -with-* | --with-*)
1594    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1595    # Reject names that are not valid shell variable names.
1596    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1597      as_fn_error $? "invalid package name: $ac_useropt"
1598    ac_useropt_orig=$ac_useropt
1599    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1600    case $ac_user_opts in
1601      *"
1602"with_$ac_useropt"
1603"*) ;;
1604      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1605	 ac_unrecognized_sep=', ';;
1606    esac
1607    eval with_$ac_useropt=\$ac_optarg ;;
1608
1609  -without-* | --without-*)
1610    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1611    # Reject names that are not valid shell variable names.
1612    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1613      as_fn_error $? "invalid package name: $ac_useropt"
1614    ac_useropt_orig=$ac_useropt
1615    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1616    case $ac_user_opts in
1617      *"
1618"with_$ac_useropt"
1619"*) ;;
1620      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1621	 ac_unrecognized_sep=', ';;
1622    esac
1623    eval with_$ac_useropt=no ;;
1624
1625  --x)
1626    # Obsolete; use --with-x.
1627    with_x=yes ;;
1628
1629  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1630  | --x-incl | --x-inc | --x-in | --x-i)
1631    ac_prev=x_includes ;;
1632  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1633  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1634    x_includes=$ac_optarg ;;
1635
1636  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1637  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1638    ac_prev=x_libraries ;;
1639  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1640  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1641    x_libraries=$ac_optarg ;;
1642
1643  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1644Try \`$0 --help' for more information"
1645    ;;
1646
1647  *=*)
1648    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1649    # Reject names that are not valid shell variable names.
1650    case $ac_envvar in #(
1651      '' | [0-9]* | *[!_$as_cr_alnum]* )
1652      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1653    esac
1654    eval $ac_envvar=\$ac_optarg
1655    export $ac_envvar ;;
1656
1657  *)
1658    # FIXME: should be removed in autoconf 3.0.
1659    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1660    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1661      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1662    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1663    ;;
1664
1665  esac
1666done
1667
1668if test -n "$ac_prev"; then
1669  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1670  as_fn_error $? "missing argument to $ac_option"
1671fi
1672
1673if test -n "$ac_unrecognized_opts"; then
1674  case $enable_option_checking in
1675    no) ;;
1676    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1677    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1678  esac
1679fi
1680
1681# Check all directory arguments for consistency.
1682for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1683		datadir sysconfdir sharedstatedir localstatedir includedir \
1684		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1685		libdir localedir mandir
1686do
1687  eval ac_val=\$$ac_var
1688  # Remove trailing slashes.
1689  case $ac_val in
1690    */ )
1691      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1692      eval $ac_var=\$ac_val;;
1693  esac
1694  # Be sure to have absolute directory names.
1695  case $ac_val in
1696    [\\/$]* | ?:[\\/]* )  continue;;
1697    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1698  esac
1699  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1700done
1701
1702# There might be people who depend on the old broken behavior: `$host'
1703# used to hold the argument of --host etc.
1704# FIXME: To remove some day.
1705build=$build_alias
1706host=$host_alias
1707target=$target_alias
1708
1709# FIXME: To remove some day.
1710if test "x$host_alias" != x; then
1711  if test "x$build_alias" = x; then
1712    cross_compiling=maybe
1713  elif test "x$build_alias" != "x$host_alias"; then
1714    cross_compiling=yes
1715  fi
1716fi
1717
1718ac_tool_prefix=
1719test -n "$host_alias" && ac_tool_prefix=$host_alias-
1720
1721test "$silent" = yes && exec 6>/dev/null
1722
1723
1724ac_pwd=`pwd` && test -n "$ac_pwd" &&
1725ac_ls_di=`ls -di .` &&
1726ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1727  as_fn_error $? "working directory cannot be determined"
1728test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1729  as_fn_error $? "pwd does not report name of working directory"
1730
1731
1732# Find the source files, if location was not specified.
1733if test -z "$srcdir"; then
1734  ac_srcdir_defaulted=yes
1735  # Try the directory containing this script, then the parent directory.
1736  ac_confdir=`$as_dirname -- "$as_myself" ||
1737$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1738	 X"$as_myself" : 'X\(//\)[^/]' \| \
1739	 X"$as_myself" : 'X\(//\)$' \| \
1740	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1741$as_echo X"$as_myself" |
1742    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1743	    s//\1/
1744	    q
1745	  }
1746	  /^X\(\/\/\)[^/].*/{
1747	    s//\1/
1748	    q
1749	  }
1750	  /^X\(\/\/\)$/{
1751	    s//\1/
1752	    q
1753	  }
1754	  /^X\(\/\).*/{
1755	    s//\1/
1756	    q
1757	  }
1758	  s/.*/./; q'`
1759  srcdir=$ac_confdir
1760  if test ! -r "$srcdir/$ac_unique_file"; then
1761    srcdir=..
1762  fi
1763else
1764  ac_srcdir_defaulted=no
1765fi
1766if test ! -r "$srcdir/$ac_unique_file"; then
1767  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1768  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1769fi
1770ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1771ac_abs_confdir=`(
1772	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1773	pwd)`
1774# When building in place, set srcdir=.
1775if test "$ac_abs_confdir" = "$ac_pwd"; then
1776  srcdir=.
1777fi
1778# Remove unnecessary trailing slashes from srcdir.
1779# Double slashes in file names in object file debugging info
1780# mess up M-x gdb in Emacs.
1781case $srcdir in
1782*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1783esac
1784for ac_var in $ac_precious_vars; do
1785  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1786  eval ac_env_${ac_var}_value=\$${ac_var}
1787  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1788  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1789done
1790
1791#
1792# Report the --help message.
1793#
1794if test "$ac_init_help" = "long"; then
1795  # Omit some internal or obsolete options to make the list less imposing.
1796  # This message is too long to be a string in the A/UX 3.1 sh.
1797  cat <<_ACEOF
1798\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1799
1800Usage: $0 [OPTION]... [VAR=VALUE]...
1801
1802To assign environment variables (e.g., CC, CFLAGS...), specify them as
1803VAR=VALUE.  See below for descriptions of some of the useful variables.
1804
1805Defaults for the options are specified in brackets.
1806
1807Configuration:
1808  -h, --help              display this help and exit
1809      --help=short        display options specific to this package
1810      --help=recursive    display the short help of all the included packages
1811  -V, --version           display version information and exit
1812  -q, --quiet, --silent   do not print \`checking ...' messages
1813      --cache-file=FILE   cache test results in FILE [disabled]
1814  -C, --config-cache      alias for \`--cache-file=config.cache'
1815  -n, --no-create         do not create output files
1816      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1817
1818Installation directories:
1819  --prefix=PREFIX         install architecture-independent files in PREFIX
1820                          [$ac_default_prefix]
1821  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1822                          [PREFIX]
1823
1824By default, \`make install' will install all the files in
1825\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1826an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1827for instance \`--prefix=\$HOME'.
1828
1829For better control, use the options below.
1830
1831Fine tuning of the installation directories:
1832  --bindir=DIR            user executables [EPREFIX/bin]
1833  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1834  --libexecdir=DIR        program executables [EPREFIX/libexec]
1835  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1836  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1837  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1838  --libdir=DIR            object code libraries [EPREFIX/lib]
1839  --includedir=DIR        C header files [PREFIX/include]
1840  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1841  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1842  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1843  --infodir=DIR           info documentation [DATAROOTDIR/info]
1844  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1845  --mandir=DIR            man documentation [DATAROOTDIR/man]
1846  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1847  --htmldir=DIR           html documentation [DOCDIR]
1848  --dvidir=DIR            dvi documentation [DOCDIR]
1849  --pdfdir=DIR            pdf documentation [DOCDIR]
1850  --psdir=DIR             ps documentation [DOCDIR]
1851_ACEOF
1852
1853  cat <<\_ACEOF
1854
1855X features:
1856  --x-includes=DIR    X include files are in DIR
1857  --x-libraries=DIR   X library files are in DIR
1858
1859System types:
1860  --build=BUILD     configure for building on BUILD [guessed]
1861  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1862  --target=TARGET   configure for building compilers for TARGET [HOST]
1863_ACEOF
1864fi
1865
1866if test -n "$ac_init_help"; then
1867  case $ac_init_help in
1868     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1869   esac
1870  cat <<\_ACEOF
1871
1872Optional Features:
1873  --disable-option-checking  ignore unrecognized --enable/--with options
1874  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1875  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1876  --enable-openjdk-only   suppress building custom source even if present
1877                          [disabled]
1878  --enable-debug          set the debug level to fastdebug (shorthand for
1879                          --with-debug-level=fastdebug) [disabled]
1880  --disable-headful       disable building headful support (graphical UI
1881                          support) [enabled]
1882  --enable-hotspot-test-in-build
1883                          run the Queens test after Hotspot build [disabled]
1884  --enable-unlimited-crypto
1885                          Enable unlimited crypto policy [disabled]
1886  --enable-static-build   enable static library build [disabled]
1887  --disable-warnings-as-errors
1888                          do not consider native warnings to be an error
1889                          [enabled]
1890  --disable-debug-symbols disable generation of debug symbols [enabled]
1891  --disable-zip-debug-info
1892                          disable zipping of debug-info files [enabled]
1893  --enable-native-coverage
1894                          enable native compilation with code coverage
1895                          data[disabled]
1896  --disable-freetype-bundling
1897                          disable bundling of the freetype library with the
1898                          build result [enabled on Windows or when using
1899                          --with-freetype, disabled otherwise]
1900  --enable-sjavac         use sjavac to do fast incremental compiles
1901                          [disabled]
1902  --disable-javac-server  disable javac server [enabled]
1903  --enable-icecc          enable distribted compilation of native code using
1904                          icecc/icecream [disabled]
1905  --disable-precompiled-headers
1906                          disable using precompiled headers when compiling C++
1907                          [enabled]
1908  --enable-ccache         enable using ccache to speed up recompilations
1909                          [disabled]
1910
1911Optional Packages:
1912  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1913  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1914  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1915                          support it), e.g. --with-target-bits=32 [guessed]
1916  --with-custom-make-dir  Deprecated. Option is kept for backwards
1917                          compatibility and is ignored
1918  --with-jdk-variant      JDK variant to build (normal) [normal]
1919  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1920  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1921                          client, minimal1, kernel, zero, zeroshark, core)
1922                          [server]
1923  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1924                          optimized (HotSpot build only)) [release]
1925  --with-devkit           use this devkit for compilers, tools and resources
1926  --with-sys-root         alias for --with-sysroot for backwards compatability
1927  --with-sysroot          use this directory as sysroot
1928  --with-tools-dir        alias for --with-toolchain-path for backwards
1929                          compatibility
1930  --with-toolchain-path   prepend these directories when searching for
1931                          toolchain binaries (compilers etc)
1932  --with-extra-path       prepend these directories to the default path
1933  --with-sdk-name         use the platform SDK of the given name. [macosx]
1934  --with-conf-name        use this as the name of the configuration [generated
1935                          from important configuration options]
1936  --with-output-sync      set make output sync type if supported by make.
1937                          [recurse]
1938  --with-default-make-target
1939                          set the default make target [exploded-image]
1940  --with-cacerts-file     specify alternative cacerts file
1941  --with-copyright-year   Set copyright year value for build [current year]
1942  --with-milestone        Deprecated. Option is kept for backwards
1943                          compatibility and is ignored
1944  --with-update-version   Deprecated. Option is kept for backwards
1945                          compatibility and is ignored
1946  --with-user-release-suffix
1947                          Deprecated. Option is kept for backwards
1948                          compatibility and is ignored
1949  --with-build-number     Deprecated. Option is kept for backwards
1950                          compatibility and is ignored
1951  --with-version-string   Set version string [calculated]
1952  --with-version-pre      Set the base part of the version 'PRE' field
1953                          (pre-release identifier) ['internal']
1954  --with-version-opt      Set version 'OPT' field (build metadata)
1955                          [<timestamp>.<user>.<dirname>]
1956  --with-version-build    Set version 'BUILD' field (build number) [not
1957                          specified]
1958  --with-version-major    Set version 'MAJOR' field (first number) [current
1959                          source value]
1960  --with-version-minor    Set version 'MINOR' field (second number) [current
1961                          source value]
1962  --with-version-security Set version 'SECURITY' field (third number) [current
1963                          source value]
1964  --with-version-patch    Set version 'PATCH' field (fourth number) [not
1965                          specified]
1966  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1967  --with-add-source-root  Deprecated. Option is kept for backwards
1968                          compatibility and is ignored
1969  --with-override-source-root
1970                          Deprecated. Option is kept for backwards
1971                          compatibility and is ignored
1972  --with-adds-and-overrides
1973                          Deprecated. Option is kept for backwards
1974                          compatibility and is ignored
1975  --with-override-langtools
1976                          Deprecated. Option is kept for backwards
1977                          compatibility and is ignored
1978  --with-override-corba   Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --with-override-jaxp    Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --with-override-jaxws   Deprecated. Option is kept for backwards
1983                          compatibility and is ignored
1984  --with-override-hotspot Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --with-override-nashorn Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --with-override-jdk     Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-import-hotspot   import hotspot binaries from this jdk image or
1991                          hotspot build dist dir instead of building from
1992                          source
1993  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1994                          to show possible values [platform dependent]
1995  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1996  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1997  --with-extra-ldflags    extra flags to be used when linking jdk
1998  --with-toolchain-version
1999                          the version of the toolchain to look for, use
2000                          '--help' to show possible values [platform
2001                          dependent]
2002  --with-build-devkit     Devkit to use for the build platform toolchain
2003  --with-jtreg            Regression Test Harness [probed]
2004  --with-stdc++lib=<static>,<dynamic>,<default>
2005                          force linking of the C++ runtime on Linux to either
2006                          static or dynamic, default is static with dynamic as
2007                          fallback
2008  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2009                          (Windows only) [probed]
2010  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2011                          (Windows only) [probed]
2012  --with-x                use the X Window System
2013  --with-cups             specify prefix directory for the cups package
2014                          (expecting the headers under PATH/include)
2015  --with-cups-include     specify directory for the cups include files
2016  --with-freetype         specify prefix directory for the freetype package
2017                          (expecting the libraries under PATH/lib and the
2018                          headers under PATH/include)
2019  --with-freetype-include specify directory for the freetype include files
2020  --with-freetype-lib     specify directory for the freetype library
2021  --with-freetype-src     specify directory with freetype sources to
2022                          automatically build the library (experimental,
2023                          Windows-only)
2024  --with-alsa             specify prefix directory for the alsa package
2025                          (expecting the libraries under PATH/lib and the
2026                          headers under PATH/include)
2027  --with-alsa-include     specify directory for the alsa include files
2028  --with-alsa-lib         specify directory for the alsa library
2029  --with-libffi           specify prefix directory for the libffi package
2030                          (expecting the libraries under PATH/lib and the
2031                          headers under PATH/include)
2032  --with-libffi-include   specify directory for the libffi include files
2033  --with-libffi-lib       specify directory for the libffi library
2034  --with-libjpeg          use libjpeg from build system or OpenJDK source
2035                          (system, bundled) [bundled]
2036  --with-giflib           use giflib from build system or OpenJDK source
2037                          (system, bundled) [bundled]
2038  --with-libpng           use libpng from build system or OpenJDK source
2039                          (system, bundled) [bundled]
2040  --with-zlib             use zlib from build system or OpenJDK source
2041                          (system, bundled) [bundled]
2042  --with-lcms             use lcms2 from build system or OpenJDK source
2043                          (system, bundled) [bundled]
2044  --with-dxsdk            Deprecated. Option is kept for backwards
2045                          compatibility and is ignored
2046  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2047                          compatibility and is ignored
2048  --with-dxsdk-include    Deprecated. Option is kept for backwards
2049                          compatibility and is ignored
2050  --with-num-cores        number of cores in the build system, e.g.
2051                          --with-num-cores=8 [probed]
2052  --with-memory-size      memory (in MB) available in the build system, e.g.
2053                          --with-memory-size=1024 [probed]
2054  --with-jobs             number of parallel jobs to let make run [calculated
2055                          based on cores and memory]
2056  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2057                          invocations of boot JDK, overriding the default
2058                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2059                          -enableassertions"
2060  --with-sjavac-server-java
2061                          use this java binary for running the sjavac
2062                          background server [Boot JDK java]
2063  --with-ccache-dir       where to store ccache files [~/.ccache]
2064
2065Some influential environment variables:
2066  BASENAME    Override default value for BASENAME
2067  BASH        Override default value for BASH
2068  CAT         Override default value for CAT
2069  CHMOD       Override default value for CHMOD
2070  CMP         Override default value for CMP
2071  COMM        Override default value for COMM
2072  CP          Override default value for CP
2073  CUT         Override default value for CUT
2074  DATE        Override default value for DATE
2075  DIFF        Override default value for DIFF
2076  DIRNAME     Override default value for DIRNAME
2077  ECHO        Override default value for ECHO
2078  EXPR        Override default value for EXPR
2079  FILE        Override default value for FILE
2080  FIND        Override default value for FIND
2081  HEAD        Override default value for HEAD
2082  LN          Override default value for LN
2083  LS          Override default value for LS
2084  MKDIR       Override default value for MKDIR
2085  MKTEMP      Override default value for MKTEMP
2086  MV          Override default value for MV
2087  NAWK        Override default value for NAWK
2088  PRINTF      Override default value for PRINTF
2089  RM          Override default value for RM
2090  RMDIR       Override default value for RMDIR
2091  SH          Override default value for SH
2092  SORT        Override default value for SORT
2093  TAIL        Override default value for TAIL
2094  TAR         Override default value for TAR
2095  TEE         Override default value for TEE
2096  TOUCH       Override default value for TOUCH
2097  TR          Override default value for TR
2098  UNAME       Override default value for UNAME
2099  UNIQ        Override default value for UNIQ
2100  WC          Override default value for WC
2101  WHICH       Override default value for WHICH
2102  XARGS       Override default value for XARGS
2103  AWK         Override default value for AWK
2104  GREP        Override default value for GREP
2105  EGREP       Override default value for EGREP
2106  FGREP       Override default value for FGREP
2107  SED         Override default value for SED
2108  CYGPATH     Override default value for CYGPATH
2109  READLINK    Override default value for READLINK
2110  DF          Override default value for DF
2111  CPIO        Override default value for CPIO
2112  NICE        Override default value for NICE
2113  MAKE        Override default value for MAKE
2114  UNZIP       Override default value for UNZIP
2115  ZIP         Override default value for ZIP
2116  LDD         Override default value for LDD
2117  OTOOL       Override default value for OTOOL
2118  READELF     Override default value for READELF
2119  HG          Override default value for HG
2120  STAT        Override default value for STAT
2121  TIME        Override default value for TIME
2122  PATCH       Override default value for PATCH
2123  DSYMUTIL    Override default value for DSYMUTIL
2124  XATTR       Override default value for XATTR
2125  CODESIGN    Override default value for CODESIGN
2126  SETFILE     Override default value for SETFILE
2127  PKG_CONFIG  path to pkg-config utility
2128  JAVA        Override default value for JAVA
2129  JAVAC       Override default value for JAVAC
2130  JAVAH       Override default value for JAVAH
2131  JAR         Override default value for JAR
2132  JARSIGNER   Override default value for JARSIGNER
2133  CC          C compiler command
2134  CFLAGS      C compiler flags
2135  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2136              nonstandard directory <lib dir>
2137  LIBS        libraries to pass to the linker, e.g. -l<library>
2138  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2139              you have headers in a nonstandard directory <include dir>
2140  CXX         C++ compiler command
2141  CXXFLAGS    C++ compiler flags
2142  CPP         C preprocessor
2143  CXXCPP      C++ preprocessor
2144  AS          Override default value for AS
2145  AR          Override default value for AR
2146  LIPO        Override default value for LIPO
2147  STRIP       Override default value for STRIP
2148  NM          Override default value for NM
2149  GNM         Override default value for GNM
2150  OBJCOPY     Override default value for OBJCOPY
2151  OBJDUMP     Override default value for OBJDUMP
2152  BUILD_CC    Override default value for BUILD_CC
2153  BUILD_CXX   Override default value for BUILD_CXX
2154  BUILD_NM    Override default value for BUILD_NM
2155  BUILD_AR    Override default value for BUILD_AR
2156  JTREGEXE    Override default value for JTREGEXE
2157  XMKMF       Path to xmkmf, Makefile generator for X Window System
2158  FREETYPE_CFLAGS
2159              C compiler flags for FREETYPE, overriding pkg-config
2160  FREETYPE_LIBS
2161              linker flags for FREETYPE, overriding pkg-config
2162  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2163  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2164  LIBFFI_CFLAGS
2165              C compiler flags for LIBFFI, overriding pkg-config
2166  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2167  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2168  PNG_LIBS    linker flags for PNG, overriding pkg-config
2169  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2170  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2171  ICECC_CMD   Override default value for ICECC_CMD
2172  ICECC_CREATE_ENV
2173              Override default value for ICECC_CREATE_ENV
2174  ICECC_WRAPPER
2175              Override default value for ICECC_WRAPPER
2176  CCACHE      Override default value for CCACHE
2177
2178Use these variables to override the choices made by `configure' or to help
2179it to find libraries and programs with nonstandard names/locations.
2180
2181Report bugs to <build-dev@openjdk.java.net>.
2182OpenJDK home page: <http://openjdk.java.net>.
2183_ACEOF
2184ac_status=$?
2185fi
2186
2187if test "$ac_init_help" = "recursive"; then
2188  # If there are subdirs, report their specific --help.
2189  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2190    test -d "$ac_dir" ||
2191      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2192      continue
2193    ac_builddir=.
2194
2195case "$ac_dir" in
2196.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2197*)
2198  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2199  # A ".." for each directory in $ac_dir_suffix.
2200  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2201  case $ac_top_builddir_sub in
2202  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2203  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2204  esac ;;
2205esac
2206ac_abs_top_builddir=$ac_pwd
2207ac_abs_builddir=$ac_pwd$ac_dir_suffix
2208# for backward compatibility:
2209ac_top_builddir=$ac_top_build_prefix
2210
2211case $srcdir in
2212  .)  # We are building in place.
2213    ac_srcdir=.
2214    ac_top_srcdir=$ac_top_builddir_sub
2215    ac_abs_top_srcdir=$ac_pwd ;;
2216  [\\/]* | ?:[\\/]* )  # Absolute name.
2217    ac_srcdir=$srcdir$ac_dir_suffix;
2218    ac_top_srcdir=$srcdir
2219    ac_abs_top_srcdir=$srcdir ;;
2220  *) # Relative name.
2221    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2222    ac_top_srcdir=$ac_top_build_prefix$srcdir
2223    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2224esac
2225ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2226
2227    cd "$ac_dir" || { ac_status=$?; continue; }
2228    # Check for guested configure.
2229    if test -f "$ac_srcdir/configure.gnu"; then
2230      echo &&
2231      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2232    elif test -f "$ac_srcdir/configure"; then
2233      echo &&
2234      $SHELL "$ac_srcdir/configure" --help=recursive
2235    else
2236      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2237    fi || ac_status=$?
2238    cd "$ac_pwd" || { ac_status=$?; break; }
2239  done
2240fi
2241
2242test -n "$ac_init_help" && exit $ac_status
2243if $ac_init_version; then
2244  cat <<\_ACEOF
2245OpenJDK configure jdk9
2246generated by GNU Autoconf 2.69
2247
2248Copyright (C) 2012 Free Software Foundation, Inc.
2249This configure script is free software; the Free Software Foundation
2250gives unlimited permission to copy, distribute and modify it.
2251_ACEOF
2252  exit
2253fi
2254
2255## ------------------------ ##
2256## Autoconf initialization. ##
2257## ------------------------ ##
2258
2259# ac_fn_c_try_compile LINENO
2260# --------------------------
2261# Try to compile conftest.$ac_ext, and return whether this succeeded.
2262ac_fn_c_try_compile ()
2263{
2264  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2265  rm -f conftest.$ac_objext
2266  if { { ac_try="$ac_compile"
2267case "(($ac_try" in
2268  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2269  *) ac_try_echo=$ac_try;;
2270esac
2271eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2272$as_echo "$ac_try_echo"; } >&5
2273  (eval "$ac_compile") 2>conftest.err
2274  ac_status=$?
2275  if test -s conftest.err; then
2276    grep -v '^ *+' conftest.err >conftest.er1
2277    cat conftest.er1 >&5
2278    mv -f conftest.er1 conftest.err
2279  fi
2280  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2281  test $ac_status = 0; } && {
2282	 test -z "$ac_c_werror_flag" ||
2283	 test ! -s conftest.err
2284       } && test -s conftest.$ac_objext; then :
2285  ac_retval=0
2286else
2287  $as_echo "$as_me: failed program was:" >&5
2288sed 's/^/| /' conftest.$ac_ext >&5
2289
2290	ac_retval=1
2291fi
2292  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2293  as_fn_set_status $ac_retval
2294
2295} # ac_fn_c_try_compile
2296
2297# ac_fn_cxx_try_compile LINENO
2298# ----------------------------
2299# Try to compile conftest.$ac_ext, and return whether this succeeded.
2300ac_fn_cxx_try_compile ()
2301{
2302  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2303  rm -f conftest.$ac_objext
2304  if { { ac_try="$ac_compile"
2305case "(($ac_try" in
2306  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2307  *) ac_try_echo=$ac_try;;
2308esac
2309eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2310$as_echo "$ac_try_echo"; } >&5
2311  (eval "$ac_compile") 2>conftest.err
2312  ac_status=$?
2313  if test -s conftest.err; then
2314    grep -v '^ *+' conftest.err >conftest.er1
2315    cat conftest.er1 >&5
2316    mv -f conftest.er1 conftest.err
2317  fi
2318  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2319  test $ac_status = 0; } && {
2320	 test -z "$ac_cxx_werror_flag" ||
2321	 test ! -s conftest.err
2322       } && test -s conftest.$ac_objext; then :
2323  ac_retval=0
2324else
2325  $as_echo "$as_me: failed program was:" >&5
2326sed 's/^/| /' conftest.$ac_ext >&5
2327
2328	ac_retval=1
2329fi
2330  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2331  as_fn_set_status $ac_retval
2332
2333} # ac_fn_cxx_try_compile
2334
2335# ac_fn_c_try_cpp LINENO
2336# ----------------------
2337# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2338ac_fn_c_try_cpp ()
2339{
2340  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2341  if { { ac_try="$ac_cpp conftest.$ac_ext"
2342case "(($ac_try" in
2343  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2344  *) ac_try_echo=$ac_try;;
2345esac
2346eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2347$as_echo "$ac_try_echo"; } >&5
2348  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2349  ac_status=$?
2350  if test -s conftest.err; then
2351    grep -v '^ *+' conftest.err >conftest.er1
2352    cat conftest.er1 >&5
2353    mv -f conftest.er1 conftest.err
2354  fi
2355  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2356  test $ac_status = 0; } > conftest.i && {
2357	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2358	 test ! -s conftest.err
2359       }; then :
2360  ac_retval=0
2361else
2362  $as_echo "$as_me: failed program was:" >&5
2363sed 's/^/| /' conftest.$ac_ext >&5
2364
2365    ac_retval=1
2366fi
2367  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2368  as_fn_set_status $ac_retval
2369
2370} # ac_fn_c_try_cpp
2371
2372# ac_fn_cxx_try_cpp LINENO
2373# ------------------------
2374# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2375ac_fn_cxx_try_cpp ()
2376{
2377  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2378  if { { ac_try="$ac_cpp conftest.$ac_ext"
2379case "(($ac_try" in
2380  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2381  *) ac_try_echo=$ac_try;;
2382esac
2383eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2384$as_echo "$ac_try_echo"; } >&5
2385  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2386  ac_status=$?
2387  if test -s conftest.err; then
2388    grep -v '^ *+' conftest.err >conftest.er1
2389    cat conftest.er1 >&5
2390    mv -f conftest.er1 conftest.err
2391  fi
2392  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2393  test $ac_status = 0; } > conftest.i && {
2394	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2395	 test ! -s conftest.err
2396       }; then :
2397  ac_retval=0
2398else
2399  $as_echo "$as_me: failed program was:" >&5
2400sed 's/^/| /' conftest.$ac_ext >&5
2401
2402    ac_retval=1
2403fi
2404  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2405  as_fn_set_status $ac_retval
2406
2407} # ac_fn_cxx_try_cpp
2408
2409# ac_fn_c_try_link LINENO
2410# -----------------------
2411# Try to link conftest.$ac_ext, and return whether this succeeded.
2412ac_fn_c_try_link ()
2413{
2414  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2415  rm -f conftest.$ac_objext conftest$ac_exeext
2416  if { { ac_try="$ac_link"
2417case "(($ac_try" in
2418  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2419  *) ac_try_echo=$ac_try;;
2420esac
2421eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2422$as_echo "$ac_try_echo"; } >&5
2423  (eval "$ac_link") 2>conftest.err
2424  ac_status=$?
2425  if test -s conftest.err; then
2426    grep -v '^ *+' conftest.err >conftest.er1
2427    cat conftest.er1 >&5
2428    mv -f conftest.er1 conftest.err
2429  fi
2430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2431  test $ac_status = 0; } && {
2432	 test -z "$ac_c_werror_flag" ||
2433	 test ! -s conftest.err
2434       } && test -s conftest$ac_exeext && {
2435	 test "$cross_compiling" = yes ||
2436	 test -x conftest$ac_exeext
2437       }; then :
2438  ac_retval=0
2439else
2440  $as_echo "$as_me: failed program was:" >&5
2441sed 's/^/| /' conftest.$ac_ext >&5
2442
2443	ac_retval=1
2444fi
2445  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2446  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2447  # interfere with the next link command; also delete a directory that is
2448  # left behind by Apple's compiler.  We do this before executing the actions.
2449  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2450  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2451  as_fn_set_status $ac_retval
2452
2453} # ac_fn_c_try_link
2454
2455# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2456# ---------------------------------------------------------
2457# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2458# the include files in INCLUDES and setting the cache variable VAR
2459# accordingly.
2460ac_fn_cxx_check_header_mongrel ()
2461{
2462  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2463  if eval \${$3+:} false; then :
2464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2465$as_echo_n "checking for $2... " >&6; }
2466if eval \${$3+:} false; then :
2467  $as_echo_n "(cached) " >&6
2468fi
2469eval ac_res=\$$3
2470	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2471$as_echo "$ac_res" >&6; }
2472else
2473  # Is the header compilable?
2474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2475$as_echo_n "checking $2 usability... " >&6; }
2476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2477/* end confdefs.h.  */
2478$4
2479#include <$2>
2480_ACEOF
2481if ac_fn_cxx_try_compile "$LINENO"; then :
2482  ac_header_compiler=yes
2483else
2484  ac_header_compiler=no
2485fi
2486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2488$as_echo "$ac_header_compiler" >&6; }
2489
2490# Is the header present?
2491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2492$as_echo_n "checking $2 presence... " >&6; }
2493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2494/* end confdefs.h.  */
2495#include <$2>
2496_ACEOF
2497if ac_fn_cxx_try_cpp "$LINENO"; then :
2498  ac_header_preproc=yes
2499else
2500  ac_header_preproc=no
2501fi
2502rm -f conftest.err conftest.i conftest.$ac_ext
2503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2504$as_echo "$ac_header_preproc" >&6; }
2505
2506# So?  What about this header?
2507case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2508  yes:no: )
2509    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2510$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2511    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2512$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2513    ;;
2514  no:yes:* )
2515    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2516$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2517    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2518$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2519    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2520$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2521    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2522$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2523    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2524$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2525( $as_echo "## ----------------------------------------- ##
2526## Report this to build-dev@openjdk.java.net ##
2527## ----------------------------------------- ##"
2528     ) | sed "s/^/$as_me: WARNING:     /" >&2
2529    ;;
2530esac
2531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2532$as_echo_n "checking for $2... " >&6; }
2533if eval \${$3+:} false; then :
2534  $as_echo_n "(cached) " >&6
2535else
2536  eval "$3=\$ac_header_compiler"
2537fi
2538eval ac_res=\$$3
2539	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2540$as_echo "$ac_res" >&6; }
2541fi
2542  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2543
2544} # ac_fn_cxx_check_header_mongrel
2545
2546# ac_fn_cxx_try_run LINENO
2547# ------------------------
2548# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2549# that executables *can* be run.
2550ac_fn_cxx_try_run ()
2551{
2552  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2553  if { { ac_try="$ac_link"
2554case "(($ac_try" in
2555  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2556  *) ac_try_echo=$ac_try;;
2557esac
2558eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2559$as_echo "$ac_try_echo"; } >&5
2560  (eval "$ac_link") 2>&5
2561  ac_status=$?
2562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2563  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2564  { { case "(($ac_try" in
2565  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2566  *) ac_try_echo=$ac_try;;
2567esac
2568eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2569$as_echo "$ac_try_echo"; } >&5
2570  (eval "$ac_try") 2>&5
2571  ac_status=$?
2572  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2573  test $ac_status = 0; }; }; then :
2574  ac_retval=0
2575else
2576  $as_echo "$as_me: program exited with status $ac_status" >&5
2577       $as_echo "$as_me: failed program was:" >&5
2578sed 's/^/| /' conftest.$ac_ext >&5
2579
2580       ac_retval=$ac_status
2581fi
2582  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2583  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2584  as_fn_set_status $ac_retval
2585
2586} # ac_fn_cxx_try_run
2587
2588# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2589# ---------------------------------------------------------
2590# Tests whether HEADER exists and can be compiled using the include files in
2591# INCLUDES, setting the cache variable VAR accordingly.
2592ac_fn_cxx_check_header_compile ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2596$as_echo_n "checking for $2... " >&6; }
2597if eval \${$3+:} false; then :
2598  $as_echo_n "(cached) " >&6
2599else
2600  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2601/* end confdefs.h.  */
2602$4
2603#include <$2>
2604_ACEOF
2605if ac_fn_cxx_try_compile "$LINENO"; then :
2606  eval "$3=yes"
2607else
2608  eval "$3=no"
2609fi
2610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611fi
2612eval ac_res=\$$3
2613	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2614$as_echo "$ac_res" >&6; }
2615  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2616
2617} # ac_fn_cxx_check_header_compile
2618
2619# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2620# ----------------------------------------------
2621# Tries to find the compile-time value of EXPR in a program that includes
2622# INCLUDES, setting VAR accordingly. Returns whether the value could be
2623# computed
2624ac_fn_cxx_compute_int ()
2625{
2626  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2627  if test "$cross_compiling" = yes; then
2628    # Depending upon the size, compute the lo and hi bounds.
2629cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2630/* end confdefs.h.  */
2631$4
2632int
2633main ()
2634{
2635static int test_array [1 - 2 * !(($2) >= 0)];
2636test_array [0] = 0;
2637return test_array [0];
2638
2639  ;
2640  return 0;
2641}
2642_ACEOF
2643if ac_fn_cxx_try_compile "$LINENO"; then :
2644  ac_lo=0 ac_mid=0
2645  while :; do
2646    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2647/* end confdefs.h.  */
2648$4
2649int
2650main ()
2651{
2652static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2653test_array [0] = 0;
2654return test_array [0];
2655
2656  ;
2657  return 0;
2658}
2659_ACEOF
2660if ac_fn_cxx_try_compile "$LINENO"; then :
2661  ac_hi=$ac_mid; break
2662else
2663  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2664			if test $ac_lo -le $ac_mid; then
2665			  ac_lo= ac_hi=
2666			  break
2667			fi
2668			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2669fi
2670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2671  done
2672else
2673  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2674/* end confdefs.h.  */
2675$4
2676int
2677main ()
2678{
2679static int test_array [1 - 2 * !(($2) < 0)];
2680test_array [0] = 0;
2681return test_array [0];
2682
2683  ;
2684  return 0;
2685}
2686_ACEOF
2687if ac_fn_cxx_try_compile "$LINENO"; then :
2688  ac_hi=-1 ac_mid=-1
2689  while :; do
2690    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2691/* end confdefs.h.  */
2692$4
2693int
2694main ()
2695{
2696static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2697test_array [0] = 0;
2698return test_array [0];
2699
2700  ;
2701  return 0;
2702}
2703_ACEOF
2704if ac_fn_cxx_try_compile "$LINENO"; then :
2705  ac_lo=$ac_mid; break
2706else
2707  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2708			if test $ac_mid -le $ac_hi; then
2709			  ac_lo= ac_hi=
2710			  break
2711			fi
2712			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2713fi
2714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2715  done
2716else
2717  ac_lo= ac_hi=
2718fi
2719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2720fi
2721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2722# Binary search between lo and hi bounds.
2723while test "x$ac_lo" != "x$ac_hi"; do
2724  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2726/* end confdefs.h.  */
2727$4
2728int
2729main ()
2730{
2731static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2732test_array [0] = 0;
2733return test_array [0];
2734
2735  ;
2736  return 0;
2737}
2738_ACEOF
2739if ac_fn_cxx_try_compile "$LINENO"; then :
2740  ac_hi=$ac_mid
2741else
2742  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2743fi
2744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2745done
2746case $ac_lo in #((
2747?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2748'') ac_retval=1 ;;
2749esac
2750  else
2751    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2752/* end confdefs.h.  */
2753$4
2754static long int longval () { return $2; }
2755static unsigned long int ulongval () { return $2; }
2756#include <stdio.h>
2757#include <stdlib.h>
2758int
2759main ()
2760{
2761
2762  FILE *f = fopen ("conftest.val", "w");
2763  if (! f)
2764    return 1;
2765  if (($2) < 0)
2766    {
2767      long int i = longval ();
2768      if (i != ($2))
2769	return 1;
2770      fprintf (f, "%ld", i);
2771    }
2772  else
2773    {
2774      unsigned long int i = ulongval ();
2775      if (i != ($2))
2776	return 1;
2777      fprintf (f, "%lu", i);
2778    }
2779  /* Do not output a trailing newline, as this causes \r\n confusion
2780     on some platforms.  */
2781  return ferror (f) || fclose (f) != 0;
2782
2783  ;
2784  return 0;
2785}
2786_ACEOF
2787if ac_fn_cxx_try_run "$LINENO"; then :
2788  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2789else
2790  ac_retval=1
2791fi
2792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2793  conftest.$ac_objext conftest.beam conftest.$ac_ext
2794rm -f conftest.val
2795
2796  fi
2797  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2798  as_fn_set_status $ac_retval
2799
2800} # ac_fn_cxx_compute_int
2801
2802# ac_fn_cxx_try_link LINENO
2803# -------------------------
2804# Try to link conftest.$ac_ext, and return whether this succeeded.
2805ac_fn_cxx_try_link ()
2806{
2807  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2808  rm -f conftest.$ac_objext conftest$ac_exeext
2809  if { { ac_try="$ac_link"
2810case "(($ac_try" in
2811  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2812  *) ac_try_echo=$ac_try;;
2813esac
2814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2815$as_echo "$ac_try_echo"; } >&5
2816  (eval "$ac_link") 2>conftest.err
2817  ac_status=$?
2818  if test -s conftest.err; then
2819    grep -v '^ *+' conftest.err >conftest.er1
2820    cat conftest.er1 >&5
2821    mv -f conftest.er1 conftest.err
2822  fi
2823  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2824  test $ac_status = 0; } && {
2825	 test -z "$ac_cxx_werror_flag" ||
2826	 test ! -s conftest.err
2827       } && test -s conftest$ac_exeext && {
2828	 test "$cross_compiling" = yes ||
2829	 test -x conftest$ac_exeext
2830       }; then :
2831  ac_retval=0
2832else
2833  $as_echo "$as_me: failed program was:" >&5
2834sed 's/^/| /' conftest.$ac_ext >&5
2835
2836	ac_retval=1
2837fi
2838  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2839  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2840  # interfere with the next link command; also delete a directory that is
2841  # left behind by Apple's compiler.  We do this before executing the actions.
2842  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2843  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2844  as_fn_set_status $ac_retval
2845
2846} # ac_fn_cxx_try_link
2847
2848# ac_fn_cxx_check_func LINENO FUNC VAR
2849# ------------------------------------
2850# Tests whether FUNC exists, setting the cache variable VAR accordingly
2851ac_fn_cxx_check_func ()
2852{
2853  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2854  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2855$as_echo_n "checking for $2... " >&6; }
2856if eval \${$3+:} false; then :
2857  $as_echo_n "(cached) " >&6
2858else
2859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2860/* end confdefs.h.  */
2861/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2862   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2863#define $2 innocuous_$2
2864
2865/* System header to define __stub macros and hopefully few prototypes,
2866    which can conflict with char $2 (); below.
2867    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2868    <limits.h> exists even on freestanding compilers.  */
2869
2870#ifdef __STDC__
2871# include <limits.h>
2872#else
2873# include <assert.h>
2874#endif
2875
2876#undef $2
2877
2878/* Override any GCC internal prototype to avoid an error.
2879   Use char because int might match the return type of a GCC
2880   builtin and then its argument prototype would still apply.  */
2881#ifdef __cplusplus
2882extern "C"
2883#endif
2884char $2 ();
2885/* The GNU C library defines this for functions which it implements
2886    to always fail with ENOSYS.  Some functions are actually named
2887    something starting with __ and the normal name is an alias.  */
2888#if defined __stub_$2 || defined __stub___$2
2889choke me
2890#endif
2891
2892int
2893main ()
2894{
2895return $2 ();
2896  ;
2897  return 0;
2898}
2899_ACEOF
2900if ac_fn_cxx_try_link "$LINENO"; then :
2901  eval "$3=yes"
2902else
2903  eval "$3=no"
2904fi
2905rm -f core conftest.err conftest.$ac_objext \
2906    conftest$ac_exeext conftest.$ac_ext
2907fi
2908eval ac_res=\$$3
2909	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2910$as_echo "$ac_res" >&6; }
2911  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2912
2913} # ac_fn_cxx_check_func
2914
2915# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2916# -------------------------------------------------------
2917# Tests whether HEADER exists and can be compiled using the include files in
2918# INCLUDES, setting the cache variable VAR accordingly.
2919ac_fn_c_check_header_compile ()
2920{
2921  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2922  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2923$as_echo_n "checking for $2... " >&6; }
2924if eval \${$3+:} false; then :
2925  $as_echo_n "(cached) " >&6
2926else
2927  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2928/* end confdefs.h.  */
2929$4
2930#include <$2>
2931_ACEOF
2932if ac_fn_c_try_compile "$LINENO"; then :
2933  eval "$3=yes"
2934else
2935  eval "$3=no"
2936fi
2937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2938fi
2939eval ac_res=\$$3
2940	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2941$as_echo "$ac_res" >&6; }
2942  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2943
2944} # ac_fn_c_check_header_compile
2945cat >config.log <<_ACEOF
2946This file contains any messages produced by compilers while
2947running configure, to aid debugging if configure makes a mistake.
2948
2949It was created by OpenJDK $as_me jdk9, which was
2950generated by GNU Autoconf 2.69.  Invocation command line was
2951
2952  $ $0 $@
2953
2954_ACEOF
2955exec 5>>config.log
2956{
2957cat <<_ASUNAME
2958## --------- ##
2959## Platform. ##
2960## --------- ##
2961
2962hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2963uname -m = `(uname -m) 2>/dev/null || echo unknown`
2964uname -r = `(uname -r) 2>/dev/null || echo unknown`
2965uname -s = `(uname -s) 2>/dev/null || echo unknown`
2966uname -v = `(uname -v) 2>/dev/null || echo unknown`
2967
2968/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2969/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2970
2971/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2972/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2973/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2974/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2975/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2976/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2977/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2978
2979_ASUNAME
2980
2981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2982for as_dir in $PATH
2983do
2984  IFS=$as_save_IFS
2985  test -z "$as_dir" && as_dir=.
2986    $as_echo "PATH: $as_dir"
2987  done
2988IFS=$as_save_IFS
2989
2990} >&5
2991
2992cat >&5 <<_ACEOF
2993
2994
2995## ----------- ##
2996## Core tests. ##
2997## ----------- ##
2998
2999_ACEOF
3000
3001
3002# Keep a trace of the command line.
3003# Strip out --no-create and --no-recursion so they do not pile up.
3004# Strip out --silent because we don't want to record it for future runs.
3005# Also quote any args containing shell meta-characters.
3006# Make two passes to allow for proper duplicate-argument suppression.
3007ac_configure_args=
3008ac_configure_args0=
3009ac_configure_args1=
3010ac_must_keep_next=false
3011for ac_pass in 1 2
3012do
3013  for ac_arg
3014  do
3015    case $ac_arg in
3016    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3017    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3018    | -silent | --silent | --silen | --sile | --sil)
3019      continue ;;
3020    *\'*)
3021      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3022    esac
3023    case $ac_pass in
3024    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3025    2)
3026      as_fn_append ac_configure_args1 " '$ac_arg'"
3027      if test $ac_must_keep_next = true; then
3028	ac_must_keep_next=false # Got value, back to normal.
3029      else
3030	case $ac_arg in
3031	  *=* | --config-cache | -C | -disable-* | --disable-* \
3032	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3033	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3034	  | -with-* | --with-* | -without-* | --without-* | --x)
3035	    case "$ac_configure_args0 " in
3036	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3037	    esac
3038	    ;;
3039	  -* ) ac_must_keep_next=true ;;
3040	esac
3041      fi
3042      as_fn_append ac_configure_args " '$ac_arg'"
3043      ;;
3044    esac
3045  done
3046done
3047{ ac_configure_args0=; unset ac_configure_args0;}
3048{ ac_configure_args1=; unset ac_configure_args1;}
3049
3050# When interrupted or exit'd, cleanup temporary files, and complete
3051# config.log.  We remove comments because anyway the quotes in there
3052# would cause problems or look ugly.
3053# WARNING: Use '\'' to represent an apostrophe within the trap.
3054# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3055trap 'exit_status=$?
3056  # Save into config.log some information that might help in debugging.
3057  {
3058    echo
3059
3060    $as_echo "## ---------------- ##
3061## Cache variables. ##
3062## ---------------- ##"
3063    echo
3064    # The following way of writing the cache mishandles newlines in values,
3065(
3066  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3067    eval ac_val=\$$ac_var
3068    case $ac_val in #(
3069    *${as_nl}*)
3070      case $ac_var in #(
3071      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3072$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3073      esac
3074      case $ac_var in #(
3075      _ | IFS | as_nl) ;; #(
3076      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3077      *) { eval $ac_var=; unset $ac_var;} ;;
3078      esac ;;
3079    esac
3080  done
3081  (set) 2>&1 |
3082    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3083    *${as_nl}ac_space=\ *)
3084      sed -n \
3085	"s/'\''/'\''\\\\'\'''\''/g;
3086	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3087      ;; #(
3088    *)
3089      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3090      ;;
3091    esac |
3092    sort
3093)
3094    echo
3095
3096    $as_echo "## ----------------- ##
3097## Output variables. ##
3098## ----------------- ##"
3099    echo
3100    for ac_var in $ac_subst_vars
3101    do
3102      eval ac_val=\$$ac_var
3103      case $ac_val in
3104      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3105      esac
3106      $as_echo "$ac_var='\''$ac_val'\''"
3107    done | sort
3108    echo
3109
3110    if test -n "$ac_subst_files"; then
3111      $as_echo "## ------------------- ##
3112## File substitutions. ##
3113## ------------------- ##"
3114      echo
3115      for ac_var in $ac_subst_files
3116      do
3117	eval ac_val=\$$ac_var
3118	case $ac_val in
3119	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3120	esac
3121	$as_echo "$ac_var='\''$ac_val'\''"
3122      done | sort
3123      echo
3124    fi
3125
3126    if test -s confdefs.h; then
3127      $as_echo "## ----------- ##
3128## confdefs.h. ##
3129## ----------- ##"
3130      echo
3131      cat confdefs.h
3132      echo
3133    fi
3134    test "$ac_signal" != 0 &&
3135      $as_echo "$as_me: caught signal $ac_signal"
3136    $as_echo "$as_me: exit $exit_status"
3137  } >&5
3138  rm -f core *.core core.conftest.* &&
3139    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3140    exit $exit_status
3141' 0
3142for ac_signal in 1 2 13 15; do
3143  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3144done
3145ac_signal=0
3146
3147# confdefs.h avoids OS command line length limits that DEFS can exceed.
3148rm -f -r conftest* confdefs.h
3149
3150$as_echo "/* confdefs.h */" > confdefs.h
3151
3152# Predefined preprocessor variables.
3153
3154cat >>confdefs.h <<_ACEOF
3155#define PACKAGE_NAME "$PACKAGE_NAME"
3156_ACEOF
3157
3158cat >>confdefs.h <<_ACEOF
3159#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3160_ACEOF
3161
3162cat >>confdefs.h <<_ACEOF
3163#define PACKAGE_VERSION "$PACKAGE_VERSION"
3164_ACEOF
3165
3166cat >>confdefs.h <<_ACEOF
3167#define PACKAGE_STRING "$PACKAGE_STRING"
3168_ACEOF
3169
3170cat >>confdefs.h <<_ACEOF
3171#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3172_ACEOF
3173
3174cat >>confdefs.h <<_ACEOF
3175#define PACKAGE_URL "$PACKAGE_URL"
3176_ACEOF
3177
3178
3179# Let the site file select an alternate cache file if it wants to.
3180# Prefer an explicitly selected file to automatically selected ones.
3181ac_site_file1=NONE
3182ac_site_file2=NONE
3183if test -n "$CONFIG_SITE"; then
3184  # We do not want a PATH search for config.site.
3185  case $CONFIG_SITE in #((
3186    -*)  ac_site_file1=./$CONFIG_SITE;;
3187    */*) ac_site_file1=$CONFIG_SITE;;
3188    *)   ac_site_file1=./$CONFIG_SITE;;
3189  esac
3190elif test "x$prefix" != xNONE; then
3191  ac_site_file1=$prefix/share/config.site
3192  ac_site_file2=$prefix/etc/config.site
3193else
3194  ac_site_file1=$ac_default_prefix/share/config.site
3195  ac_site_file2=$ac_default_prefix/etc/config.site
3196fi
3197for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3198do
3199  test "x$ac_site_file" = xNONE && continue
3200  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3201    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3202$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3203    sed 's/^/| /' "$ac_site_file" >&5
3204    . "$ac_site_file" \
3205      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3207as_fn_error $? "failed to load site script $ac_site_file
3208See \`config.log' for more details" "$LINENO" 5; }
3209  fi
3210done
3211
3212if test -r "$cache_file"; then
3213  # Some versions of bash will fail to source /dev/null (special files
3214  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3215  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3216    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3217$as_echo "$as_me: loading cache $cache_file" >&6;}
3218    case $cache_file in
3219      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3220      *)                      . "./$cache_file";;
3221    esac
3222  fi
3223else
3224  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3225$as_echo "$as_me: creating cache $cache_file" >&6;}
3226  >$cache_file
3227fi
3228
3229# Check that the precious variables saved in the cache have kept the same
3230# value.
3231ac_cache_corrupted=false
3232for ac_var in $ac_precious_vars; do
3233  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3234  eval ac_new_set=\$ac_env_${ac_var}_set
3235  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3236  eval ac_new_val=\$ac_env_${ac_var}_value
3237  case $ac_old_set,$ac_new_set in
3238    set,)
3239      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3240$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3241      ac_cache_corrupted=: ;;
3242    ,set)
3243      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3244$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3245      ac_cache_corrupted=: ;;
3246    ,);;
3247    *)
3248      if test "x$ac_old_val" != "x$ac_new_val"; then
3249	# differences in whitespace do not lead to failure.
3250	ac_old_val_w=`echo x $ac_old_val`
3251	ac_new_val_w=`echo x $ac_new_val`
3252	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3253	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3254$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3255	  ac_cache_corrupted=:
3256	else
3257	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3258$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3259	  eval $ac_var=\$ac_old_val
3260	fi
3261	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3262$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3263	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3264$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3265      fi;;
3266  esac
3267  # Pass precious variables to config.status.
3268  if test "$ac_new_set" = set; then
3269    case $ac_new_val in
3270    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3271    *) ac_arg=$ac_var=$ac_new_val ;;
3272    esac
3273    case " $ac_configure_args " in
3274      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3275      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3276    esac
3277  fi
3278done
3279if $ac_cache_corrupted; then
3280  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3281$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3282  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3283$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3284  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3285fi
3286## -------------------- ##
3287## Main body of script. ##
3288## -------------------- ##
3289
3290ac_ext=c
3291ac_cpp='$CPP $CPPFLAGS'
3292ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3293ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3294ac_compiler_gnu=$ac_cv_c_compiler_gnu
3295
3296
3297
3298ac_aux_dir=
3299for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3300  if test -f "$ac_dir/install-sh"; then
3301    ac_aux_dir=$ac_dir
3302    ac_install_sh="$ac_aux_dir/install-sh -c"
3303    break
3304  elif test -f "$ac_dir/install.sh"; then
3305    ac_aux_dir=$ac_dir
3306    ac_install_sh="$ac_aux_dir/install.sh -c"
3307    break
3308  elif test -f "$ac_dir/shtool"; then
3309    ac_aux_dir=$ac_dir
3310    ac_install_sh="$ac_aux_dir/shtool install -c"
3311    break
3312  fi
3313done
3314if test -z "$ac_aux_dir"; then
3315  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
3316fi
3317
3318# These three variables are undocumented and unsupported,
3319# and are intended to be withdrawn in a future Autoconf release.
3320# They can cause serious problems if a builder's source tree is in a directory
3321# whose full name contains unusual characters.
3322ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3323ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3324ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3325
3326
3327# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3328
3329#
3330# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3331# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3332#
3333# This code is free software; you can redistribute it and/or modify it
3334# under the terms of the GNU General Public License version 2 only, as
3335# published by the Free Software Foundation.  Oracle designates this
3336# particular file as subject to the "Classpath" exception as provided
3337# by Oracle in the LICENSE file that accompanied this code.
3338#
3339# This code is distributed in the hope that it will be useful, but WITHOUT
3340# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3341# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3342# version 2 for more details (a copy is included in the LICENSE file that
3343# accompanied this code).
3344#
3345# You should have received a copy of the GNU General Public License version
3346# 2 along with this work; if not, write to the Free Software Foundation,
3347# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3348#
3349# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3350# or visit www.oracle.com if you need additional information or have any
3351# questions.
3352#
3353
3354#
3355# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3356#
3357# This program is free software; you can redistribute it and/or modify
3358# it under the terms of the GNU General Public License as published by
3359# the Free Software Foundation; either version 2 of the License, or
3360# (at your option) any later version.
3361#
3362# This program is distributed in the hope that it will be useful, but
3363# WITHOUT ANY WARRANTY; without even the implied warranty of
3364# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3365# General Public License for more details.
3366#
3367# You should have received a copy of the GNU General Public License
3368# along with this program; if not, write to the Free Software
3369# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3370#
3371# As a special exception to the GNU General Public License, if you
3372# distribute this file as part of a program that contains a
3373# configuration script generated by Autoconf, you may include it under
3374# the same distribution terms that you use for the rest of that program.
3375
3376# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3377# ----------------------------------
3378# PKG_PROG_PKG_CONFIG
3379
3380# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3381#
3382# Check to see whether a particular set of modules exists.  Similar
3383# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3384#
3385#
3386# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3387# this or PKG_CHECK_MODULES is called, or make sure to call
3388# PKG_CHECK_EXISTS manually
3389# --------------------------------------------------------------
3390
3391
3392
3393# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3394# ---------------------------------------------
3395# _PKG_CONFIG
3396
3397# _PKG_SHORT_ERRORS_SUPPORTED
3398# -----------------------------
3399# _PKG_SHORT_ERRORS_SUPPORTED
3400
3401
3402# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3403# [ACTION-IF-NOT-FOUND])
3404#
3405#
3406# Note that if there is a possibility the first call to
3407# PKG_CHECK_MODULES might not happen, you should be sure to include an
3408# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3409#
3410#
3411# --------------------------------------------------------------
3412# PKG_CHECK_MODULES
3413
3414
3415# Include these first...
3416#
3417# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3418# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3419#
3420# This code is free software; you can redistribute it and/or modify it
3421# under the terms of the GNU General Public License version 2 only, as
3422# published by the Free Software Foundation.  Oracle designates this
3423# particular file as subject to the "Classpath" exception as provided
3424# by Oracle in the LICENSE file that accompanied this code.
3425#
3426# This code is distributed in the hope that it will be useful, but WITHOUT
3427# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3428# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3429# version 2 for more details (a copy is included in the LICENSE file that
3430# accompanied this code).
3431#
3432# You should have received a copy of the GNU General Public License version
3433# 2 along with this work; if not, write to the Free Software Foundation,
3434# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3435#
3436# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3437# or visit www.oracle.com if you need additional information or have any
3438# questions.
3439#
3440
3441# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3442# If so, then append $1 to $2 \
3443# Also set JVM_ARG_OK to true/false depending on outcome.
3444
3445
3446# Appends a string to a path variable, only adding the : when needed.
3447
3448
3449# Prepends a string to a path variable, only adding the : when needed.
3450
3451
3452# This will make sure the given variable points to a full and proper
3453# path. This means:
3454# 1) There will be no spaces in the path. On unix platforms,
3455#    spaces in the path will result in an error. On Windows,
3456#    the path will be rewritten using short-style to be space-free.
3457# 2) The path will be absolute, and it will be in unix-style (on
3458#     cygwin).
3459# $1: The name of the variable to fix
3460
3461
3462# This will make sure the given variable points to a executable
3463# with a full and proper path. This means:
3464# 1) There will be no spaces in the path. On unix platforms,
3465#    spaces in the path will result in an error. On Windows,
3466#    the path will be rewritten using short-style to be space-free.
3467# 2) The path will be absolute, and it will be in unix-style (on
3468#     cygwin).
3469# Any arguments given to the executable is preserved.
3470# If the input variable does not have a directory specification, then
3471# it need to be in the PATH.
3472# $1: The name of the variable to fix
3473
3474
3475
3476
3477# Register a --with argument but mark it as deprecated
3478# $1: The name of the with argument to deprecate, not including --with-
3479
3480
3481# Register a --enable argument but mark it as deprecated
3482# $1: The name of the with argument to deprecate, not including --enable-
3483# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3484
3485
3486
3487
3488# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3489# $1: variable to check
3490
3491
3492# Check that there are no unprocessed overridden variables left.
3493# If so, they are an incorrect argument and we will exit with an error.
3494
3495
3496# Setup a tool for the given variable. If correctly specified by the user,
3497# use that value, otherwise search for the tool using the supplied code snippet.
3498# $1: variable to set
3499# $2: code snippet to call to look for the tool
3500# $3: code snippet to call if variable was used to find tool
3501
3502
3503# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3504# $1: variable to set
3505# $2: executable name (or list of names) to look for
3506
3507
3508# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3509# $1: variable to set
3510# $2: executable name (or list of names) to look for
3511
3512
3513# Like BASIC_PATH_PROGS but fails if no tool was found.
3514# $1: variable to set
3515# $2: executable name (or list of names) to look for
3516
3517
3518# Like BASIC_SETUP_TOOL but fails if no tool was found.
3519# $1: variable to set
3520# $2: autoconf macro to call to look for the special tool
3521
3522
3523# Setup the most fundamental tools that relies on not much else to set up,
3524# but is used by much of the early bootstrap code.
3525
3526
3527# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3528
3529
3530# Evaluates platform specific overrides for devkit variables.
3531# $1: Name of variable
3532
3533
3534
3535
3536
3537
3538#%%% Simple tools %%%
3539
3540# Check if we have found a usable version of make
3541# $1: the path to a potential make binary (or empty)
3542# $2: the description on how we found this
3543
3544
3545
3546
3547# Goes looking for a usable version of GNU make.
3548
3549
3550
3551
3552
3553
3554# Check if build directory is on local disk. If not possible to determine,
3555# we prefer to claim it's local.
3556# Argument 1: directory to test
3557# Argument 2: what to do if it is on local disk
3558# Argument 3: what to do otherwise (remote disk or failure)
3559
3560
3561# Check that source files have basic read permissions set. This might
3562# not be the case in cygwin in certain conditions.
3563
3564
3565
3566
3567# Check for support for specific options in bash
3568
3569
3570################################################################################
3571#
3572# Default make target
3573#
3574
3575
3576# Code to run after AC_OUTPUT
3577
3578
3579#
3580# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3581# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3582#
3583# This code is free software; you can redistribute it and/or modify it
3584# under the terms of the GNU General Public License version 2 only, as
3585# published by the Free Software Foundation.  Oracle designates this
3586# particular file as subject to the "Classpath" exception as provided
3587# by Oracle in the LICENSE file that accompanied this code.
3588#
3589# This code is distributed in the hope that it will be useful, but WITHOUT
3590# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3591# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3592# version 2 for more details (a copy is included in the LICENSE file that
3593# accompanied this code).
3594#
3595# You should have received a copy of the GNU General Public License version
3596# 2 along with this work; if not, write to the Free Software Foundation,
3597# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3598#
3599# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3600# or visit www.oracle.com if you need additional information or have any
3601# questions.
3602#
3603
3604
3605
3606
3607
3608# Helper function which possibly converts a path using DOS-style short mode.
3609# If so, the updated path is stored in $new_path.
3610# $1: The path to check
3611
3612
3613# Helper function which possibly converts a path using DOS-style short mode.
3614# If so, the updated path is stored in $new_path.
3615# $1: The path to check
3616
3617
3618# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3619# and could probably be heavily simplified. However, all changes in this
3620# area tend to need lot of testing in different scenarios, and in lack of
3621# proper unit testing, cleaning this up has not been deemed worth the effort
3622# at the moment.
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3633
3634
3635
3636
3637# ... then the rest
3638#
3639# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3640# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3641#
3642# This code is free software; you can redistribute it and/or modify it
3643# under the terms of the GNU General Public License version 2 only, as
3644# published by the Free Software Foundation.  Oracle designates this
3645# particular file as subject to the "Classpath" exception as provided
3646# by Oracle in the LICENSE file that accompanied this code.
3647#
3648# This code is distributed in the hope that it will be useful, but WITHOUT
3649# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3650# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3651# version 2 for more details (a copy is included in the LICENSE file that
3652# accompanied this code).
3653#
3654# You should have received a copy of the GNU General Public License version
3655# 2 along with this work; if not, write to the Free Software Foundation,
3656# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3657#
3658# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3659# or visit www.oracle.com if you need additional information or have any
3660# questions.
3661#
3662
3663########################################################################
3664# This file handles detection of the Boot JDK. The Boot JDK detection
3665# process has been developed as a response to solve a complex real-world
3666# problem. Initially, it was simple, but it has grown as platform after
3667# platform, idiosyncracy after idiosyncracy has been supported.
3668#
3669# The basic idea is this:
3670# 1) You need an acceptable *) JDK to use as a Boot JDK
3671# 2) There are several ways to locate a JDK, that are mostly platform
3672#    dependent **)
3673# 3) You can have multiple JDKs installed
3674# 4) If possible, configure should try to dig out an acceptable JDK
3675#    automatically, without having to resort to command-line options
3676#
3677# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3678#     javac) and not a JRE, etc.
3679#
3680# **) On Windows we typically use a well-known path.
3681#     On MacOSX we typically use the tool java_home.
3682#     On Linux we typically find javac in the $PATH, and then follow a
3683#     chain of symlinks that often ends up in a real JDK.
3684#
3685# This leads to the code where we check in different ways to locate a
3686# JDK, and if one is found, check if it is acceptable. If not, we print
3687# our reasons for rejecting it (useful when debugging non-working
3688# configure situations) and continue checking the next one.
3689########################################################################
3690
3691# Execute the check given as argument, and verify the result
3692# If the Boot JDK was previously found, do nothing
3693# $1 A command line (typically autoconf macro) to execute
3694
3695
3696# Test: Is bootjdk explicitely set by command line arguments?
3697
3698
3699# Test: Is $JAVA_HOME set?
3700
3701
3702# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3703
3704
3705# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3706# $1: Argument to the java_home binary (optional)
3707
3708
3709# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3710
3711
3712# Look for a jdk in the given path. If there are multiple, try to select the newest.
3713# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3714# $1 = Path to directory containing jdk installations.
3715# $2 = String to append to the found JDK directory to get the proper JDK home
3716
3717
3718# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3719# environmental variable as base for where to look.
3720# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3721
3722
3723# Test: Is there a JDK installed in default, well-known locations?
3724
3725
3726# Check that a command-line tool in the Boot JDK is correct
3727# $1 = name of variable to assign
3728# $2 = name of binary
3729
3730
3731###############################################################################
3732#
3733# We need a Boot JDK to bootstrap the build.
3734#
3735
3736
3737
3738
3739
3740#
3741# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3742# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3743#
3744# This code is free software; you can redistribute it and/or modify it
3745# under the terms of the GNU General Public License version 2 only, as
3746# published by the Free Software Foundation.  Oracle designates this
3747# particular file as subject to the "Classpath" exception as provided
3748# by Oracle in the LICENSE file that accompanied this code.
3749#
3750# This code is distributed in the hope that it will be useful, but WITHOUT
3751# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3752# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3753# version 2 for more details (a copy is included in the LICENSE file that
3754# accompanied this code).
3755#
3756# You should have received a copy of the GNU General Public License version
3757# 2 along with this work; if not, write to the Free Software Foundation,
3758# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3759#
3760# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3761# or visit www.oracle.com if you need additional information or have any
3762# questions.
3763#
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779################################################################################
3780#
3781# Optionally enable distributed compilation of native code using icecc/icecream
3782#
3783
3784
3785
3786
3787
3788
3789
3790#
3791# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3792# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3793#
3794# This code is free software; you can redistribute it and/or modify it
3795# under the terms of the GNU General Public License version 2 only, as
3796# published by the Free Software Foundation.  Oracle designates this
3797# particular file as subject to the "Classpath" exception as provided
3798# by Oracle in the LICENSE file that accompanied this code.
3799#
3800# This code is distributed in the hope that it will be useful, but WITHOUT
3801# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3802# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3803# version 2 for more details (a copy is included in the LICENSE file that
3804# accompanied this code).
3805#
3806# You should have received a copy of the GNU General Public License version
3807# 2 along with this work; if not, write to the Free Software Foundation,
3808# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3809#
3810# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3811# or visit www.oracle.com if you need additional information or have any
3812# questions.
3813#
3814
3815# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3816# corresponding configure arguments instead
3817
3818
3819# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
3820# that configure can use them while detecting compilers.
3821# TOOLCHAIN_TYPE is available here.
3822# Param 1 - Optional prefix to all variables. (e.g BUILD_)
3823
3824
3825
3826
3827
3828
3829# Documentation on common flags used for solstudio in HIGHEST.
3830#
3831# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3832#          done with care, there are some assumptions below that need to
3833#          be understood about the use of pointers, and IEEE behavior.
3834#
3835# -fns: Use non-standard floating point mode (not IEEE 754)
3836# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3837# -fsingle: Use single precision floating point with 'float'
3838# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3839#   (Source with excessing pointer casting and data access with mixed
3840#    pointer types are not recommended)
3841# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3842#   (If you expect perfect errno behavior, do not use this)
3843# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3844# -xrestrict: Pointer parameters to functions do not overlap
3845#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3846#    If you pass in multiple pointers to the same data, do not use this)
3847# -xlibmil: Inline some library routines
3848#   (If you expect perfect errno behavior, do not use this)
3849# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3850#   (If you expect perfect errno behavior, do not use this)
3851#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3852
3853    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3854    # Bug?
3855    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3856    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3857    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3858    #fi
3859
3860
3861
3862
3863
3864# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3865#                                   [RUN-IF-FALSE])
3866# ------------------------------------------------------------
3867# Check that the c and c++ compilers support an argument
3868
3869
3870# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3871#                                    [RUN-IF-FALSE])
3872# ------------------------------------------------------------
3873# Check that the linker support an argument
3874
3875
3876
3877
3878#
3879# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3880# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3881#
3882# This code is free software; you can redistribute it and/or modify it
3883# under the terms of the GNU General Public License version 2 only, as
3884# published by the Free Software Foundation.  Oracle designates this
3885# particular file as subject to the "Classpath" exception as provided
3886# by Oracle in the LICENSE file that accompanied this code.
3887#
3888# This code is distributed in the hope that it will be useful, but WITHOUT
3889# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3890# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3891# version 2 for more details (a copy is included in the LICENSE file that
3892# accompanied this code).
3893#
3894# You should have received a copy of the GNU General Public License version
3895# 2 along with this work; if not, write to the Free Software Foundation,
3896# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3897#
3898# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3899# or visit www.oracle.com if you need additional information or have any
3900# questions.
3901#
3902
3903
3904
3905
3906
3907cygwin_help() {
3908  case $1 in
3909    unzip)
3910      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3911      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3912      ;;
3913    zip)
3914      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3915      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3916      ;;
3917    make)
3918      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3919      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3920      ;;
3921    freetype)
3922      HELP_MSG="
3923The freetype library can now be build during the configure process.
3924Download the freetype sources and unpack them into an arbitrary directory:
3925
3926wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3927tar -xzf freetype-2.5.3.tar.gz
3928
3929Then run configure with '--with-freetype-src=<freetype_src>'. This will
3930automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3931builds or into '<freetype_src>/lib32' for 32-bit builds.
3932Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3933and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3934      ;;
3935  esac
3936}
3937
3938msys_help() {
3939  PKGHANDLER_COMMAND=""
3940}
3941
3942apt_help() {
3943  case $1 in
3944    reduced)
3945      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
3946    devkit)
3947      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3948    openjdk)
3949      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3950    alsa)
3951      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3952    cups)
3953      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3954    freetype)
3955      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3956    ffi)
3957      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
3958    x11)
3959      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3960    ccache)
3961      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3962  esac
3963}
3964
3965yum_help() {
3966  case $1 in
3967    devkit)
3968      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3969    openjdk)
3970      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3971    alsa)
3972      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3973    cups)
3974      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3975    freetype)
3976      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3977    x11)
3978      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3979    ccache)
3980      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3981  esac
3982}
3983
3984port_help() {
3985  PKGHANDLER_COMMAND=""
3986}
3987
3988pkgutil_help() {
3989  PKGHANDLER_COMMAND=""
3990}
3991
3992pkgadd_help() {
3993  PKGHANDLER_COMMAND=""
3994}
3995
3996# This function will check if we're called from the "configure" wrapper while
3997# printing --help. If so, we will print out additional information that can
3998# only be extracted within the autoconf script, and then exit. This must be
3999# called at the very beginning in configure.ac.
4000
4001
4002
4003
4004
4005
4006#
4007# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4008# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4009#
4010# This code is free software; you can redistribute it and/or modify it
4011# under the terms of the GNU General Public License version 2 only, as
4012# published by the Free Software Foundation.  Oracle designates this
4013# particular file as subject to the "Classpath" exception as provided
4014# by Oracle in the LICENSE file that accompanied this code.
4015#
4016# This code is distributed in the hope that it will be useful, but WITHOUT
4017# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4018# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4019# version 2 for more details (a copy is included in the LICENSE file that
4020# accompanied this code).
4021#
4022# You should have received a copy of the GNU General Public License version
4023# 2 along with this work; if not, write to the Free Software Foundation,
4024# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4025#
4026# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4027# or visit www.oracle.com if you need additional information or have any
4028# questions.
4029#
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040###############################################################################
4041#
4042# Should we build only OpenJDK even if closed sources are present?
4043#
4044
4045
4046
4047
4048
4049
4050###############################################################################
4051#
4052# Enable or disable the elliptic curve crypto implementation
4053#
4054
4055
4056
4057
4058
4059################################################################################
4060#
4061# Gcov coverage data for hotspot
4062#
4063
4064
4065################################################################################
4066#
4067# Static build support.  When enabled will generate static
4068# libraries instead of shared libraries for all JDK libs.
4069#
4070
4071
4072
4073
4074#
4075# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4076# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4077#
4078# This code is free software; you can redistribute it and/or modify it
4079# under the terms of the GNU General Public License version 2 only, as
4080# published by the Free Software Foundation.  Oracle designates this
4081# particular file as subject to the "Classpath" exception as provided
4082# by Oracle in the LICENSE file that accompanied this code.
4083#
4084# This code is distributed in the hope that it will be useful, but WITHOUT
4085# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4086# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4087# version 2 for more details (a copy is included in the LICENSE file that
4088# accompanied this code).
4089#
4090# You should have received a copy of the GNU General Public License version
4091# 2 along with this work; if not, write to the Free Software Foundation,
4092# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4093#
4094# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4095# or visit www.oracle.com if you need additional information or have any
4096# questions.
4097#
4098
4099###############################################################################
4100#
4101# Setup version numbers
4102#
4103
4104# Verify that a given string represents a valid version number, and assign it
4105# to a variable.
4106
4107# Argument 1: the variable to assign to
4108# Argument 2: the value given by the user
4109
4110
4111
4112
4113#
4114# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4115# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4116#
4117# This code is free software; you can redistribute it and/or modify it
4118# under the terms of the GNU General Public License version 2 only, as
4119# published by the Free Software Foundation.  Oracle designates this
4120# particular file as subject to the "Classpath" exception as provided
4121# by Oracle in the LICENSE file that accompanied this code.
4122#
4123# This code is distributed in the hope that it will be useful, but WITHOUT
4124# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4125# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4126# version 2 for more details (a copy is included in the LICENSE file that
4127# accompanied this code).
4128#
4129# You should have received a copy of the GNU General Public License version
4130# 2 along with this work; if not, write to the Free Software Foundation,
4131# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4132#
4133# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4134# or visit www.oracle.com if you need additional information or have any
4135# questions.
4136#
4137
4138# Major library component reside in separate files.
4139#
4140# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4141# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4142#
4143# This code is free software; you can redistribute it and/or modify it
4144# under the terms of the GNU General Public License version 2 only, as
4145# published by the Free Software Foundation.  Oracle designates this
4146# particular file as subject to the "Classpath" exception as provided
4147# by Oracle in the LICENSE file that accompanied this code.
4148#
4149# This code is distributed in the hope that it will be useful, but WITHOUT
4150# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4151# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4152# version 2 for more details (a copy is included in the LICENSE file that
4153# accompanied this code).
4154#
4155# You should have received a copy of the GNU General Public License version
4156# 2 along with this work; if not, write to the Free Software Foundation,
4157# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4158#
4159# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4160# or visit www.oracle.com if you need additional information or have any
4161# questions.
4162#
4163
4164################################################################################
4165# Setup alsa (Advanced Linux Sound Architecture)
4166################################################################################
4167
4168
4169#
4170# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4171# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4172#
4173# This code is free software; you can redistribute it and/or modify it
4174# under the terms of the GNU General Public License version 2 only, as
4175# published by the Free Software Foundation.  Oracle designates this
4176# particular file as subject to the "Classpath" exception as provided
4177# by Oracle in the LICENSE file that accompanied this code.
4178#
4179# This code is distributed in the hope that it will be useful, but WITHOUT
4180# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4181# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4182# version 2 for more details (a copy is included in the LICENSE file that
4183# accompanied this code).
4184#
4185# You should have received a copy of the GNU General Public License version
4186# 2 along with this work; if not, write to the Free Software Foundation,
4187# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4188#
4189# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4190# or visit www.oracle.com if you need additional information or have any
4191# questions.
4192#
4193
4194################################################################################
4195# Setup bundled libraries.
4196#
4197# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4198# OpenJDK repository. Default is to use these libraries as bundled, but they
4199# might be replaced by en external version by the user.
4200################################################################################
4201
4202
4203################################################################################
4204# Setup libjpeg
4205################################################################################
4206
4207
4208################################################################################
4209# Setup giflib
4210################################################################################
4211
4212
4213################################################################################
4214# Setup libpng
4215################################################################################
4216
4217
4218################################################################################
4219# Setup zlib
4220################################################################################
4221
4222
4223################################################################################
4224# Setup lcms (Little CMS)
4225################################################################################
4226
4227
4228#
4229# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4230# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4231#
4232# This code is free software; you can redistribute it and/or modify it
4233# under the terms of the GNU General Public License version 2 only, as
4234# published by the Free Software Foundation.  Oracle designates this
4235# particular file as subject to the "Classpath" exception as provided
4236# by Oracle in the LICENSE file that accompanied this code.
4237#
4238# This code is distributed in the hope that it will be useful, but WITHOUT
4239# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4240# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4241# version 2 for more details (a copy is included in the LICENSE file that
4242# accompanied this code).
4243#
4244# You should have received a copy of the GNU General Public License version
4245# 2 along with this work; if not, write to the Free Software Foundation,
4246# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4247#
4248# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4249# or visit www.oracle.com if you need additional information or have any
4250# questions.
4251#
4252
4253################################################################################
4254# Setup cups (Common Unix Printing System)
4255################################################################################
4256
4257
4258#
4259# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4260# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4261#
4262# This code is free software; you can redistribute it and/or modify it
4263# under the terms of the GNU General Public License version 2 only, as
4264# published by the Free Software Foundation.  Oracle designates this
4265# particular file as subject to the "Classpath" exception as provided
4266# by Oracle in the LICENSE file that accompanied this code.
4267#
4268# This code is distributed in the hope that it will be useful, but WITHOUT
4269# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4270# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4271# version 2 for more details (a copy is included in the LICENSE file that
4272# accompanied this code).
4273#
4274# You should have received a copy of the GNU General Public License version
4275# 2 along with this work; if not, write to the Free Software Foundation,
4276# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4277#
4278# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4279# or visit www.oracle.com if you need additional information or have any
4280# questions.
4281#
4282
4283################################################################################
4284# Setup libffi (Foreign Function Interface)
4285################################################################################
4286
4287
4288#
4289# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4290# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4291#
4292# This code is free software; you can redistribute it and/or modify it
4293# under the terms of the GNU General Public License version 2 only, as
4294# published by the Free Software Foundation.  Oracle designates this
4295# particular file as subject to the "Classpath" exception as provided
4296# by Oracle in the LICENSE file that accompanied this code.
4297#
4298# This code is distributed in the hope that it will be useful, but WITHOUT
4299# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4300# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4301# version 2 for more details (a copy is included in the LICENSE file that
4302# accompanied this code).
4303#
4304# You should have received a copy of the GNU General Public License version
4305# 2 along with this work; if not, write to the Free Software Foundation,
4306# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4307#
4308# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4309# or visit www.oracle.com if you need additional information or have any
4310# questions.
4311#
4312
4313################################################################################
4314# Build the freetype lib from source
4315################################################################################
4316
4317
4318################################################################################
4319# Check if a potential freeype library match is correct and usable
4320################################################################################
4321
4322
4323################################################################################
4324# Setup freetype (The FreeType2 font rendering library)
4325################################################################################
4326
4327
4328#
4329# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4330# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4331#
4332# This code is free software; you can redistribute it and/or modify it
4333# under the terms of the GNU General Public License version 2 only, as
4334# published by the Free Software Foundation.  Oracle designates this
4335# particular file as subject to the "Classpath" exception as provided
4336# by Oracle in the LICENSE file that accompanied this code.
4337#
4338# This code is distributed in the hope that it will be useful, but WITHOUT
4339# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4340# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4341# version 2 for more details (a copy is included in the LICENSE file that
4342# accompanied this code).
4343#
4344# You should have received a copy of the GNU General Public License version
4345# 2 along with this work; if not, write to the Free Software Foundation,
4346# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4347#
4348# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4349# or visit www.oracle.com if you need additional information or have any
4350# questions.
4351#
4352
4353################################################################################
4354# Setup the standard C/C++ runtime libraries.
4355#
4356# Most importantly, determine if stdc++ should be linked statically or
4357# dynamically.
4358################################################################################
4359
4360
4361#
4362# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4363# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4364#
4365# This code is free software; you can redistribute it and/or modify it
4366# under the terms of the GNU General Public License version 2 only, as
4367# published by the Free Software Foundation.  Oracle designates this
4368# particular file as subject to the "Classpath" exception as provided
4369# by Oracle in the LICENSE file that accompanied this code.
4370#
4371# This code is distributed in the hope that it will be useful, but WITHOUT
4372# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4373# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4374# version 2 for more details (a copy is included in the LICENSE file that
4375# accompanied this code).
4376#
4377# You should have received a copy of the GNU General Public License version
4378# 2 along with this work; if not, write to the Free Software Foundation,
4379# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4380#
4381# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4382# or visit www.oracle.com if you need additional information or have any
4383# questions.
4384#
4385
4386################################################################################
4387# Setup X11 Windows system
4388################################################################################
4389
4390
4391
4392################################################################################
4393# Determine which libraries are needed for this configuration
4394################################################################################
4395
4396
4397################################################################################
4398# Parse library options, and setup needed libraries
4399################################################################################
4400
4401
4402################################################################################
4403# Setup llvm (Low-Level VM)
4404################################################################################
4405
4406
4407################################################################################
4408# Setup various libraries, typically small system libraries
4409################################################################################
4410
4411
4412#
4413# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4414# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4415#
4416# This code is free software; you can redistribute it and/or modify it
4417# under the terms of the GNU General Public License version 2 only, as
4418# published by the Free Software Foundation.  Oracle designates this
4419# particular file as subject to the "Classpath" exception as provided
4420# by Oracle in the LICENSE file that accompanied this code.
4421#
4422# This code is distributed in the hope that it will be useful, but WITHOUT
4423# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4424# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4425# version 2 for more details (a copy is included in the LICENSE file that
4426# accompanied this code).
4427#
4428# You should have received a copy of the GNU General Public License version
4429# 2 along with this work; if not, write to the Free Software Foundation,
4430# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4431#
4432# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4433# or visit www.oracle.com if you need additional information or have any
4434# questions.
4435#
4436
4437# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4438# Converts autoconf style CPU name to OpenJDK style, into
4439# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4440
4441
4442# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4443# Converts autoconf style OS name to OpenJDK style, into
4444# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4445
4446
4447# Expects $host_os $host_cpu $build_os and $build_cpu
4448# and $with_target_bits to have been setup!
4449#
4450# Translate the standard triplet(quadruplet) definition
4451# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4452# OPENJDK_BUILD_OS, etc.
4453
4454
4455# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4456# accordingly. Must be done after setting up build and target system, but before
4457# doing anything else with these values.
4458
4459
4460# Setup the legacy variables, for controlling the old makefiles.
4461#
4462
4463
4464
4465
4466#%%% Build and target systems %%%
4467
4468
4469
4470
4471# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4472# Add -mX to various FLAGS variables.
4473
4474
4475
4476
4477
4478
4479#
4480# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4481# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4482#
4483# This code is free software; you can redistribute it and/or modify it
4484# under the terms of the GNU General Public License version 2 only, as
4485# published by the Free Software Foundation.  Oracle designates this
4486# particular file as subject to the "Classpath" exception as provided
4487# by Oracle in the LICENSE file that accompanied this code.
4488#
4489# This code is distributed in the hope that it will be useful, but WITHOUT
4490# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4491# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4492# version 2 for more details (a copy is included in the LICENSE file that
4493# accompanied this code).
4494#
4495# You should have received a copy of the GNU General Public License version
4496# 2 along with this work; if not, write to the Free Software Foundation,
4497# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4498#
4499# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4500# or visit www.oracle.com if you need additional information or have any
4501# questions.
4502#
4503
4504
4505
4506
4507
4508
4509
4510#
4511# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4512# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4513#
4514# This code is free software; you can redistribute it and/or modify it
4515# under the terms of the GNU General Public License version 2 only, as
4516# published by the Free Software Foundation.  Oracle designates this
4517# particular file as subject to the "Classpath" exception as provided
4518# by Oracle in the LICENSE file that accompanied this code.
4519#
4520# This code is distributed in the hope that it will be useful, but WITHOUT
4521# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4522# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4523# version 2 for more details (a copy is included in the LICENSE file that
4524# accompanied this code).
4525#
4526# You should have received a copy of the GNU General Public License version
4527# 2 along with this work; if not, write to the Free Software Foundation,
4528# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4529#
4530# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4531# or visit www.oracle.com if you need additional information or have any
4532# questions.
4533#
4534
4535########################################################################
4536# This file is responsible for detecting, verifying and setting up the
4537# toolchain, i.e. the compiler, linker and related utilities. It will setup
4538# proper paths to the binaries, but it will not setup any flags.
4539#
4540# The binaries used is determined by the toolchain type, which is the family of
4541# compilers and related tools that are used.
4542########################################################################
4543
4544
4545# All valid toolchains, regardless of platform (used by help.m4)
4546VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4547
4548# These toolchains are valid on different platforms
4549VALID_TOOLCHAINS_linux="gcc clang"
4550VALID_TOOLCHAINS_solaris="solstudio"
4551VALID_TOOLCHAINS_macosx="gcc clang"
4552VALID_TOOLCHAINS_aix="xlc"
4553VALID_TOOLCHAINS_windows="microsoft"
4554
4555# Toolchain descriptions
4556TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4557TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4558TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4559TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4560TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4561
4562# Setup a number of variables describing how native output files are
4563# named on this platform/toolchain.
4564
4565
4566# Determine which toolchain type to use, and make sure it is valid for this
4567# platform. Setup various information about the selected toolchain.
4568
4569
4570# Before we start detecting the toolchain executables, we might need some
4571# special setup, e.g. additional paths etc.
4572
4573
4574# Restore path, etc
4575
4576
4577# Check if a compiler is of the toolchain type we expect, and save the version
4578# information from it. If the compiler does not match the expected type,
4579# this function will abort using AC_MSG_ERROR. If it matches, the version will
4580# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4581# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4582#
4583# $1 = compiler to test (CC or CXX)
4584# $2 = human readable name of compiler (C or C++)
4585
4586
4587# Try to locate the given C or C++ compiler in the path, or otherwise.
4588#
4589# $1 = compiler to test (CC or CXX)
4590# $2 = human readable name of compiler (C or C++)
4591# $3 = list of compiler names to search for
4592
4593
4594# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4595# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4596# archiver (AR). Verify that the compilers are correct according to the
4597# toolchain type.
4598
4599
4600# Setup additional tools that is considered a part of the toolchain, but not the
4601# core part. Many of these are highly platform-specific and do not exist,
4602# and/or are not needed on all platforms.
4603
4604
4605# Setup the build tools (i.e, the compiler and linker used to build programs
4606# that should be run on the build platform, not the target platform, as a build
4607# helper). Since the non-cross-compile case uses the normal, target compilers
4608# for this, we can only do this after these have been setup.
4609
4610
4611# Setup legacy variables that are still needed as alternative ways to refer to
4612# parts of the toolchain.
4613
4614
4615# Do some additional checks on the detected tools.
4616
4617
4618# Setup the JTReg Regression Test Harness.
4619
4620
4621#
4622# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4623# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4624#
4625# This code is free software; you can redistribute it and/or modify it
4626# under the terms of the GNU General Public License version 2 only, as
4627# published by the Free Software Foundation.  Oracle designates this
4628# particular file as subject to the "Classpath" exception as provided
4629# by Oracle in the LICENSE file that accompanied this code.
4630#
4631# This code is distributed in the hope that it will be useful, but WITHOUT
4632# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4633# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4634# version 2 for more details (a copy is included in the LICENSE file that
4635# accompanied this code).
4636#
4637# You should have received a copy of the GNU General Public License version
4638# 2 along with this work; if not, write to the Free Software Foundation,
4639# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4640#
4641# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4642# or visit www.oracle.com if you need additional information or have any
4643# questions.
4644#
4645
4646################################################################################
4647# The order of these defines the priority by which we try to find them.
4648VALID_VS_VERSIONS="2013 2012 2010"
4649
4650VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4651VS_VERSION_INTERNAL_2010=100
4652VS_MSVCR_2010=msvcr100.dll
4653# We don't use msvcp on Visual Studio 2010
4654#VS_MSVCP_2010=msvcp100.dll
4655VS_ENVVAR_2010="VS100COMNTOOLS"
4656VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4657VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4658VS_VS_PLATFORM_NAME_2010="v100"
4659VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4660
4661VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4662VS_VERSION_INTERNAL_2012=110
4663VS_MSVCR_2012=msvcr110.dll
4664VS_MSVCP_2012=msvcp110.dll
4665VS_ENVVAR_2012="VS110COMNTOOLS"
4666VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4667VS_SDK_INSTALLDIR_2012=
4668VS_VS_PLATFORM_NAME_2012="v110"
4669VS_SDK_PLATFORM_NAME_2012=
4670
4671VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4672VS_VERSION_INTERNAL_2013=120
4673VS_MSVCR_2013=msvcr120.dll
4674VS_MSVCP_2013=msvcp120.dll
4675VS_ENVVAR_2013="VS120COMNTOOLS"
4676VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4677VS_SDK_INSTALLDIR_2013=
4678VS_VS_PLATFORM_NAME_2013="v120"
4679VS_SDK_PLATFORM_NAME_2013=
4680
4681################################################################################
4682
4683
4684
4685################################################################################
4686
4687
4688
4689################################################################################
4690# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4691# build environment and assigns it to VS_ENV_CMD
4692
4693
4694################################################################################
4695
4696
4697
4698################################################################################
4699# Check if the VS env variables were setup prior to running configure.
4700# If not, then find vcvarsall.bat and run it automatically, and integrate
4701# the set env variables into the spec file.
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716# This line needs to be here, verbatim, after all includes and the dummy hook
4717# definitions. It is replaced with custom functionality when building
4718# custom sources.
4719#CUSTOM_AUTOCONF_INCLUDE
4720
4721# Do not change or remove the following line, it is needed for consistency checks:
4722DATE_WHEN_GENERATED=1449605339
4723
4724###############################################################################
4725#
4726# Initialization / Boot-strapping
4727#
4728# The bootstrapping process needs to solve the "chicken or the egg" problem,
4729# thus it jumps back and forth, each time gaining something needed later on.
4730#
4731###############################################################################
4732
4733# If we are requested to print additional help, do that and then exit.
4734# This must be the very first call.
4735
4736  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4737    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4738    $PRINTF "Which are valid to use depends on the build platform.\n"
4739    for toolchain in $VALID_TOOLCHAINS_all; do
4740      # Use indirect variable referencing
4741      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4742      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4743      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4744    done
4745
4746    # And now exit directly
4747    exit 0
4748  fi
4749
4750
4751# Basic initialization that must happen first of all in the normal process.
4752
4753  # Save the original command line. This is passed to us by the wrapper configure script.
4754
4755  # Save the path variable before it gets changed
4756  ORIGINAL_PATH="$PATH"
4757
4758  DATE_WHEN_CONFIGURED=`LANG=C date`
4759
4760  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4761$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4762  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4763$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4764
4765
4766  # Start with tools that do not need have cross compilation support
4767  # and can be expected to be found in the default PATH. These tools are
4768  # used by configure.
4769
4770  # First are all the simple required tools.
4771
4772
4773
4774  # Publish this variable in the help.
4775
4776
4777  if [ -z "${BASENAME+x}" ]; then
4778    # The variable is not set by user, try to locate tool using the code snippet
4779    for ac_prog in basename
4780do
4781  # Extract the first word of "$ac_prog", so it can be a program name with args.
4782set dummy $ac_prog; ac_word=$2
4783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4784$as_echo_n "checking for $ac_word... " >&6; }
4785if ${ac_cv_path_BASENAME+:} false; then :
4786  $as_echo_n "(cached) " >&6
4787else
4788  case $BASENAME in
4789  [\\/]* | ?:[\\/]*)
4790  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4791  ;;
4792  *)
4793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4794for as_dir in $PATH
4795do
4796  IFS=$as_save_IFS
4797  test -z "$as_dir" && as_dir=.
4798    for ac_exec_ext in '' $ac_executable_extensions; do
4799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4800    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4802    break 2
4803  fi
4804done
4805  done
4806IFS=$as_save_IFS
4807
4808  ;;
4809esac
4810fi
4811BASENAME=$ac_cv_path_BASENAME
4812if test -n "$BASENAME"; then
4813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4814$as_echo "$BASENAME" >&6; }
4815else
4816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4817$as_echo "no" >&6; }
4818fi
4819
4820
4821  test -n "$BASENAME" && break
4822done
4823
4824  else
4825    # The variable is set, but is it from the command line or the environment?
4826
4827    # Try to remove the string !BASENAME! from our list.
4828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4830      # If it failed, the variable was not from the command line. Ignore it,
4831      # but warn the user (except for BASH, which is always set by the calling BASH).
4832      if test "xBASENAME" != xBASH; then
4833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4834$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4835      fi
4836      # Try to locate tool using the code snippet
4837      for ac_prog in basename
4838do
4839  # Extract the first word of "$ac_prog", so it can be a program name with args.
4840set dummy $ac_prog; ac_word=$2
4841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4842$as_echo_n "checking for $ac_word... " >&6; }
4843if ${ac_cv_path_BASENAME+:} false; then :
4844  $as_echo_n "(cached) " >&6
4845else
4846  case $BASENAME in
4847  [\\/]* | ?:[\\/]*)
4848  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4849  ;;
4850  *)
4851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4852for as_dir in $PATH
4853do
4854  IFS=$as_save_IFS
4855  test -z "$as_dir" && as_dir=.
4856    for ac_exec_ext in '' $ac_executable_extensions; do
4857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4858    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4860    break 2
4861  fi
4862done
4863  done
4864IFS=$as_save_IFS
4865
4866  ;;
4867esac
4868fi
4869BASENAME=$ac_cv_path_BASENAME
4870if test -n "$BASENAME"; then
4871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4872$as_echo "$BASENAME" >&6; }
4873else
4874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4875$as_echo "no" >&6; }
4876fi
4877
4878
4879  test -n "$BASENAME" && break
4880done
4881
4882    else
4883      # If it succeeded, then it was overridden by the user. We will use it
4884      # for the tool.
4885
4886      # First remove it from the list of overridden variables, so we can test
4887      # for unknown variables in the end.
4888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4889
4890      # Check if we try to supply an empty value
4891      if test "x$BASENAME" = x; then
4892        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
4893$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
4894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4895$as_echo_n "checking for BASENAME... " >&6; }
4896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
4897$as_echo "disabled" >&6; }
4898      else
4899        # Check if the provided tool contains a complete path.
4900        tool_specified="$BASENAME"
4901        tool_basename="${tool_specified##*/}"
4902        if test "x$tool_basename" = "x$tool_specified"; then
4903          # A command without a complete path is provided, search $PATH.
4904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4905$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4906          # Extract the first word of "$tool_basename", so it can be a program name with args.
4907set dummy $tool_basename; ac_word=$2
4908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4909$as_echo_n "checking for $ac_word... " >&6; }
4910if ${ac_cv_path_BASENAME+:} false; then :
4911  $as_echo_n "(cached) " >&6
4912else
4913  case $BASENAME in
4914  [\\/]* | ?:[\\/]*)
4915  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4916  ;;
4917  *)
4918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4919for as_dir in $PATH
4920do
4921  IFS=$as_save_IFS
4922  test -z "$as_dir" && as_dir=.
4923    for ac_exec_ext in '' $ac_executable_extensions; do
4924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4925    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4927    break 2
4928  fi
4929done
4930  done
4931IFS=$as_save_IFS
4932
4933  ;;
4934esac
4935fi
4936BASENAME=$ac_cv_path_BASENAME
4937if test -n "$BASENAME"; then
4938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4939$as_echo "$BASENAME" >&6; }
4940else
4941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4942$as_echo "no" >&6; }
4943fi
4944
4945
4946          if test "x$BASENAME" = x; then
4947            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4948          fi
4949        else
4950          # Otherwise we believe it is a complete path. Use it as it is.
4951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4952$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4953          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4954$as_echo_n "checking for BASENAME... " >&6; }
4955          if test ! -x "$tool_specified"; then
4956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4957$as_echo "not found" >&6; }
4958            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4959          fi
4960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4961$as_echo "$tool_specified" >&6; }
4962        fi
4963      fi
4964    fi
4965
4966  fi
4967
4968
4969
4970  if test "x$BASENAME" = x; then
4971    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4972  fi
4973
4974
4975
4976
4977
4978  # Publish this variable in the help.
4979
4980
4981  if [ -z "${BASH+x}" ]; then
4982    # The variable is not set by user, try to locate tool using the code snippet
4983    for ac_prog in bash
4984do
4985  # Extract the first word of "$ac_prog", so it can be a program name with args.
4986set dummy $ac_prog; ac_word=$2
4987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4988$as_echo_n "checking for $ac_word... " >&6; }
4989if ${ac_cv_path_BASH+:} false; then :
4990  $as_echo_n "(cached) " >&6
4991else
4992  case $BASH in
4993  [\\/]* | ?:[\\/]*)
4994  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4995  ;;
4996  *)
4997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998for as_dir in $PATH
4999do
5000  IFS=$as_save_IFS
5001  test -z "$as_dir" && as_dir=.
5002    for ac_exec_ext in '' $ac_executable_extensions; do
5003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5004    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5006    break 2
5007  fi
5008done
5009  done
5010IFS=$as_save_IFS
5011
5012  ;;
5013esac
5014fi
5015BASH=$ac_cv_path_BASH
5016if test -n "$BASH"; then
5017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5018$as_echo "$BASH" >&6; }
5019else
5020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5021$as_echo "no" >&6; }
5022fi
5023
5024
5025  test -n "$BASH" && break
5026done
5027
5028  else
5029    # The variable is set, but is it from the command line or the environment?
5030
5031    # Try to remove the string !BASH! from our list.
5032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5034      # If it failed, the variable was not from the command line. Ignore it,
5035      # but warn the user (except for BASH, which is always set by the calling BASH).
5036      if test "xBASH" != xBASH; then
5037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5038$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5039      fi
5040      # Try to locate tool using the code snippet
5041      for ac_prog in bash
5042do
5043  # Extract the first word of "$ac_prog", so it can be a program name with args.
5044set dummy $ac_prog; ac_word=$2
5045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046$as_echo_n "checking for $ac_word... " >&6; }
5047if ${ac_cv_path_BASH+:} false; then :
5048  $as_echo_n "(cached) " >&6
5049else
5050  case $BASH in
5051  [\\/]* | ?:[\\/]*)
5052  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5053  ;;
5054  *)
5055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5056for as_dir in $PATH
5057do
5058  IFS=$as_save_IFS
5059  test -z "$as_dir" && as_dir=.
5060    for ac_exec_ext in '' $ac_executable_extensions; do
5061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5062    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5064    break 2
5065  fi
5066done
5067  done
5068IFS=$as_save_IFS
5069
5070  ;;
5071esac
5072fi
5073BASH=$ac_cv_path_BASH
5074if test -n "$BASH"; then
5075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5076$as_echo "$BASH" >&6; }
5077else
5078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5079$as_echo "no" >&6; }
5080fi
5081
5082
5083  test -n "$BASH" && break
5084done
5085
5086    else
5087      # If it succeeded, then it was overridden by the user. We will use it
5088      # for the tool.
5089
5090      # First remove it from the list of overridden variables, so we can test
5091      # for unknown variables in the end.
5092      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5093
5094      # Check if we try to supply an empty value
5095      if test "x$BASH" = x; then
5096        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5097$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5099$as_echo_n "checking for BASH... " >&6; }
5100        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5101$as_echo "disabled" >&6; }
5102      else
5103        # Check if the provided tool contains a complete path.
5104        tool_specified="$BASH"
5105        tool_basename="${tool_specified##*/}"
5106        if test "x$tool_basename" = "x$tool_specified"; then
5107          # A command without a complete path is provided, search $PATH.
5108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5109$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5110          # Extract the first word of "$tool_basename", so it can be a program name with args.
5111set dummy $tool_basename; ac_word=$2
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5113$as_echo_n "checking for $ac_word... " >&6; }
5114if ${ac_cv_path_BASH+:} false; then :
5115  $as_echo_n "(cached) " >&6
5116else
5117  case $BASH in
5118  [\\/]* | ?:[\\/]*)
5119  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5120  ;;
5121  *)
5122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5123for as_dir in $PATH
5124do
5125  IFS=$as_save_IFS
5126  test -z "$as_dir" && as_dir=.
5127    for ac_exec_ext in '' $ac_executable_extensions; do
5128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5129    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5131    break 2
5132  fi
5133done
5134  done
5135IFS=$as_save_IFS
5136
5137  ;;
5138esac
5139fi
5140BASH=$ac_cv_path_BASH
5141if test -n "$BASH"; then
5142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5143$as_echo "$BASH" >&6; }
5144else
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5146$as_echo "no" >&6; }
5147fi
5148
5149
5150          if test "x$BASH" = x; then
5151            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5152          fi
5153        else
5154          # Otherwise we believe it is a complete path. Use it as it is.
5155          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5156$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5157          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5158$as_echo_n "checking for BASH... " >&6; }
5159          if test ! -x "$tool_specified"; then
5160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5161$as_echo "not found" >&6; }
5162            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5163          fi
5164          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5165$as_echo "$tool_specified" >&6; }
5166        fi
5167      fi
5168    fi
5169
5170  fi
5171
5172
5173
5174  if test "x$BASH" = x; then
5175    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5176  fi
5177
5178
5179
5180
5181
5182  # Publish this variable in the help.
5183
5184
5185  if [ -z "${CAT+x}" ]; then
5186    # The variable is not set by user, try to locate tool using the code snippet
5187    for ac_prog in cat
5188do
5189  # Extract the first word of "$ac_prog", so it can be a program name with args.
5190set dummy $ac_prog; ac_word=$2
5191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5192$as_echo_n "checking for $ac_word... " >&6; }
5193if ${ac_cv_path_CAT+:} false; then :
5194  $as_echo_n "(cached) " >&6
5195else
5196  case $CAT in
5197  [\\/]* | ?:[\\/]*)
5198  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5199  ;;
5200  *)
5201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5202for as_dir in $PATH
5203do
5204  IFS=$as_save_IFS
5205  test -z "$as_dir" && as_dir=.
5206    for ac_exec_ext in '' $ac_executable_extensions; do
5207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5208    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5210    break 2
5211  fi
5212done
5213  done
5214IFS=$as_save_IFS
5215
5216  ;;
5217esac
5218fi
5219CAT=$ac_cv_path_CAT
5220if test -n "$CAT"; then
5221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5222$as_echo "$CAT" >&6; }
5223else
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5225$as_echo "no" >&6; }
5226fi
5227
5228
5229  test -n "$CAT" && break
5230done
5231
5232  else
5233    # The variable is set, but is it from the command line or the environment?
5234
5235    # Try to remove the string !CAT! from our list.
5236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5238      # If it failed, the variable was not from the command line. Ignore it,
5239      # but warn the user (except for BASH, which is always set by the calling BASH).
5240      if test "xCAT" != xBASH; then
5241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5242$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5243      fi
5244      # Try to locate tool using the code snippet
5245      for ac_prog in cat
5246do
5247  # Extract the first word of "$ac_prog", so it can be a program name with args.
5248set dummy $ac_prog; ac_word=$2
5249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5250$as_echo_n "checking for $ac_word... " >&6; }
5251if ${ac_cv_path_CAT+:} false; then :
5252  $as_echo_n "(cached) " >&6
5253else
5254  case $CAT in
5255  [\\/]* | ?:[\\/]*)
5256  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5257  ;;
5258  *)
5259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260for as_dir in $PATH
5261do
5262  IFS=$as_save_IFS
5263  test -z "$as_dir" && as_dir=.
5264    for ac_exec_ext in '' $ac_executable_extensions; do
5265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5266    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5268    break 2
5269  fi
5270done
5271  done
5272IFS=$as_save_IFS
5273
5274  ;;
5275esac
5276fi
5277CAT=$ac_cv_path_CAT
5278if test -n "$CAT"; then
5279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5280$as_echo "$CAT" >&6; }
5281else
5282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283$as_echo "no" >&6; }
5284fi
5285
5286
5287  test -n "$CAT" && break
5288done
5289
5290    else
5291      # If it succeeded, then it was overridden by the user. We will use it
5292      # for the tool.
5293
5294      # First remove it from the list of overridden variables, so we can test
5295      # for unknown variables in the end.
5296      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5297
5298      # Check if we try to supply an empty value
5299      if test "x$CAT" = x; then
5300        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5301$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5302        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5303$as_echo_n "checking for CAT... " >&6; }
5304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5305$as_echo "disabled" >&6; }
5306      else
5307        # Check if the provided tool contains a complete path.
5308        tool_specified="$CAT"
5309        tool_basename="${tool_specified##*/}"
5310        if test "x$tool_basename" = "x$tool_specified"; then
5311          # A command without a complete path is provided, search $PATH.
5312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5313$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5314          # Extract the first word of "$tool_basename", so it can be a program name with args.
5315set dummy $tool_basename; ac_word=$2
5316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5317$as_echo_n "checking for $ac_word... " >&6; }
5318if ${ac_cv_path_CAT+:} false; then :
5319  $as_echo_n "(cached) " >&6
5320else
5321  case $CAT in
5322  [\\/]* | ?:[\\/]*)
5323  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5324  ;;
5325  *)
5326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5327for as_dir in $PATH
5328do
5329  IFS=$as_save_IFS
5330  test -z "$as_dir" && as_dir=.
5331    for ac_exec_ext in '' $ac_executable_extensions; do
5332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5333    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5335    break 2
5336  fi
5337done
5338  done
5339IFS=$as_save_IFS
5340
5341  ;;
5342esac
5343fi
5344CAT=$ac_cv_path_CAT
5345if test -n "$CAT"; then
5346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5347$as_echo "$CAT" >&6; }
5348else
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351fi
5352
5353
5354          if test "x$CAT" = x; then
5355            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5356          fi
5357        else
5358          # Otherwise we believe it is a complete path. Use it as it is.
5359          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5360$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5361          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5362$as_echo_n "checking for CAT... " >&6; }
5363          if test ! -x "$tool_specified"; then
5364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5365$as_echo "not found" >&6; }
5366            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5367          fi
5368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5369$as_echo "$tool_specified" >&6; }
5370        fi
5371      fi
5372    fi
5373
5374  fi
5375
5376
5377
5378  if test "x$CAT" = x; then
5379    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5380  fi
5381
5382
5383
5384
5385
5386  # Publish this variable in the help.
5387
5388
5389  if [ -z "${CHMOD+x}" ]; then
5390    # The variable is not set by user, try to locate tool using the code snippet
5391    for ac_prog in chmod
5392do
5393  # Extract the first word of "$ac_prog", so it can be a program name with args.
5394set dummy $ac_prog; ac_word=$2
5395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5396$as_echo_n "checking for $ac_word... " >&6; }
5397if ${ac_cv_path_CHMOD+:} false; then :
5398  $as_echo_n "(cached) " >&6
5399else
5400  case $CHMOD in
5401  [\\/]* | ?:[\\/]*)
5402  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5403  ;;
5404  *)
5405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5406for as_dir in $PATH
5407do
5408  IFS=$as_save_IFS
5409  test -z "$as_dir" && as_dir=.
5410    for ac_exec_ext in '' $ac_executable_extensions; do
5411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5412    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5414    break 2
5415  fi
5416done
5417  done
5418IFS=$as_save_IFS
5419
5420  ;;
5421esac
5422fi
5423CHMOD=$ac_cv_path_CHMOD
5424if test -n "$CHMOD"; then
5425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5426$as_echo "$CHMOD" >&6; }
5427else
5428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5429$as_echo "no" >&6; }
5430fi
5431
5432
5433  test -n "$CHMOD" && break
5434done
5435
5436  else
5437    # The variable is set, but is it from the command line or the environment?
5438
5439    # Try to remove the string !CHMOD! from our list.
5440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5442      # If it failed, the variable was not from the command line. Ignore it,
5443      # but warn the user (except for BASH, which is always set by the calling BASH).
5444      if test "xCHMOD" != xBASH; then
5445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5446$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5447      fi
5448      # Try to locate tool using the code snippet
5449      for ac_prog in chmod
5450do
5451  # Extract the first word of "$ac_prog", so it can be a program name with args.
5452set dummy $ac_prog; ac_word=$2
5453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5454$as_echo_n "checking for $ac_word... " >&6; }
5455if ${ac_cv_path_CHMOD+:} false; then :
5456  $as_echo_n "(cached) " >&6
5457else
5458  case $CHMOD in
5459  [\\/]* | ?:[\\/]*)
5460  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5461  ;;
5462  *)
5463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5464for as_dir in $PATH
5465do
5466  IFS=$as_save_IFS
5467  test -z "$as_dir" && as_dir=.
5468    for ac_exec_ext in '' $ac_executable_extensions; do
5469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5470    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5472    break 2
5473  fi
5474done
5475  done
5476IFS=$as_save_IFS
5477
5478  ;;
5479esac
5480fi
5481CHMOD=$ac_cv_path_CHMOD
5482if test -n "$CHMOD"; then
5483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5484$as_echo "$CHMOD" >&6; }
5485else
5486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5487$as_echo "no" >&6; }
5488fi
5489
5490
5491  test -n "$CHMOD" && break
5492done
5493
5494    else
5495      # If it succeeded, then it was overridden by the user. We will use it
5496      # for the tool.
5497
5498      # First remove it from the list of overridden variables, so we can test
5499      # for unknown variables in the end.
5500      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5501
5502      # Check if we try to supply an empty value
5503      if test "x$CHMOD" = x; then
5504        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5505$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5507$as_echo_n "checking for CHMOD... " >&6; }
5508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5509$as_echo "disabled" >&6; }
5510      else
5511        # Check if the provided tool contains a complete path.
5512        tool_specified="$CHMOD"
5513        tool_basename="${tool_specified##*/}"
5514        if test "x$tool_basename" = "x$tool_specified"; then
5515          # A command without a complete path is provided, search $PATH.
5516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5517$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5518          # Extract the first word of "$tool_basename", so it can be a program name with args.
5519set dummy $tool_basename; ac_word=$2
5520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5521$as_echo_n "checking for $ac_word... " >&6; }
5522if ${ac_cv_path_CHMOD+:} false; then :
5523  $as_echo_n "(cached) " >&6
5524else
5525  case $CHMOD in
5526  [\\/]* | ?:[\\/]*)
5527  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5528  ;;
5529  *)
5530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5531for as_dir in $PATH
5532do
5533  IFS=$as_save_IFS
5534  test -z "$as_dir" && as_dir=.
5535    for ac_exec_ext in '' $ac_executable_extensions; do
5536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5537    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5539    break 2
5540  fi
5541done
5542  done
5543IFS=$as_save_IFS
5544
5545  ;;
5546esac
5547fi
5548CHMOD=$ac_cv_path_CHMOD
5549if test -n "$CHMOD"; then
5550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5551$as_echo "$CHMOD" >&6; }
5552else
5553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5554$as_echo "no" >&6; }
5555fi
5556
5557
5558          if test "x$CHMOD" = x; then
5559            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5560          fi
5561        else
5562          # Otherwise we believe it is a complete path. Use it as it is.
5563          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5564$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5565          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5566$as_echo_n "checking for CHMOD... " >&6; }
5567          if test ! -x "$tool_specified"; then
5568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5569$as_echo "not found" >&6; }
5570            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5571          fi
5572          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5573$as_echo "$tool_specified" >&6; }
5574        fi
5575      fi
5576    fi
5577
5578  fi
5579
5580
5581
5582  if test "x$CHMOD" = x; then
5583    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5584  fi
5585
5586
5587
5588
5589
5590  # Publish this variable in the help.
5591
5592
5593  if [ -z "${CMP+x}" ]; then
5594    # The variable is not set by user, try to locate tool using the code snippet
5595    for ac_prog in cmp
5596do
5597  # Extract the first word of "$ac_prog", so it can be a program name with args.
5598set dummy $ac_prog; ac_word=$2
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5600$as_echo_n "checking for $ac_word... " >&6; }
5601if ${ac_cv_path_CMP+:} false; then :
5602  $as_echo_n "(cached) " >&6
5603else
5604  case $CMP in
5605  [\\/]* | ?:[\\/]*)
5606  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5607  ;;
5608  *)
5609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612  IFS=$as_save_IFS
5613  test -z "$as_dir" && as_dir=.
5614    for ac_exec_ext in '' $ac_executable_extensions; do
5615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5616    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5618    break 2
5619  fi
5620done
5621  done
5622IFS=$as_save_IFS
5623
5624  ;;
5625esac
5626fi
5627CMP=$ac_cv_path_CMP
5628if test -n "$CMP"; then
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5630$as_echo "$CMP" >&6; }
5631else
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5633$as_echo "no" >&6; }
5634fi
5635
5636
5637  test -n "$CMP" && break
5638done
5639
5640  else
5641    # The variable is set, but is it from the command line or the environment?
5642
5643    # Try to remove the string !CMP! from our list.
5644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5646      # If it failed, the variable was not from the command line. Ignore it,
5647      # but warn the user (except for BASH, which is always set by the calling BASH).
5648      if test "xCMP" != xBASH; then
5649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5650$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5651      fi
5652      # Try to locate tool using the code snippet
5653      for ac_prog in cmp
5654do
5655  # Extract the first word of "$ac_prog", so it can be a program name with args.
5656set dummy $ac_prog; ac_word=$2
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658$as_echo_n "checking for $ac_word... " >&6; }
5659if ${ac_cv_path_CMP+:} false; then :
5660  $as_echo_n "(cached) " >&6
5661else
5662  case $CMP in
5663  [\\/]* | ?:[\\/]*)
5664  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5665  ;;
5666  *)
5667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5668for as_dir in $PATH
5669do
5670  IFS=$as_save_IFS
5671  test -z "$as_dir" && as_dir=.
5672    for ac_exec_ext in '' $ac_executable_extensions; do
5673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5674    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5676    break 2
5677  fi
5678done
5679  done
5680IFS=$as_save_IFS
5681
5682  ;;
5683esac
5684fi
5685CMP=$ac_cv_path_CMP
5686if test -n "$CMP"; then
5687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5688$as_echo "$CMP" >&6; }
5689else
5690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691$as_echo "no" >&6; }
5692fi
5693
5694
5695  test -n "$CMP" && break
5696done
5697
5698    else
5699      # If it succeeded, then it was overridden by the user. We will use it
5700      # for the tool.
5701
5702      # First remove it from the list of overridden variables, so we can test
5703      # for unknown variables in the end.
5704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5705
5706      # Check if we try to supply an empty value
5707      if test "x$CMP" = x; then
5708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
5709$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
5710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5711$as_echo_n "checking for CMP... " >&6; }
5712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5713$as_echo "disabled" >&6; }
5714      else
5715        # Check if the provided tool contains a complete path.
5716        tool_specified="$CMP"
5717        tool_basename="${tool_specified##*/}"
5718        if test "x$tool_basename" = "x$tool_specified"; then
5719          # A command without a complete path is provided, search $PATH.
5720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5721$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5722          # Extract the first word of "$tool_basename", so it can be a program name with args.
5723set dummy $tool_basename; ac_word=$2
5724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5725$as_echo_n "checking for $ac_word... " >&6; }
5726if ${ac_cv_path_CMP+:} false; then :
5727  $as_echo_n "(cached) " >&6
5728else
5729  case $CMP in
5730  [\\/]* | ?:[\\/]*)
5731  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5732  ;;
5733  *)
5734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5735for as_dir in $PATH
5736do
5737  IFS=$as_save_IFS
5738  test -z "$as_dir" && as_dir=.
5739    for ac_exec_ext in '' $ac_executable_extensions; do
5740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5741    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5743    break 2
5744  fi
5745done
5746  done
5747IFS=$as_save_IFS
5748
5749  ;;
5750esac
5751fi
5752CMP=$ac_cv_path_CMP
5753if test -n "$CMP"; then
5754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5755$as_echo "$CMP" >&6; }
5756else
5757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5758$as_echo "no" >&6; }
5759fi
5760
5761
5762          if test "x$CMP" = x; then
5763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5764          fi
5765        else
5766          # Otherwise we believe it is a complete path. Use it as it is.
5767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5768$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5770$as_echo_n "checking for CMP... " >&6; }
5771          if test ! -x "$tool_specified"; then
5772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5773$as_echo "not found" >&6; }
5774            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5775          fi
5776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5777$as_echo "$tool_specified" >&6; }
5778        fi
5779      fi
5780    fi
5781
5782  fi
5783
5784
5785
5786  if test "x$CMP" = x; then
5787    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5788  fi
5789
5790
5791
5792
5793
5794  # Publish this variable in the help.
5795
5796
5797  if [ -z "${COMM+x}" ]; then
5798    # The variable is not set by user, try to locate tool using the code snippet
5799    for ac_prog in comm
5800do
5801  # Extract the first word of "$ac_prog", so it can be a program name with args.
5802set dummy $ac_prog; ac_word=$2
5803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5804$as_echo_n "checking for $ac_word... " >&6; }
5805if ${ac_cv_path_COMM+:} false; then :
5806  $as_echo_n "(cached) " >&6
5807else
5808  case $COMM in
5809  [\\/]* | ?:[\\/]*)
5810  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5811  ;;
5812  *)
5813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5814for as_dir in $PATH
5815do
5816  IFS=$as_save_IFS
5817  test -z "$as_dir" && as_dir=.
5818    for ac_exec_ext in '' $ac_executable_extensions; do
5819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5820    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5822    break 2
5823  fi
5824done
5825  done
5826IFS=$as_save_IFS
5827
5828  ;;
5829esac
5830fi
5831COMM=$ac_cv_path_COMM
5832if test -n "$COMM"; then
5833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5834$as_echo "$COMM" >&6; }
5835else
5836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5837$as_echo "no" >&6; }
5838fi
5839
5840
5841  test -n "$COMM" && break
5842done
5843
5844  else
5845    # The variable is set, but is it from the command line or the environment?
5846
5847    # Try to remove the string !COMM! from our list.
5848    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5849    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5850      # If it failed, the variable was not from the command line. Ignore it,
5851      # but warn the user (except for BASH, which is always set by the calling BASH).
5852      if test "xCOMM" != xBASH; then
5853        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5854$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5855      fi
5856      # Try to locate tool using the code snippet
5857      for ac_prog in comm
5858do
5859  # Extract the first word of "$ac_prog", so it can be a program name with args.
5860set dummy $ac_prog; ac_word=$2
5861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5862$as_echo_n "checking for $ac_word... " >&6; }
5863if ${ac_cv_path_COMM+:} false; then :
5864  $as_echo_n "(cached) " >&6
5865else
5866  case $COMM in
5867  [\\/]* | ?:[\\/]*)
5868  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5869  ;;
5870  *)
5871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5872for as_dir in $PATH
5873do
5874  IFS=$as_save_IFS
5875  test -z "$as_dir" && as_dir=.
5876    for ac_exec_ext in '' $ac_executable_extensions; do
5877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5878    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5880    break 2
5881  fi
5882done
5883  done
5884IFS=$as_save_IFS
5885
5886  ;;
5887esac
5888fi
5889COMM=$ac_cv_path_COMM
5890if test -n "$COMM"; then
5891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5892$as_echo "$COMM" >&6; }
5893else
5894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5895$as_echo "no" >&6; }
5896fi
5897
5898
5899  test -n "$COMM" && break
5900done
5901
5902    else
5903      # If it succeeded, then it was overridden by the user. We will use it
5904      # for the tool.
5905
5906      # First remove it from the list of overridden variables, so we can test
5907      # for unknown variables in the end.
5908      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5909
5910      # Check if we try to supply an empty value
5911      if test "x$COMM" = x; then
5912        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
5913$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
5914        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5915$as_echo_n "checking for COMM... " >&6; }
5916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5917$as_echo "disabled" >&6; }
5918      else
5919        # Check if the provided tool contains a complete path.
5920        tool_specified="$COMM"
5921        tool_basename="${tool_specified##*/}"
5922        if test "x$tool_basename" = "x$tool_specified"; then
5923          # A command without a complete path is provided, search $PATH.
5924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5925$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5926          # Extract the first word of "$tool_basename", so it can be a program name with args.
5927set dummy $tool_basename; ac_word=$2
5928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5929$as_echo_n "checking for $ac_word... " >&6; }
5930if ${ac_cv_path_COMM+:} false; then :
5931  $as_echo_n "(cached) " >&6
5932else
5933  case $COMM in
5934  [\\/]* | ?:[\\/]*)
5935  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5936  ;;
5937  *)
5938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5939for as_dir in $PATH
5940do
5941  IFS=$as_save_IFS
5942  test -z "$as_dir" && as_dir=.
5943    for ac_exec_ext in '' $ac_executable_extensions; do
5944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5945    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5947    break 2
5948  fi
5949done
5950  done
5951IFS=$as_save_IFS
5952
5953  ;;
5954esac
5955fi
5956COMM=$ac_cv_path_COMM
5957if test -n "$COMM"; then
5958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5959$as_echo "$COMM" >&6; }
5960else
5961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5962$as_echo "no" >&6; }
5963fi
5964
5965
5966          if test "x$COMM" = x; then
5967            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5968          fi
5969        else
5970          # Otherwise we believe it is a complete path. Use it as it is.
5971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5972$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5973          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5974$as_echo_n "checking for COMM... " >&6; }
5975          if test ! -x "$tool_specified"; then
5976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5977$as_echo "not found" >&6; }
5978            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5979          fi
5980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5981$as_echo "$tool_specified" >&6; }
5982        fi
5983      fi
5984    fi
5985
5986  fi
5987
5988
5989
5990  if test "x$COMM" = x; then
5991    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5992  fi
5993
5994
5995
5996
5997
5998  # Publish this variable in the help.
5999
6000
6001  if [ -z "${CP+x}" ]; then
6002    # The variable is not set by user, try to locate tool using the code snippet
6003    for ac_prog in cp
6004do
6005  # Extract the first word of "$ac_prog", so it can be a program name with args.
6006set dummy $ac_prog; ac_word=$2
6007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6008$as_echo_n "checking for $ac_word... " >&6; }
6009if ${ac_cv_path_CP+:} false; then :
6010  $as_echo_n "(cached) " >&6
6011else
6012  case $CP in
6013  [\\/]* | ?:[\\/]*)
6014  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6015  ;;
6016  *)
6017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6018for as_dir in $PATH
6019do
6020  IFS=$as_save_IFS
6021  test -z "$as_dir" && as_dir=.
6022    for ac_exec_ext in '' $ac_executable_extensions; do
6023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6024    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6026    break 2
6027  fi
6028done
6029  done
6030IFS=$as_save_IFS
6031
6032  ;;
6033esac
6034fi
6035CP=$ac_cv_path_CP
6036if test -n "$CP"; then
6037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6038$as_echo "$CP" >&6; }
6039else
6040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6041$as_echo "no" >&6; }
6042fi
6043
6044
6045  test -n "$CP" && break
6046done
6047
6048  else
6049    # The variable is set, but is it from the command line or the environment?
6050
6051    # Try to remove the string !CP! from our list.
6052    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6053    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6054      # If it failed, the variable was not from the command line. Ignore it,
6055      # but warn the user (except for BASH, which is always set by the calling BASH).
6056      if test "xCP" != xBASH; then
6057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6058$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6059      fi
6060      # Try to locate tool using the code snippet
6061      for ac_prog in cp
6062do
6063  # Extract the first word of "$ac_prog", so it can be a program name with args.
6064set dummy $ac_prog; ac_word=$2
6065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6066$as_echo_n "checking for $ac_word... " >&6; }
6067if ${ac_cv_path_CP+:} false; then :
6068  $as_echo_n "(cached) " >&6
6069else
6070  case $CP in
6071  [\\/]* | ?:[\\/]*)
6072  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6073  ;;
6074  *)
6075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6076for as_dir in $PATH
6077do
6078  IFS=$as_save_IFS
6079  test -z "$as_dir" && as_dir=.
6080    for ac_exec_ext in '' $ac_executable_extensions; do
6081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6082    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6084    break 2
6085  fi
6086done
6087  done
6088IFS=$as_save_IFS
6089
6090  ;;
6091esac
6092fi
6093CP=$ac_cv_path_CP
6094if test -n "$CP"; then
6095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6096$as_echo "$CP" >&6; }
6097else
6098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6099$as_echo "no" >&6; }
6100fi
6101
6102
6103  test -n "$CP" && break
6104done
6105
6106    else
6107      # If it succeeded, then it was overridden by the user. We will use it
6108      # for the tool.
6109
6110      # First remove it from the list of overridden variables, so we can test
6111      # for unknown variables in the end.
6112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6113
6114      # Check if we try to supply an empty value
6115      if test "x$CP" = x; then
6116        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6117$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6118        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6119$as_echo_n "checking for CP... " >&6; }
6120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6121$as_echo "disabled" >&6; }
6122      else
6123        # Check if the provided tool contains a complete path.
6124        tool_specified="$CP"
6125        tool_basename="${tool_specified##*/}"
6126        if test "x$tool_basename" = "x$tool_specified"; then
6127          # A command without a complete path is provided, search $PATH.
6128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6129$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6130          # Extract the first word of "$tool_basename", so it can be a program name with args.
6131set dummy $tool_basename; ac_word=$2
6132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6133$as_echo_n "checking for $ac_word... " >&6; }
6134if ${ac_cv_path_CP+:} false; then :
6135  $as_echo_n "(cached) " >&6
6136else
6137  case $CP in
6138  [\\/]* | ?:[\\/]*)
6139  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6140  ;;
6141  *)
6142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6143for as_dir in $PATH
6144do
6145  IFS=$as_save_IFS
6146  test -z "$as_dir" && as_dir=.
6147    for ac_exec_ext in '' $ac_executable_extensions; do
6148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6149    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6151    break 2
6152  fi
6153done
6154  done
6155IFS=$as_save_IFS
6156
6157  ;;
6158esac
6159fi
6160CP=$ac_cv_path_CP
6161if test -n "$CP"; then
6162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6163$as_echo "$CP" >&6; }
6164else
6165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6166$as_echo "no" >&6; }
6167fi
6168
6169
6170          if test "x$CP" = x; then
6171            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6172          fi
6173        else
6174          # Otherwise we believe it is a complete path. Use it as it is.
6175          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6176$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6177          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6178$as_echo_n "checking for CP... " >&6; }
6179          if test ! -x "$tool_specified"; then
6180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6181$as_echo "not found" >&6; }
6182            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6183          fi
6184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6185$as_echo "$tool_specified" >&6; }
6186        fi
6187      fi
6188    fi
6189
6190  fi
6191
6192
6193
6194  if test "x$CP" = x; then
6195    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6196  fi
6197
6198
6199
6200
6201
6202  # Publish this variable in the help.
6203
6204
6205  if [ -z "${CUT+x}" ]; then
6206    # The variable is not set by user, try to locate tool using the code snippet
6207    for ac_prog in cut
6208do
6209  # Extract the first word of "$ac_prog", so it can be a program name with args.
6210set dummy $ac_prog; ac_word=$2
6211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6212$as_echo_n "checking for $ac_word... " >&6; }
6213if ${ac_cv_path_CUT+:} false; then :
6214  $as_echo_n "(cached) " >&6
6215else
6216  case $CUT in
6217  [\\/]* | ?:[\\/]*)
6218  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6219  ;;
6220  *)
6221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6222for as_dir in $PATH
6223do
6224  IFS=$as_save_IFS
6225  test -z "$as_dir" && as_dir=.
6226    for ac_exec_ext in '' $ac_executable_extensions; do
6227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6228    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6230    break 2
6231  fi
6232done
6233  done
6234IFS=$as_save_IFS
6235
6236  ;;
6237esac
6238fi
6239CUT=$ac_cv_path_CUT
6240if test -n "$CUT"; then
6241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6242$as_echo "$CUT" >&6; }
6243else
6244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6245$as_echo "no" >&6; }
6246fi
6247
6248
6249  test -n "$CUT" && break
6250done
6251
6252  else
6253    # The variable is set, but is it from the command line or the environment?
6254
6255    # Try to remove the string !CUT! from our list.
6256    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6257    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6258      # If it failed, the variable was not from the command line. Ignore it,
6259      # but warn the user (except for BASH, which is always set by the calling BASH).
6260      if test "xCUT" != xBASH; then
6261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6262$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6263      fi
6264      # Try to locate tool using the code snippet
6265      for ac_prog in cut
6266do
6267  # Extract the first word of "$ac_prog", so it can be a program name with args.
6268set dummy $ac_prog; ac_word=$2
6269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6270$as_echo_n "checking for $ac_word... " >&6; }
6271if ${ac_cv_path_CUT+:} false; then :
6272  $as_echo_n "(cached) " >&6
6273else
6274  case $CUT in
6275  [\\/]* | ?:[\\/]*)
6276  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6277  ;;
6278  *)
6279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280for as_dir in $PATH
6281do
6282  IFS=$as_save_IFS
6283  test -z "$as_dir" && as_dir=.
6284    for ac_exec_ext in '' $ac_executable_extensions; do
6285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6286    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6288    break 2
6289  fi
6290done
6291  done
6292IFS=$as_save_IFS
6293
6294  ;;
6295esac
6296fi
6297CUT=$ac_cv_path_CUT
6298if test -n "$CUT"; then
6299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6300$as_echo "$CUT" >&6; }
6301else
6302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6303$as_echo "no" >&6; }
6304fi
6305
6306
6307  test -n "$CUT" && break
6308done
6309
6310    else
6311      # If it succeeded, then it was overridden by the user. We will use it
6312      # for the tool.
6313
6314      # First remove it from the list of overridden variables, so we can test
6315      # for unknown variables in the end.
6316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6317
6318      # Check if we try to supply an empty value
6319      if test "x$CUT" = x; then
6320        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6321$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6323$as_echo_n "checking for CUT... " >&6; }
6324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6325$as_echo "disabled" >&6; }
6326      else
6327        # Check if the provided tool contains a complete path.
6328        tool_specified="$CUT"
6329        tool_basename="${tool_specified##*/}"
6330        if test "x$tool_basename" = "x$tool_specified"; then
6331          # A command without a complete path is provided, search $PATH.
6332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6333$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6334          # Extract the first word of "$tool_basename", so it can be a program name with args.
6335set dummy $tool_basename; ac_word=$2
6336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6337$as_echo_n "checking for $ac_word... " >&6; }
6338if ${ac_cv_path_CUT+:} false; then :
6339  $as_echo_n "(cached) " >&6
6340else
6341  case $CUT in
6342  [\\/]* | ?:[\\/]*)
6343  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6344  ;;
6345  *)
6346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6347for as_dir in $PATH
6348do
6349  IFS=$as_save_IFS
6350  test -z "$as_dir" && as_dir=.
6351    for ac_exec_ext in '' $ac_executable_extensions; do
6352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6353    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6355    break 2
6356  fi
6357done
6358  done
6359IFS=$as_save_IFS
6360
6361  ;;
6362esac
6363fi
6364CUT=$ac_cv_path_CUT
6365if test -n "$CUT"; then
6366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6367$as_echo "$CUT" >&6; }
6368else
6369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370$as_echo "no" >&6; }
6371fi
6372
6373
6374          if test "x$CUT" = x; then
6375            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6376          fi
6377        else
6378          # Otherwise we believe it is a complete path. Use it as it is.
6379          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6380$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6381          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6382$as_echo_n "checking for CUT... " >&6; }
6383          if test ! -x "$tool_specified"; then
6384            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6385$as_echo "not found" >&6; }
6386            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6387          fi
6388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6389$as_echo "$tool_specified" >&6; }
6390        fi
6391      fi
6392    fi
6393
6394  fi
6395
6396
6397
6398  if test "x$CUT" = x; then
6399    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6400  fi
6401
6402
6403
6404
6405
6406  # Publish this variable in the help.
6407
6408
6409  if [ -z "${DATE+x}" ]; then
6410    # The variable is not set by user, try to locate tool using the code snippet
6411    for ac_prog in date
6412do
6413  # Extract the first word of "$ac_prog", so it can be a program name with args.
6414set dummy $ac_prog; ac_word=$2
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6416$as_echo_n "checking for $ac_word... " >&6; }
6417if ${ac_cv_path_DATE+:} false; then :
6418  $as_echo_n "(cached) " >&6
6419else
6420  case $DATE in
6421  [\\/]* | ?:[\\/]*)
6422  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6423  ;;
6424  *)
6425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6426for as_dir in $PATH
6427do
6428  IFS=$as_save_IFS
6429  test -z "$as_dir" && as_dir=.
6430    for ac_exec_ext in '' $ac_executable_extensions; do
6431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6432    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6434    break 2
6435  fi
6436done
6437  done
6438IFS=$as_save_IFS
6439
6440  ;;
6441esac
6442fi
6443DATE=$ac_cv_path_DATE
6444if test -n "$DATE"; then
6445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6446$as_echo "$DATE" >&6; }
6447else
6448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6449$as_echo "no" >&6; }
6450fi
6451
6452
6453  test -n "$DATE" && break
6454done
6455
6456  else
6457    # The variable is set, but is it from the command line or the environment?
6458
6459    # Try to remove the string !DATE! from our list.
6460    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6461    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6462      # If it failed, the variable was not from the command line. Ignore it,
6463      # but warn the user (except for BASH, which is always set by the calling BASH).
6464      if test "xDATE" != xBASH; then
6465        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6466$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6467      fi
6468      # Try to locate tool using the code snippet
6469      for ac_prog in date
6470do
6471  # Extract the first word of "$ac_prog", so it can be a program name with args.
6472set dummy $ac_prog; ac_word=$2
6473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6474$as_echo_n "checking for $ac_word... " >&6; }
6475if ${ac_cv_path_DATE+:} false; then :
6476  $as_echo_n "(cached) " >&6
6477else
6478  case $DATE in
6479  [\\/]* | ?:[\\/]*)
6480  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6481  ;;
6482  *)
6483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6484for as_dir in $PATH
6485do
6486  IFS=$as_save_IFS
6487  test -z "$as_dir" && as_dir=.
6488    for ac_exec_ext in '' $ac_executable_extensions; do
6489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6490    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6492    break 2
6493  fi
6494done
6495  done
6496IFS=$as_save_IFS
6497
6498  ;;
6499esac
6500fi
6501DATE=$ac_cv_path_DATE
6502if test -n "$DATE"; then
6503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6504$as_echo "$DATE" >&6; }
6505else
6506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507$as_echo "no" >&6; }
6508fi
6509
6510
6511  test -n "$DATE" && break
6512done
6513
6514    else
6515      # If it succeeded, then it was overridden by the user. We will use it
6516      # for the tool.
6517
6518      # First remove it from the list of overridden variables, so we can test
6519      # for unknown variables in the end.
6520      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6521
6522      # Check if we try to supply an empty value
6523      if test "x$DATE" = x; then
6524        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6525$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6527$as_echo_n "checking for DATE... " >&6; }
6528        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6529$as_echo "disabled" >&6; }
6530      else
6531        # Check if the provided tool contains a complete path.
6532        tool_specified="$DATE"
6533        tool_basename="${tool_specified##*/}"
6534        if test "x$tool_basename" = "x$tool_specified"; then
6535          # A command without a complete path is provided, search $PATH.
6536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6537$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6538          # Extract the first word of "$tool_basename", so it can be a program name with args.
6539set dummy $tool_basename; ac_word=$2
6540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6541$as_echo_n "checking for $ac_word... " >&6; }
6542if ${ac_cv_path_DATE+:} false; then :
6543  $as_echo_n "(cached) " >&6
6544else
6545  case $DATE in
6546  [\\/]* | ?:[\\/]*)
6547  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6548  ;;
6549  *)
6550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6551for as_dir in $PATH
6552do
6553  IFS=$as_save_IFS
6554  test -z "$as_dir" && as_dir=.
6555    for ac_exec_ext in '' $ac_executable_extensions; do
6556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6557    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6559    break 2
6560  fi
6561done
6562  done
6563IFS=$as_save_IFS
6564
6565  ;;
6566esac
6567fi
6568DATE=$ac_cv_path_DATE
6569if test -n "$DATE"; then
6570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6571$as_echo "$DATE" >&6; }
6572else
6573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6574$as_echo "no" >&6; }
6575fi
6576
6577
6578          if test "x$DATE" = x; then
6579            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6580          fi
6581        else
6582          # Otherwise we believe it is a complete path. Use it as it is.
6583          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6584$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6585          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6586$as_echo_n "checking for DATE... " >&6; }
6587          if test ! -x "$tool_specified"; then
6588            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6589$as_echo "not found" >&6; }
6590            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6591          fi
6592          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6593$as_echo "$tool_specified" >&6; }
6594        fi
6595      fi
6596    fi
6597
6598  fi
6599
6600
6601
6602  if test "x$DATE" = x; then
6603    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6604  fi
6605
6606
6607
6608
6609
6610  # Publish this variable in the help.
6611
6612
6613  if [ -z "${DIFF+x}" ]; then
6614    # The variable is not set by user, try to locate tool using the code snippet
6615    for ac_prog in gdiff diff
6616do
6617  # Extract the first word of "$ac_prog", so it can be a program name with args.
6618set dummy $ac_prog; ac_word=$2
6619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6620$as_echo_n "checking for $ac_word... " >&6; }
6621if ${ac_cv_path_DIFF+:} false; then :
6622  $as_echo_n "(cached) " >&6
6623else
6624  case $DIFF in
6625  [\\/]* | ?:[\\/]*)
6626  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6627  ;;
6628  *)
6629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6630for as_dir in $PATH
6631do
6632  IFS=$as_save_IFS
6633  test -z "$as_dir" && as_dir=.
6634    for ac_exec_ext in '' $ac_executable_extensions; do
6635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6636    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6638    break 2
6639  fi
6640done
6641  done
6642IFS=$as_save_IFS
6643
6644  ;;
6645esac
6646fi
6647DIFF=$ac_cv_path_DIFF
6648if test -n "$DIFF"; then
6649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6650$as_echo "$DIFF" >&6; }
6651else
6652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6653$as_echo "no" >&6; }
6654fi
6655
6656
6657  test -n "$DIFF" && break
6658done
6659
6660  else
6661    # The variable is set, but is it from the command line or the environment?
6662
6663    # Try to remove the string !DIFF! from our list.
6664    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6665    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6666      # If it failed, the variable was not from the command line. Ignore it,
6667      # but warn the user (except for BASH, which is always set by the calling BASH).
6668      if test "xDIFF" != xBASH; then
6669        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6670$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6671      fi
6672      # Try to locate tool using the code snippet
6673      for ac_prog in gdiff diff
6674do
6675  # Extract the first word of "$ac_prog", so it can be a program name with args.
6676set dummy $ac_prog; ac_word=$2
6677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6678$as_echo_n "checking for $ac_word... " >&6; }
6679if ${ac_cv_path_DIFF+:} false; then :
6680  $as_echo_n "(cached) " >&6
6681else
6682  case $DIFF in
6683  [\\/]* | ?:[\\/]*)
6684  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6685  ;;
6686  *)
6687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6688for as_dir in $PATH
6689do
6690  IFS=$as_save_IFS
6691  test -z "$as_dir" && as_dir=.
6692    for ac_exec_ext in '' $ac_executable_extensions; do
6693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6694    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6696    break 2
6697  fi
6698done
6699  done
6700IFS=$as_save_IFS
6701
6702  ;;
6703esac
6704fi
6705DIFF=$ac_cv_path_DIFF
6706if test -n "$DIFF"; then
6707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6708$as_echo "$DIFF" >&6; }
6709else
6710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6711$as_echo "no" >&6; }
6712fi
6713
6714
6715  test -n "$DIFF" && break
6716done
6717
6718    else
6719      # If it succeeded, then it was overridden by the user. We will use it
6720      # for the tool.
6721
6722      # First remove it from the list of overridden variables, so we can test
6723      # for unknown variables in the end.
6724      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6725
6726      # Check if we try to supply an empty value
6727      if test "x$DIFF" = x; then
6728        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
6729$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
6730        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6731$as_echo_n "checking for DIFF... " >&6; }
6732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6733$as_echo "disabled" >&6; }
6734      else
6735        # Check if the provided tool contains a complete path.
6736        tool_specified="$DIFF"
6737        tool_basename="${tool_specified##*/}"
6738        if test "x$tool_basename" = "x$tool_specified"; then
6739          # A command without a complete path is provided, search $PATH.
6740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6741$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6742          # Extract the first word of "$tool_basename", so it can be a program name with args.
6743set dummy $tool_basename; ac_word=$2
6744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6745$as_echo_n "checking for $ac_word... " >&6; }
6746if ${ac_cv_path_DIFF+:} false; then :
6747  $as_echo_n "(cached) " >&6
6748else
6749  case $DIFF in
6750  [\\/]* | ?:[\\/]*)
6751  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6752  ;;
6753  *)
6754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6755for as_dir in $PATH
6756do
6757  IFS=$as_save_IFS
6758  test -z "$as_dir" && as_dir=.
6759    for ac_exec_ext in '' $ac_executable_extensions; do
6760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6761    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6763    break 2
6764  fi
6765done
6766  done
6767IFS=$as_save_IFS
6768
6769  ;;
6770esac
6771fi
6772DIFF=$ac_cv_path_DIFF
6773if test -n "$DIFF"; then
6774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6775$as_echo "$DIFF" >&6; }
6776else
6777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6778$as_echo "no" >&6; }
6779fi
6780
6781
6782          if test "x$DIFF" = x; then
6783            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6784          fi
6785        else
6786          # Otherwise we believe it is a complete path. Use it as it is.
6787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6788$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6789          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6790$as_echo_n "checking for DIFF... " >&6; }
6791          if test ! -x "$tool_specified"; then
6792            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6793$as_echo "not found" >&6; }
6794            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6795          fi
6796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6797$as_echo "$tool_specified" >&6; }
6798        fi
6799      fi
6800    fi
6801
6802  fi
6803
6804
6805
6806  if test "x$DIFF" = x; then
6807    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6808  fi
6809
6810
6811
6812
6813
6814  # Publish this variable in the help.
6815
6816
6817  if [ -z "${DIRNAME+x}" ]; then
6818    # The variable is not set by user, try to locate tool using the code snippet
6819    for ac_prog in dirname
6820do
6821  # Extract the first word of "$ac_prog", so it can be a program name with args.
6822set dummy $ac_prog; ac_word=$2
6823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6824$as_echo_n "checking for $ac_word... " >&6; }
6825if ${ac_cv_path_DIRNAME+:} false; then :
6826  $as_echo_n "(cached) " >&6
6827else
6828  case $DIRNAME in
6829  [\\/]* | ?:[\\/]*)
6830  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6831  ;;
6832  *)
6833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6834for as_dir in $PATH
6835do
6836  IFS=$as_save_IFS
6837  test -z "$as_dir" && as_dir=.
6838    for ac_exec_ext in '' $ac_executable_extensions; do
6839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6840    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6842    break 2
6843  fi
6844done
6845  done
6846IFS=$as_save_IFS
6847
6848  ;;
6849esac
6850fi
6851DIRNAME=$ac_cv_path_DIRNAME
6852if test -n "$DIRNAME"; then
6853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6854$as_echo "$DIRNAME" >&6; }
6855else
6856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6857$as_echo "no" >&6; }
6858fi
6859
6860
6861  test -n "$DIRNAME" && break
6862done
6863
6864  else
6865    # The variable is set, but is it from the command line or the environment?
6866
6867    # Try to remove the string !DIRNAME! from our list.
6868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6870      # If it failed, the variable was not from the command line. Ignore it,
6871      # but warn the user (except for BASH, which is always set by the calling BASH).
6872      if test "xDIRNAME" != xBASH; then
6873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6874$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6875      fi
6876      # Try to locate tool using the code snippet
6877      for ac_prog in dirname
6878do
6879  # Extract the first word of "$ac_prog", so it can be a program name with args.
6880set dummy $ac_prog; ac_word=$2
6881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6882$as_echo_n "checking for $ac_word... " >&6; }
6883if ${ac_cv_path_DIRNAME+:} false; then :
6884  $as_echo_n "(cached) " >&6
6885else
6886  case $DIRNAME in
6887  [\\/]* | ?:[\\/]*)
6888  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6889  ;;
6890  *)
6891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6892for as_dir in $PATH
6893do
6894  IFS=$as_save_IFS
6895  test -z "$as_dir" && as_dir=.
6896    for ac_exec_ext in '' $ac_executable_extensions; do
6897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6898    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6900    break 2
6901  fi
6902done
6903  done
6904IFS=$as_save_IFS
6905
6906  ;;
6907esac
6908fi
6909DIRNAME=$ac_cv_path_DIRNAME
6910if test -n "$DIRNAME"; then
6911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6912$as_echo "$DIRNAME" >&6; }
6913else
6914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6915$as_echo "no" >&6; }
6916fi
6917
6918
6919  test -n "$DIRNAME" && break
6920done
6921
6922    else
6923      # If it succeeded, then it was overridden by the user. We will use it
6924      # for the tool.
6925
6926      # First remove it from the list of overridden variables, so we can test
6927      # for unknown variables in the end.
6928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6929
6930      # Check if we try to supply an empty value
6931      if test "x$DIRNAME" = x; then
6932        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
6933$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
6934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6935$as_echo_n "checking for DIRNAME... " >&6; }
6936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6937$as_echo "disabled" >&6; }
6938      else
6939        # Check if the provided tool contains a complete path.
6940        tool_specified="$DIRNAME"
6941        tool_basename="${tool_specified##*/}"
6942        if test "x$tool_basename" = "x$tool_specified"; then
6943          # A command without a complete path is provided, search $PATH.
6944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6945$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6946          # Extract the first word of "$tool_basename", so it can be a program name with args.
6947set dummy $tool_basename; ac_word=$2
6948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6949$as_echo_n "checking for $ac_word... " >&6; }
6950if ${ac_cv_path_DIRNAME+:} false; then :
6951  $as_echo_n "(cached) " >&6
6952else
6953  case $DIRNAME in
6954  [\\/]* | ?:[\\/]*)
6955  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6956  ;;
6957  *)
6958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6959for as_dir in $PATH
6960do
6961  IFS=$as_save_IFS
6962  test -z "$as_dir" && as_dir=.
6963    for ac_exec_ext in '' $ac_executable_extensions; do
6964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6965    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6967    break 2
6968  fi
6969done
6970  done
6971IFS=$as_save_IFS
6972
6973  ;;
6974esac
6975fi
6976DIRNAME=$ac_cv_path_DIRNAME
6977if test -n "$DIRNAME"; then
6978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6979$as_echo "$DIRNAME" >&6; }
6980else
6981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6982$as_echo "no" >&6; }
6983fi
6984
6985
6986          if test "x$DIRNAME" = x; then
6987            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6988          fi
6989        else
6990          # Otherwise we believe it is a complete path. Use it as it is.
6991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6992$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6993          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6994$as_echo_n "checking for DIRNAME... " >&6; }
6995          if test ! -x "$tool_specified"; then
6996            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6997$as_echo "not found" >&6; }
6998            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6999          fi
7000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7001$as_echo "$tool_specified" >&6; }
7002        fi
7003      fi
7004    fi
7005
7006  fi
7007
7008
7009
7010  if test "x$DIRNAME" = x; then
7011    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7012  fi
7013
7014
7015
7016
7017
7018  # Publish this variable in the help.
7019
7020
7021  if [ -z "${ECHO+x}" ]; then
7022    # The variable is not set by user, try to locate tool using the code snippet
7023    for ac_prog in echo
7024do
7025  # Extract the first word of "$ac_prog", so it can be a program name with args.
7026set dummy $ac_prog; ac_word=$2
7027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7028$as_echo_n "checking for $ac_word... " >&6; }
7029if ${ac_cv_path_ECHO+:} false; then :
7030  $as_echo_n "(cached) " >&6
7031else
7032  case $ECHO in
7033  [\\/]* | ?:[\\/]*)
7034  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7035  ;;
7036  *)
7037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7038for as_dir in $PATH
7039do
7040  IFS=$as_save_IFS
7041  test -z "$as_dir" && as_dir=.
7042    for ac_exec_ext in '' $ac_executable_extensions; do
7043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7044    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7046    break 2
7047  fi
7048done
7049  done
7050IFS=$as_save_IFS
7051
7052  ;;
7053esac
7054fi
7055ECHO=$ac_cv_path_ECHO
7056if test -n "$ECHO"; then
7057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7058$as_echo "$ECHO" >&6; }
7059else
7060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7061$as_echo "no" >&6; }
7062fi
7063
7064
7065  test -n "$ECHO" && break
7066done
7067
7068  else
7069    # The variable is set, but is it from the command line or the environment?
7070
7071    # Try to remove the string !ECHO! from our list.
7072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7074      # If it failed, the variable was not from the command line. Ignore it,
7075      # but warn the user (except for BASH, which is always set by the calling BASH).
7076      if test "xECHO" != xBASH; then
7077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7078$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7079      fi
7080      # Try to locate tool using the code snippet
7081      for ac_prog in echo
7082do
7083  # Extract the first word of "$ac_prog", so it can be a program name with args.
7084set dummy $ac_prog; ac_word=$2
7085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7086$as_echo_n "checking for $ac_word... " >&6; }
7087if ${ac_cv_path_ECHO+:} false; then :
7088  $as_echo_n "(cached) " >&6
7089else
7090  case $ECHO in
7091  [\\/]* | ?:[\\/]*)
7092  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7093  ;;
7094  *)
7095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7096for as_dir in $PATH
7097do
7098  IFS=$as_save_IFS
7099  test -z "$as_dir" && as_dir=.
7100    for ac_exec_ext in '' $ac_executable_extensions; do
7101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7102    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7104    break 2
7105  fi
7106done
7107  done
7108IFS=$as_save_IFS
7109
7110  ;;
7111esac
7112fi
7113ECHO=$ac_cv_path_ECHO
7114if test -n "$ECHO"; then
7115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7116$as_echo "$ECHO" >&6; }
7117else
7118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7119$as_echo "no" >&6; }
7120fi
7121
7122
7123  test -n "$ECHO" && break
7124done
7125
7126    else
7127      # If it succeeded, then it was overridden by the user. We will use it
7128      # for the tool.
7129
7130      # First remove it from the list of overridden variables, so we can test
7131      # for unknown variables in the end.
7132      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7133
7134      # Check if we try to supply an empty value
7135      if test "x$ECHO" = x; then
7136        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7137$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7138        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7139$as_echo_n "checking for ECHO... " >&6; }
7140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7141$as_echo "disabled" >&6; }
7142      else
7143        # Check if the provided tool contains a complete path.
7144        tool_specified="$ECHO"
7145        tool_basename="${tool_specified##*/}"
7146        if test "x$tool_basename" = "x$tool_specified"; then
7147          # A command without a complete path is provided, search $PATH.
7148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7149$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7150          # Extract the first word of "$tool_basename", so it can be a program name with args.
7151set dummy $tool_basename; ac_word=$2
7152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7153$as_echo_n "checking for $ac_word... " >&6; }
7154if ${ac_cv_path_ECHO+:} false; then :
7155  $as_echo_n "(cached) " >&6
7156else
7157  case $ECHO in
7158  [\\/]* | ?:[\\/]*)
7159  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7160  ;;
7161  *)
7162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7163for as_dir in $PATH
7164do
7165  IFS=$as_save_IFS
7166  test -z "$as_dir" && as_dir=.
7167    for ac_exec_ext in '' $ac_executable_extensions; do
7168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7169    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7171    break 2
7172  fi
7173done
7174  done
7175IFS=$as_save_IFS
7176
7177  ;;
7178esac
7179fi
7180ECHO=$ac_cv_path_ECHO
7181if test -n "$ECHO"; then
7182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7183$as_echo "$ECHO" >&6; }
7184else
7185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7186$as_echo "no" >&6; }
7187fi
7188
7189
7190          if test "x$ECHO" = x; then
7191            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7192          fi
7193        else
7194          # Otherwise we believe it is a complete path. Use it as it is.
7195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7196$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7197          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7198$as_echo_n "checking for ECHO... " >&6; }
7199          if test ! -x "$tool_specified"; then
7200            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7201$as_echo "not found" >&6; }
7202            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7203          fi
7204          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7205$as_echo "$tool_specified" >&6; }
7206        fi
7207      fi
7208    fi
7209
7210  fi
7211
7212
7213
7214  if test "x$ECHO" = x; then
7215    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7216  fi
7217
7218
7219
7220
7221
7222  # Publish this variable in the help.
7223
7224
7225  if [ -z "${EXPR+x}" ]; then
7226    # The variable is not set by user, try to locate tool using the code snippet
7227    for ac_prog in expr
7228do
7229  # Extract the first word of "$ac_prog", so it can be a program name with args.
7230set dummy $ac_prog; ac_word=$2
7231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7232$as_echo_n "checking for $ac_word... " >&6; }
7233if ${ac_cv_path_EXPR+:} false; then :
7234  $as_echo_n "(cached) " >&6
7235else
7236  case $EXPR in
7237  [\\/]* | ?:[\\/]*)
7238  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7239  ;;
7240  *)
7241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7242for as_dir in $PATH
7243do
7244  IFS=$as_save_IFS
7245  test -z "$as_dir" && as_dir=.
7246    for ac_exec_ext in '' $ac_executable_extensions; do
7247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7248    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7250    break 2
7251  fi
7252done
7253  done
7254IFS=$as_save_IFS
7255
7256  ;;
7257esac
7258fi
7259EXPR=$ac_cv_path_EXPR
7260if test -n "$EXPR"; then
7261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7262$as_echo "$EXPR" >&6; }
7263else
7264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7265$as_echo "no" >&6; }
7266fi
7267
7268
7269  test -n "$EXPR" && break
7270done
7271
7272  else
7273    # The variable is set, but is it from the command line or the environment?
7274
7275    # Try to remove the string !EXPR! from our list.
7276    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7277    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7278      # If it failed, the variable was not from the command line. Ignore it,
7279      # but warn the user (except for BASH, which is always set by the calling BASH).
7280      if test "xEXPR" != xBASH; then
7281        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7282$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7283      fi
7284      # Try to locate tool using the code snippet
7285      for ac_prog in expr
7286do
7287  # Extract the first word of "$ac_prog", so it can be a program name with args.
7288set dummy $ac_prog; ac_word=$2
7289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7290$as_echo_n "checking for $ac_word... " >&6; }
7291if ${ac_cv_path_EXPR+:} false; then :
7292  $as_echo_n "(cached) " >&6
7293else
7294  case $EXPR in
7295  [\\/]* | ?:[\\/]*)
7296  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7297  ;;
7298  *)
7299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7300for as_dir in $PATH
7301do
7302  IFS=$as_save_IFS
7303  test -z "$as_dir" && as_dir=.
7304    for ac_exec_ext in '' $ac_executable_extensions; do
7305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7306    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7308    break 2
7309  fi
7310done
7311  done
7312IFS=$as_save_IFS
7313
7314  ;;
7315esac
7316fi
7317EXPR=$ac_cv_path_EXPR
7318if test -n "$EXPR"; then
7319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7320$as_echo "$EXPR" >&6; }
7321else
7322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7323$as_echo "no" >&6; }
7324fi
7325
7326
7327  test -n "$EXPR" && break
7328done
7329
7330    else
7331      # If it succeeded, then it was overridden by the user. We will use it
7332      # for the tool.
7333
7334      # First remove it from the list of overridden variables, so we can test
7335      # for unknown variables in the end.
7336      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7337
7338      # Check if we try to supply an empty value
7339      if test "x$EXPR" = x; then
7340        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7341$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7342        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7343$as_echo_n "checking for EXPR... " >&6; }
7344        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7345$as_echo "disabled" >&6; }
7346      else
7347        # Check if the provided tool contains a complete path.
7348        tool_specified="$EXPR"
7349        tool_basename="${tool_specified##*/}"
7350        if test "x$tool_basename" = "x$tool_specified"; then
7351          # A command without a complete path is provided, search $PATH.
7352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7353$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7354          # Extract the first word of "$tool_basename", so it can be a program name with args.
7355set dummy $tool_basename; ac_word=$2
7356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7357$as_echo_n "checking for $ac_word... " >&6; }
7358if ${ac_cv_path_EXPR+:} false; then :
7359  $as_echo_n "(cached) " >&6
7360else
7361  case $EXPR in
7362  [\\/]* | ?:[\\/]*)
7363  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7364  ;;
7365  *)
7366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7367for as_dir in $PATH
7368do
7369  IFS=$as_save_IFS
7370  test -z "$as_dir" && as_dir=.
7371    for ac_exec_ext in '' $ac_executable_extensions; do
7372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7373    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7375    break 2
7376  fi
7377done
7378  done
7379IFS=$as_save_IFS
7380
7381  ;;
7382esac
7383fi
7384EXPR=$ac_cv_path_EXPR
7385if test -n "$EXPR"; then
7386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7387$as_echo "$EXPR" >&6; }
7388else
7389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7390$as_echo "no" >&6; }
7391fi
7392
7393
7394          if test "x$EXPR" = x; then
7395            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7396          fi
7397        else
7398          # Otherwise we believe it is a complete path. Use it as it is.
7399          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7400$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7401          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7402$as_echo_n "checking for EXPR... " >&6; }
7403          if test ! -x "$tool_specified"; then
7404            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7405$as_echo "not found" >&6; }
7406            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7407          fi
7408          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7409$as_echo "$tool_specified" >&6; }
7410        fi
7411      fi
7412    fi
7413
7414  fi
7415
7416
7417
7418  if test "x$EXPR" = x; then
7419    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7420  fi
7421
7422
7423
7424
7425
7426  # Publish this variable in the help.
7427
7428
7429  if [ -z "${FILE+x}" ]; then
7430    # The variable is not set by user, try to locate tool using the code snippet
7431    for ac_prog in file
7432do
7433  # Extract the first word of "$ac_prog", so it can be a program name with args.
7434set dummy $ac_prog; ac_word=$2
7435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7436$as_echo_n "checking for $ac_word... " >&6; }
7437if ${ac_cv_path_FILE+:} false; then :
7438  $as_echo_n "(cached) " >&6
7439else
7440  case $FILE in
7441  [\\/]* | ?:[\\/]*)
7442  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7443  ;;
7444  *)
7445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7446for as_dir in $PATH
7447do
7448  IFS=$as_save_IFS
7449  test -z "$as_dir" && as_dir=.
7450    for ac_exec_ext in '' $ac_executable_extensions; do
7451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7452    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7454    break 2
7455  fi
7456done
7457  done
7458IFS=$as_save_IFS
7459
7460  ;;
7461esac
7462fi
7463FILE=$ac_cv_path_FILE
7464if test -n "$FILE"; then
7465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7466$as_echo "$FILE" >&6; }
7467else
7468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7469$as_echo "no" >&6; }
7470fi
7471
7472
7473  test -n "$FILE" && break
7474done
7475
7476  else
7477    # The variable is set, but is it from the command line or the environment?
7478
7479    # Try to remove the string !FILE! from our list.
7480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7482      # If it failed, the variable was not from the command line. Ignore it,
7483      # but warn the user (except for BASH, which is always set by the calling BASH).
7484      if test "xFILE" != xBASH; then
7485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7486$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7487      fi
7488      # Try to locate tool using the code snippet
7489      for ac_prog in file
7490do
7491  # Extract the first word of "$ac_prog", so it can be a program name with args.
7492set dummy $ac_prog; ac_word=$2
7493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7494$as_echo_n "checking for $ac_word... " >&6; }
7495if ${ac_cv_path_FILE+:} false; then :
7496  $as_echo_n "(cached) " >&6
7497else
7498  case $FILE in
7499  [\\/]* | ?:[\\/]*)
7500  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7501  ;;
7502  *)
7503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7504for as_dir in $PATH
7505do
7506  IFS=$as_save_IFS
7507  test -z "$as_dir" && as_dir=.
7508    for ac_exec_ext in '' $ac_executable_extensions; do
7509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7510    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7512    break 2
7513  fi
7514done
7515  done
7516IFS=$as_save_IFS
7517
7518  ;;
7519esac
7520fi
7521FILE=$ac_cv_path_FILE
7522if test -n "$FILE"; then
7523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7524$as_echo "$FILE" >&6; }
7525else
7526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7527$as_echo "no" >&6; }
7528fi
7529
7530
7531  test -n "$FILE" && break
7532done
7533
7534    else
7535      # If it succeeded, then it was overridden by the user. We will use it
7536      # for the tool.
7537
7538      # First remove it from the list of overridden variables, so we can test
7539      # for unknown variables in the end.
7540      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7541
7542      # Check if we try to supply an empty value
7543      if test "x$FILE" = x; then
7544        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7545$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7546        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7547$as_echo_n "checking for FILE... " >&6; }
7548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7549$as_echo "disabled" >&6; }
7550      else
7551        # Check if the provided tool contains a complete path.
7552        tool_specified="$FILE"
7553        tool_basename="${tool_specified##*/}"
7554        if test "x$tool_basename" = "x$tool_specified"; then
7555          # A command without a complete path is provided, search $PATH.
7556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7557$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7558          # Extract the first word of "$tool_basename", so it can be a program name with args.
7559set dummy $tool_basename; ac_word=$2
7560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7561$as_echo_n "checking for $ac_word... " >&6; }
7562if ${ac_cv_path_FILE+:} false; then :
7563  $as_echo_n "(cached) " >&6
7564else
7565  case $FILE in
7566  [\\/]* | ?:[\\/]*)
7567  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7568  ;;
7569  *)
7570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7571for as_dir in $PATH
7572do
7573  IFS=$as_save_IFS
7574  test -z "$as_dir" && as_dir=.
7575    for ac_exec_ext in '' $ac_executable_extensions; do
7576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7577    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7579    break 2
7580  fi
7581done
7582  done
7583IFS=$as_save_IFS
7584
7585  ;;
7586esac
7587fi
7588FILE=$ac_cv_path_FILE
7589if test -n "$FILE"; then
7590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7591$as_echo "$FILE" >&6; }
7592else
7593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7594$as_echo "no" >&6; }
7595fi
7596
7597
7598          if test "x$FILE" = x; then
7599            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7600          fi
7601        else
7602          # Otherwise we believe it is a complete path. Use it as it is.
7603          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7604$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7605          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7606$as_echo_n "checking for FILE... " >&6; }
7607          if test ! -x "$tool_specified"; then
7608            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7609$as_echo "not found" >&6; }
7610            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7611          fi
7612          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7613$as_echo "$tool_specified" >&6; }
7614        fi
7615      fi
7616    fi
7617
7618  fi
7619
7620
7621
7622  if test "x$FILE" = x; then
7623    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7624  fi
7625
7626
7627
7628
7629
7630  # Publish this variable in the help.
7631
7632
7633  if [ -z "${FIND+x}" ]; then
7634    # The variable is not set by user, try to locate tool using the code snippet
7635    for ac_prog in find
7636do
7637  # Extract the first word of "$ac_prog", so it can be a program name with args.
7638set dummy $ac_prog; ac_word=$2
7639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7640$as_echo_n "checking for $ac_word... " >&6; }
7641if ${ac_cv_path_FIND+:} false; then :
7642  $as_echo_n "(cached) " >&6
7643else
7644  case $FIND in
7645  [\\/]* | ?:[\\/]*)
7646  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7647  ;;
7648  *)
7649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7650for as_dir in $PATH
7651do
7652  IFS=$as_save_IFS
7653  test -z "$as_dir" && as_dir=.
7654    for ac_exec_ext in '' $ac_executable_extensions; do
7655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7656    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7658    break 2
7659  fi
7660done
7661  done
7662IFS=$as_save_IFS
7663
7664  ;;
7665esac
7666fi
7667FIND=$ac_cv_path_FIND
7668if test -n "$FIND"; then
7669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7670$as_echo "$FIND" >&6; }
7671else
7672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7673$as_echo "no" >&6; }
7674fi
7675
7676
7677  test -n "$FIND" && break
7678done
7679
7680  else
7681    # The variable is set, but is it from the command line or the environment?
7682
7683    # Try to remove the string !FIND! from our list.
7684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7686      # If it failed, the variable was not from the command line. Ignore it,
7687      # but warn the user (except for BASH, which is always set by the calling BASH).
7688      if test "xFIND" != xBASH; then
7689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7690$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7691      fi
7692      # Try to locate tool using the code snippet
7693      for ac_prog in find
7694do
7695  # Extract the first word of "$ac_prog", so it can be a program name with args.
7696set dummy $ac_prog; ac_word=$2
7697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7698$as_echo_n "checking for $ac_word... " >&6; }
7699if ${ac_cv_path_FIND+:} false; then :
7700  $as_echo_n "(cached) " >&6
7701else
7702  case $FIND in
7703  [\\/]* | ?:[\\/]*)
7704  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7705  ;;
7706  *)
7707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7708for as_dir in $PATH
7709do
7710  IFS=$as_save_IFS
7711  test -z "$as_dir" && as_dir=.
7712    for ac_exec_ext in '' $ac_executable_extensions; do
7713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7714    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7716    break 2
7717  fi
7718done
7719  done
7720IFS=$as_save_IFS
7721
7722  ;;
7723esac
7724fi
7725FIND=$ac_cv_path_FIND
7726if test -n "$FIND"; then
7727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7728$as_echo "$FIND" >&6; }
7729else
7730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7731$as_echo "no" >&6; }
7732fi
7733
7734
7735  test -n "$FIND" && break
7736done
7737
7738    else
7739      # If it succeeded, then it was overridden by the user. We will use it
7740      # for the tool.
7741
7742      # First remove it from the list of overridden variables, so we can test
7743      # for unknown variables in the end.
7744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7745
7746      # Check if we try to supply an empty value
7747      if test "x$FIND" = x; then
7748        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
7749$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
7750        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7751$as_echo_n "checking for FIND... " >&6; }
7752        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7753$as_echo "disabled" >&6; }
7754      else
7755        # Check if the provided tool contains a complete path.
7756        tool_specified="$FIND"
7757        tool_basename="${tool_specified##*/}"
7758        if test "x$tool_basename" = "x$tool_specified"; then
7759          # A command without a complete path is provided, search $PATH.
7760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7761$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7762          # Extract the first word of "$tool_basename", so it can be a program name with args.
7763set dummy $tool_basename; ac_word=$2
7764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7765$as_echo_n "checking for $ac_word... " >&6; }
7766if ${ac_cv_path_FIND+:} false; then :
7767  $as_echo_n "(cached) " >&6
7768else
7769  case $FIND in
7770  [\\/]* | ?:[\\/]*)
7771  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7772  ;;
7773  *)
7774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7775for as_dir in $PATH
7776do
7777  IFS=$as_save_IFS
7778  test -z "$as_dir" && as_dir=.
7779    for ac_exec_ext in '' $ac_executable_extensions; do
7780  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7781    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7783    break 2
7784  fi
7785done
7786  done
7787IFS=$as_save_IFS
7788
7789  ;;
7790esac
7791fi
7792FIND=$ac_cv_path_FIND
7793if test -n "$FIND"; then
7794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7795$as_echo "$FIND" >&6; }
7796else
7797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7798$as_echo "no" >&6; }
7799fi
7800
7801
7802          if test "x$FIND" = x; then
7803            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7804          fi
7805        else
7806          # Otherwise we believe it is a complete path. Use it as it is.
7807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7808$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7809          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7810$as_echo_n "checking for FIND... " >&6; }
7811          if test ! -x "$tool_specified"; then
7812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7813$as_echo "not found" >&6; }
7814            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7815          fi
7816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7817$as_echo "$tool_specified" >&6; }
7818        fi
7819      fi
7820    fi
7821
7822  fi
7823
7824
7825
7826  if test "x$FIND" = x; then
7827    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7828  fi
7829
7830
7831
7832
7833
7834  # Publish this variable in the help.
7835
7836
7837  if [ -z "${HEAD+x}" ]; then
7838    # The variable is not set by user, try to locate tool using the code snippet
7839    for ac_prog in head
7840do
7841  # Extract the first word of "$ac_prog", so it can be a program name with args.
7842set dummy $ac_prog; ac_word=$2
7843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7844$as_echo_n "checking for $ac_word... " >&6; }
7845if ${ac_cv_path_HEAD+:} false; then :
7846  $as_echo_n "(cached) " >&6
7847else
7848  case $HEAD in
7849  [\\/]* | ?:[\\/]*)
7850  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7851  ;;
7852  *)
7853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7854for as_dir in $PATH
7855do
7856  IFS=$as_save_IFS
7857  test -z "$as_dir" && as_dir=.
7858    for ac_exec_ext in '' $ac_executable_extensions; do
7859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7860    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7862    break 2
7863  fi
7864done
7865  done
7866IFS=$as_save_IFS
7867
7868  ;;
7869esac
7870fi
7871HEAD=$ac_cv_path_HEAD
7872if test -n "$HEAD"; then
7873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7874$as_echo "$HEAD" >&6; }
7875else
7876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7877$as_echo "no" >&6; }
7878fi
7879
7880
7881  test -n "$HEAD" && break
7882done
7883
7884  else
7885    # The variable is set, but is it from the command line or the environment?
7886
7887    # Try to remove the string !HEAD! from our list.
7888    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7889    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7890      # If it failed, the variable was not from the command line. Ignore it,
7891      # but warn the user (except for BASH, which is always set by the calling BASH).
7892      if test "xHEAD" != xBASH; then
7893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7894$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7895      fi
7896      # Try to locate tool using the code snippet
7897      for ac_prog in head
7898do
7899  # Extract the first word of "$ac_prog", so it can be a program name with args.
7900set dummy $ac_prog; ac_word=$2
7901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7902$as_echo_n "checking for $ac_word... " >&6; }
7903if ${ac_cv_path_HEAD+:} false; then :
7904  $as_echo_n "(cached) " >&6
7905else
7906  case $HEAD in
7907  [\\/]* | ?:[\\/]*)
7908  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7909  ;;
7910  *)
7911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7912for as_dir in $PATH
7913do
7914  IFS=$as_save_IFS
7915  test -z "$as_dir" && as_dir=.
7916    for ac_exec_ext in '' $ac_executable_extensions; do
7917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7918    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7920    break 2
7921  fi
7922done
7923  done
7924IFS=$as_save_IFS
7925
7926  ;;
7927esac
7928fi
7929HEAD=$ac_cv_path_HEAD
7930if test -n "$HEAD"; then
7931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7932$as_echo "$HEAD" >&6; }
7933else
7934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7935$as_echo "no" >&6; }
7936fi
7937
7938
7939  test -n "$HEAD" && break
7940done
7941
7942    else
7943      # If it succeeded, then it was overridden by the user. We will use it
7944      # for the tool.
7945
7946      # First remove it from the list of overridden variables, so we can test
7947      # for unknown variables in the end.
7948      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7949
7950      # Check if we try to supply an empty value
7951      if test "x$HEAD" = x; then
7952        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
7953$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
7954        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7955$as_echo_n "checking for HEAD... " >&6; }
7956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7957$as_echo "disabled" >&6; }
7958      else
7959        # Check if the provided tool contains a complete path.
7960        tool_specified="$HEAD"
7961        tool_basename="${tool_specified##*/}"
7962        if test "x$tool_basename" = "x$tool_specified"; then
7963          # A command without a complete path is provided, search $PATH.
7964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7965$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7966          # Extract the first word of "$tool_basename", so it can be a program name with args.
7967set dummy $tool_basename; ac_word=$2
7968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7969$as_echo_n "checking for $ac_word... " >&6; }
7970if ${ac_cv_path_HEAD+:} false; then :
7971  $as_echo_n "(cached) " >&6
7972else
7973  case $HEAD in
7974  [\\/]* | ?:[\\/]*)
7975  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7976  ;;
7977  *)
7978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7979for as_dir in $PATH
7980do
7981  IFS=$as_save_IFS
7982  test -z "$as_dir" && as_dir=.
7983    for ac_exec_ext in '' $ac_executable_extensions; do
7984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7985    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7987    break 2
7988  fi
7989done
7990  done
7991IFS=$as_save_IFS
7992
7993  ;;
7994esac
7995fi
7996HEAD=$ac_cv_path_HEAD
7997if test -n "$HEAD"; then
7998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7999$as_echo "$HEAD" >&6; }
8000else
8001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8002$as_echo "no" >&6; }
8003fi
8004
8005
8006          if test "x$HEAD" = x; then
8007            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8008          fi
8009        else
8010          # Otherwise we believe it is a complete path. Use it as it is.
8011          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8012$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8013          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8014$as_echo_n "checking for HEAD... " >&6; }
8015          if test ! -x "$tool_specified"; then
8016            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8017$as_echo "not found" >&6; }
8018            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8019          fi
8020          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8021$as_echo "$tool_specified" >&6; }
8022        fi
8023      fi
8024    fi
8025
8026  fi
8027
8028
8029
8030  if test "x$HEAD" = x; then
8031    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8032  fi
8033
8034
8035
8036
8037
8038  # Publish this variable in the help.
8039
8040
8041  if [ -z "${LN+x}" ]; then
8042    # The variable is not set by user, try to locate tool using the code snippet
8043    for ac_prog in ln
8044do
8045  # Extract the first word of "$ac_prog", so it can be a program name with args.
8046set dummy $ac_prog; ac_word=$2
8047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8048$as_echo_n "checking for $ac_word... " >&6; }
8049if ${ac_cv_path_LN+:} false; then :
8050  $as_echo_n "(cached) " >&6
8051else
8052  case $LN in
8053  [\\/]* | ?:[\\/]*)
8054  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8055  ;;
8056  *)
8057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8058for as_dir in $PATH
8059do
8060  IFS=$as_save_IFS
8061  test -z "$as_dir" && as_dir=.
8062    for ac_exec_ext in '' $ac_executable_extensions; do
8063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8064    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8066    break 2
8067  fi
8068done
8069  done
8070IFS=$as_save_IFS
8071
8072  ;;
8073esac
8074fi
8075LN=$ac_cv_path_LN
8076if test -n "$LN"; then
8077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8078$as_echo "$LN" >&6; }
8079else
8080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8081$as_echo "no" >&6; }
8082fi
8083
8084
8085  test -n "$LN" && break
8086done
8087
8088  else
8089    # The variable is set, but is it from the command line or the environment?
8090
8091    # Try to remove the string !LN! from our list.
8092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8094      # If it failed, the variable was not from the command line. Ignore it,
8095      # but warn the user (except for BASH, which is always set by the calling BASH).
8096      if test "xLN" != xBASH; then
8097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8098$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8099      fi
8100      # Try to locate tool using the code snippet
8101      for ac_prog in ln
8102do
8103  # Extract the first word of "$ac_prog", so it can be a program name with args.
8104set dummy $ac_prog; ac_word=$2
8105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8106$as_echo_n "checking for $ac_word... " >&6; }
8107if ${ac_cv_path_LN+:} false; then :
8108  $as_echo_n "(cached) " >&6
8109else
8110  case $LN in
8111  [\\/]* | ?:[\\/]*)
8112  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8113  ;;
8114  *)
8115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8116for as_dir in $PATH
8117do
8118  IFS=$as_save_IFS
8119  test -z "$as_dir" && as_dir=.
8120    for ac_exec_ext in '' $ac_executable_extensions; do
8121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8122    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8124    break 2
8125  fi
8126done
8127  done
8128IFS=$as_save_IFS
8129
8130  ;;
8131esac
8132fi
8133LN=$ac_cv_path_LN
8134if test -n "$LN"; then
8135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8136$as_echo "$LN" >&6; }
8137else
8138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8139$as_echo "no" >&6; }
8140fi
8141
8142
8143  test -n "$LN" && break
8144done
8145
8146    else
8147      # If it succeeded, then it was overridden by the user. We will use it
8148      # for the tool.
8149
8150      # First remove it from the list of overridden variables, so we can test
8151      # for unknown variables in the end.
8152      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8153
8154      # Check if we try to supply an empty value
8155      if test "x$LN" = x; then
8156        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8157$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8159$as_echo_n "checking for LN... " >&6; }
8160        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8161$as_echo "disabled" >&6; }
8162      else
8163        # Check if the provided tool contains a complete path.
8164        tool_specified="$LN"
8165        tool_basename="${tool_specified##*/}"
8166        if test "x$tool_basename" = "x$tool_specified"; then
8167          # A command without a complete path is provided, search $PATH.
8168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8169$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8170          # Extract the first word of "$tool_basename", so it can be a program name with args.
8171set dummy $tool_basename; ac_word=$2
8172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8173$as_echo_n "checking for $ac_word... " >&6; }
8174if ${ac_cv_path_LN+:} false; then :
8175  $as_echo_n "(cached) " >&6
8176else
8177  case $LN in
8178  [\\/]* | ?:[\\/]*)
8179  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8180  ;;
8181  *)
8182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8183for as_dir in $PATH
8184do
8185  IFS=$as_save_IFS
8186  test -z "$as_dir" && as_dir=.
8187    for ac_exec_ext in '' $ac_executable_extensions; do
8188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8189    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8191    break 2
8192  fi
8193done
8194  done
8195IFS=$as_save_IFS
8196
8197  ;;
8198esac
8199fi
8200LN=$ac_cv_path_LN
8201if test -n "$LN"; then
8202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8203$as_echo "$LN" >&6; }
8204else
8205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8206$as_echo "no" >&6; }
8207fi
8208
8209
8210          if test "x$LN" = x; then
8211            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8212          fi
8213        else
8214          # Otherwise we believe it is a complete path. Use it as it is.
8215          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8216$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8217          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8218$as_echo_n "checking for LN... " >&6; }
8219          if test ! -x "$tool_specified"; then
8220            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8221$as_echo "not found" >&6; }
8222            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8223          fi
8224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8225$as_echo "$tool_specified" >&6; }
8226        fi
8227      fi
8228    fi
8229
8230  fi
8231
8232
8233
8234  if test "x$LN" = x; then
8235    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8236  fi
8237
8238
8239
8240
8241
8242  # Publish this variable in the help.
8243
8244
8245  if [ -z "${LS+x}" ]; then
8246    # The variable is not set by user, try to locate tool using the code snippet
8247    for ac_prog in ls
8248do
8249  # Extract the first word of "$ac_prog", so it can be a program name with args.
8250set dummy $ac_prog; ac_word=$2
8251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8252$as_echo_n "checking for $ac_word... " >&6; }
8253if ${ac_cv_path_LS+:} false; then :
8254  $as_echo_n "(cached) " >&6
8255else
8256  case $LS in
8257  [\\/]* | ?:[\\/]*)
8258  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8259  ;;
8260  *)
8261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8262for as_dir in $PATH
8263do
8264  IFS=$as_save_IFS
8265  test -z "$as_dir" && as_dir=.
8266    for ac_exec_ext in '' $ac_executable_extensions; do
8267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8268    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8270    break 2
8271  fi
8272done
8273  done
8274IFS=$as_save_IFS
8275
8276  ;;
8277esac
8278fi
8279LS=$ac_cv_path_LS
8280if test -n "$LS"; then
8281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8282$as_echo "$LS" >&6; }
8283else
8284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8285$as_echo "no" >&6; }
8286fi
8287
8288
8289  test -n "$LS" && break
8290done
8291
8292  else
8293    # The variable is set, but is it from the command line or the environment?
8294
8295    # Try to remove the string !LS! from our list.
8296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8298      # If it failed, the variable was not from the command line. Ignore it,
8299      # but warn the user (except for BASH, which is always set by the calling BASH).
8300      if test "xLS" != xBASH; then
8301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8302$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8303      fi
8304      # Try to locate tool using the code snippet
8305      for ac_prog in ls
8306do
8307  # Extract the first word of "$ac_prog", so it can be a program name with args.
8308set dummy $ac_prog; ac_word=$2
8309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8310$as_echo_n "checking for $ac_word... " >&6; }
8311if ${ac_cv_path_LS+:} false; then :
8312  $as_echo_n "(cached) " >&6
8313else
8314  case $LS in
8315  [\\/]* | ?:[\\/]*)
8316  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8317  ;;
8318  *)
8319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8320for as_dir in $PATH
8321do
8322  IFS=$as_save_IFS
8323  test -z "$as_dir" && as_dir=.
8324    for ac_exec_ext in '' $ac_executable_extensions; do
8325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8326    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8328    break 2
8329  fi
8330done
8331  done
8332IFS=$as_save_IFS
8333
8334  ;;
8335esac
8336fi
8337LS=$ac_cv_path_LS
8338if test -n "$LS"; then
8339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8340$as_echo "$LS" >&6; }
8341else
8342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343$as_echo "no" >&6; }
8344fi
8345
8346
8347  test -n "$LS" && break
8348done
8349
8350    else
8351      # If it succeeded, then it was overridden by the user. We will use it
8352      # for the tool.
8353
8354      # First remove it from the list of overridden variables, so we can test
8355      # for unknown variables in the end.
8356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8357
8358      # Check if we try to supply an empty value
8359      if test "x$LS" = x; then
8360        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8361$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8363$as_echo_n "checking for LS... " >&6; }
8364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8365$as_echo "disabled" >&6; }
8366      else
8367        # Check if the provided tool contains a complete path.
8368        tool_specified="$LS"
8369        tool_basename="${tool_specified##*/}"
8370        if test "x$tool_basename" = "x$tool_specified"; then
8371          # A command without a complete path is provided, search $PATH.
8372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8373$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8374          # Extract the first word of "$tool_basename", so it can be a program name with args.
8375set dummy $tool_basename; ac_word=$2
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8377$as_echo_n "checking for $ac_word... " >&6; }
8378if ${ac_cv_path_LS+:} false; then :
8379  $as_echo_n "(cached) " >&6
8380else
8381  case $LS in
8382  [\\/]* | ?:[\\/]*)
8383  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8384  ;;
8385  *)
8386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8387for as_dir in $PATH
8388do
8389  IFS=$as_save_IFS
8390  test -z "$as_dir" && as_dir=.
8391    for ac_exec_ext in '' $ac_executable_extensions; do
8392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8393    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8395    break 2
8396  fi
8397done
8398  done
8399IFS=$as_save_IFS
8400
8401  ;;
8402esac
8403fi
8404LS=$ac_cv_path_LS
8405if test -n "$LS"; then
8406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8407$as_echo "$LS" >&6; }
8408else
8409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8410$as_echo "no" >&6; }
8411fi
8412
8413
8414          if test "x$LS" = x; then
8415            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8416          fi
8417        else
8418          # Otherwise we believe it is a complete path. Use it as it is.
8419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8420$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8422$as_echo_n "checking for LS... " >&6; }
8423          if test ! -x "$tool_specified"; then
8424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8425$as_echo "not found" >&6; }
8426            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8427          fi
8428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8429$as_echo "$tool_specified" >&6; }
8430        fi
8431      fi
8432    fi
8433
8434  fi
8435
8436
8437
8438  if test "x$LS" = x; then
8439    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8440  fi
8441
8442
8443
8444
8445
8446  # Publish this variable in the help.
8447
8448
8449  if [ -z "${MKDIR+x}" ]; then
8450    # The variable is not set by user, try to locate tool using the code snippet
8451    for ac_prog in mkdir
8452do
8453  # Extract the first word of "$ac_prog", so it can be a program name with args.
8454set dummy $ac_prog; ac_word=$2
8455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8456$as_echo_n "checking for $ac_word... " >&6; }
8457if ${ac_cv_path_MKDIR+:} false; then :
8458  $as_echo_n "(cached) " >&6
8459else
8460  case $MKDIR in
8461  [\\/]* | ?:[\\/]*)
8462  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8463  ;;
8464  *)
8465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8466for as_dir in $PATH
8467do
8468  IFS=$as_save_IFS
8469  test -z "$as_dir" && as_dir=.
8470    for ac_exec_ext in '' $ac_executable_extensions; do
8471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8472    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8474    break 2
8475  fi
8476done
8477  done
8478IFS=$as_save_IFS
8479
8480  ;;
8481esac
8482fi
8483MKDIR=$ac_cv_path_MKDIR
8484if test -n "$MKDIR"; then
8485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8486$as_echo "$MKDIR" >&6; }
8487else
8488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8489$as_echo "no" >&6; }
8490fi
8491
8492
8493  test -n "$MKDIR" && break
8494done
8495
8496  else
8497    # The variable is set, but is it from the command line or the environment?
8498
8499    # Try to remove the string !MKDIR! from our list.
8500    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8501    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8502      # If it failed, the variable was not from the command line. Ignore it,
8503      # but warn the user (except for BASH, which is always set by the calling BASH).
8504      if test "xMKDIR" != xBASH; then
8505        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8506$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8507      fi
8508      # Try to locate tool using the code snippet
8509      for ac_prog in mkdir
8510do
8511  # Extract the first word of "$ac_prog", so it can be a program name with args.
8512set dummy $ac_prog; ac_word=$2
8513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8514$as_echo_n "checking for $ac_word... " >&6; }
8515if ${ac_cv_path_MKDIR+:} false; then :
8516  $as_echo_n "(cached) " >&6
8517else
8518  case $MKDIR in
8519  [\\/]* | ?:[\\/]*)
8520  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8521  ;;
8522  *)
8523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8524for as_dir in $PATH
8525do
8526  IFS=$as_save_IFS
8527  test -z "$as_dir" && as_dir=.
8528    for ac_exec_ext in '' $ac_executable_extensions; do
8529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8530    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8532    break 2
8533  fi
8534done
8535  done
8536IFS=$as_save_IFS
8537
8538  ;;
8539esac
8540fi
8541MKDIR=$ac_cv_path_MKDIR
8542if test -n "$MKDIR"; then
8543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8544$as_echo "$MKDIR" >&6; }
8545else
8546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8547$as_echo "no" >&6; }
8548fi
8549
8550
8551  test -n "$MKDIR" && break
8552done
8553
8554    else
8555      # If it succeeded, then it was overridden by the user. We will use it
8556      # for the tool.
8557
8558      # First remove it from the list of overridden variables, so we can test
8559      # for unknown variables in the end.
8560      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8561
8562      # Check if we try to supply an empty value
8563      if test "x$MKDIR" = x; then
8564        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8565$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8567$as_echo_n "checking for MKDIR... " >&6; }
8568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8569$as_echo "disabled" >&6; }
8570      else
8571        # Check if the provided tool contains a complete path.
8572        tool_specified="$MKDIR"
8573        tool_basename="${tool_specified##*/}"
8574        if test "x$tool_basename" = "x$tool_specified"; then
8575          # A command without a complete path is provided, search $PATH.
8576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8577$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8578          # Extract the first word of "$tool_basename", so it can be a program name with args.
8579set dummy $tool_basename; ac_word=$2
8580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8581$as_echo_n "checking for $ac_word... " >&6; }
8582if ${ac_cv_path_MKDIR+:} false; then :
8583  $as_echo_n "(cached) " >&6
8584else
8585  case $MKDIR in
8586  [\\/]* | ?:[\\/]*)
8587  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8588  ;;
8589  *)
8590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8591for as_dir in $PATH
8592do
8593  IFS=$as_save_IFS
8594  test -z "$as_dir" && as_dir=.
8595    for ac_exec_ext in '' $ac_executable_extensions; do
8596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8597    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8599    break 2
8600  fi
8601done
8602  done
8603IFS=$as_save_IFS
8604
8605  ;;
8606esac
8607fi
8608MKDIR=$ac_cv_path_MKDIR
8609if test -n "$MKDIR"; then
8610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8611$as_echo "$MKDIR" >&6; }
8612else
8613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8614$as_echo "no" >&6; }
8615fi
8616
8617
8618          if test "x$MKDIR" = x; then
8619            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8620          fi
8621        else
8622          # Otherwise we believe it is a complete path. Use it as it is.
8623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8624$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8625          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8626$as_echo_n "checking for MKDIR... " >&6; }
8627          if test ! -x "$tool_specified"; then
8628            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8629$as_echo "not found" >&6; }
8630            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8631          fi
8632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8633$as_echo "$tool_specified" >&6; }
8634        fi
8635      fi
8636    fi
8637
8638  fi
8639
8640
8641
8642  if test "x$MKDIR" = x; then
8643    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8644  fi
8645
8646
8647
8648
8649
8650  # Publish this variable in the help.
8651
8652
8653  if [ -z "${MKTEMP+x}" ]; then
8654    # The variable is not set by user, try to locate tool using the code snippet
8655    for ac_prog in mktemp
8656do
8657  # Extract the first word of "$ac_prog", so it can be a program name with args.
8658set dummy $ac_prog; ac_word=$2
8659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8660$as_echo_n "checking for $ac_word... " >&6; }
8661if ${ac_cv_path_MKTEMP+:} false; then :
8662  $as_echo_n "(cached) " >&6
8663else
8664  case $MKTEMP in
8665  [\\/]* | ?:[\\/]*)
8666  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8667  ;;
8668  *)
8669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8670for as_dir in $PATH
8671do
8672  IFS=$as_save_IFS
8673  test -z "$as_dir" && as_dir=.
8674    for ac_exec_ext in '' $ac_executable_extensions; do
8675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8676    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8678    break 2
8679  fi
8680done
8681  done
8682IFS=$as_save_IFS
8683
8684  ;;
8685esac
8686fi
8687MKTEMP=$ac_cv_path_MKTEMP
8688if test -n "$MKTEMP"; then
8689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8690$as_echo "$MKTEMP" >&6; }
8691else
8692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8693$as_echo "no" >&6; }
8694fi
8695
8696
8697  test -n "$MKTEMP" && break
8698done
8699
8700  else
8701    # The variable is set, but is it from the command line or the environment?
8702
8703    # Try to remove the string !MKTEMP! from our list.
8704    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8705    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8706      # If it failed, the variable was not from the command line. Ignore it,
8707      # but warn the user (except for BASH, which is always set by the calling BASH).
8708      if test "xMKTEMP" != xBASH; then
8709        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8710$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8711      fi
8712      # Try to locate tool using the code snippet
8713      for ac_prog in mktemp
8714do
8715  # Extract the first word of "$ac_prog", so it can be a program name with args.
8716set dummy $ac_prog; ac_word=$2
8717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8718$as_echo_n "checking for $ac_word... " >&6; }
8719if ${ac_cv_path_MKTEMP+:} false; then :
8720  $as_echo_n "(cached) " >&6
8721else
8722  case $MKTEMP in
8723  [\\/]* | ?:[\\/]*)
8724  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8725  ;;
8726  *)
8727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8728for as_dir in $PATH
8729do
8730  IFS=$as_save_IFS
8731  test -z "$as_dir" && as_dir=.
8732    for ac_exec_ext in '' $ac_executable_extensions; do
8733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8734    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8736    break 2
8737  fi
8738done
8739  done
8740IFS=$as_save_IFS
8741
8742  ;;
8743esac
8744fi
8745MKTEMP=$ac_cv_path_MKTEMP
8746if test -n "$MKTEMP"; then
8747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8748$as_echo "$MKTEMP" >&6; }
8749else
8750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8751$as_echo "no" >&6; }
8752fi
8753
8754
8755  test -n "$MKTEMP" && break
8756done
8757
8758    else
8759      # If it succeeded, then it was overridden by the user. We will use it
8760      # for the tool.
8761
8762      # First remove it from the list of overridden variables, so we can test
8763      # for unknown variables in the end.
8764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8765
8766      # Check if we try to supply an empty value
8767      if test "x$MKTEMP" = x; then
8768        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
8769$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
8770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8771$as_echo_n "checking for MKTEMP... " >&6; }
8772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8773$as_echo "disabled" >&6; }
8774      else
8775        # Check if the provided tool contains a complete path.
8776        tool_specified="$MKTEMP"
8777        tool_basename="${tool_specified##*/}"
8778        if test "x$tool_basename" = "x$tool_specified"; then
8779          # A command without a complete path is provided, search $PATH.
8780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8781$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8782          # Extract the first word of "$tool_basename", so it can be a program name with args.
8783set dummy $tool_basename; ac_word=$2
8784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8785$as_echo_n "checking for $ac_word... " >&6; }
8786if ${ac_cv_path_MKTEMP+:} false; then :
8787  $as_echo_n "(cached) " >&6
8788else
8789  case $MKTEMP in
8790  [\\/]* | ?:[\\/]*)
8791  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8792  ;;
8793  *)
8794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8795for as_dir in $PATH
8796do
8797  IFS=$as_save_IFS
8798  test -z "$as_dir" && as_dir=.
8799    for ac_exec_ext in '' $ac_executable_extensions; do
8800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8801    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8803    break 2
8804  fi
8805done
8806  done
8807IFS=$as_save_IFS
8808
8809  ;;
8810esac
8811fi
8812MKTEMP=$ac_cv_path_MKTEMP
8813if test -n "$MKTEMP"; then
8814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8815$as_echo "$MKTEMP" >&6; }
8816else
8817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8818$as_echo "no" >&6; }
8819fi
8820
8821
8822          if test "x$MKTEMP" = x; then
8823            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8824          fi
8825        else
8826          # Otherwise we believe it is a complete path. Use it as it is.
8827          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8828$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8830$as_echo_n "checking for MKTEMP... " >&6; }
8831          if test ! -x "$tool_specified"; then
8832            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8833$as_echo "not found" >&6; }
8834            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8835          fi
8836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8837$as_echo "$tool_specified" >&6; }
8838        fi
8839      fi
8840    fi
8841
8842  fi
8843
8844
8845
8846  if test "x$MKTEMP" = x; then
8847    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8848  fi
8849
8850
8851
8852
8853
8854  # Publish this variable in the help.
8855
8856
8857  if [ -z "${MV+x}" ]; then
8858    # The variable is not set by user, try to locate tool using the code snippet
8859    for ac_prog in mv
8860do
8861  # Extract the first word of "$ac_prog", so it can be a program name with args.
8862set dummy $ac_prog; ac_word=$2
8863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8864$as_echo_n "checking for $ac_word... " >&6; }
8865if ${ac_cv_path_MV+:} false; then :
8866  $as_echo_n "(cached) " >&6
8867else
8868  case $MV in
8869  [\\/]* | ?:[\\/]*)
8870  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8871  ;;
8872  *)
8873  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8874for as_dir in $PATH
8875do
8876  IFS=$as_save_IFS
8877  test -z "$as_dir" && as_dir=.
8878    for ac_exec_ext in '' $ac_executable_extensions; do
8879  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8880    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8881    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8882    break 2
8883  fi
8884done
8885  done
8886IFS=$as_save_IFS
8887
8888  ;;
8889esac
8890fi
8891MV=$ac_cv_path_MV
8892if test -n "$MV"; then
8893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8894$as_echo "$MV" >&6; }
8895else
8896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8897$as_echo "no" >&6; }
8898fi
8899
8900
8901  test -n "$MV" && break
8902done
8903
8904  else
8905    # The variable is set, but is it from the command line or the environment?
8906
8907    # Try to remove the string !MV! from our list.
8908    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8909    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8910      # If it failed, the variable was not from the command line. Ignore it,
8911      # but warn the user (except for BASH, which is always set by the calling BASH).
8912      if test "xMV" != xBASH; then
8913        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8914$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8915      fi
8916      # Try to locate tool using the code snippet
8917      for ac_prog in mv
8918do
8919  # Extract the first word of "$ac_prog", so it can be a program name with args.
8920set dummy $ac_prog; ac_word=$2
8921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8922$as_echo_n "checking for $ac_word... " >&6; }
8923if ${ac_cv_path_MV+:} false; then :
8924  $as_echo_n "(cached) " >&6
8925else
8926  case $MV in
8927  [\\/]* | ?:[\\/]*)
8928  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8929  ;;
8930  *)
8931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8932for as_dir in $PATH
8933do
8934  IFS=$as_save_IFS
8935  test -z "$as_dir" && as_dir=.
8936    for ac_exec_ext in '' $ac_executable_extensions; do
8937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8938    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8940    break 2
8941  fi
8942done
8943  done
8944IFS=$as_save_IFS
8945
8946  ;;
8947esac
8948fi
8949MV=$ac_cv_path_MV
8950if test -n "$MV"; then
8951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8952$as_echo "$MV" >&6; }
8953else
8954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8955$as_echo "no" >&6; }
8956fi
8957
8958
8959  test -n "$MV" && break
8960done
8961
8962    else
8963      # If it succeeded, then it was overridden by the user. We will use it
8964      # for the tool.
8965
8966      # First remove it from the list of overridden variables, so we can test
8967      # for unknown variables in the end.
8968      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8969
8970      # Check if we try to supply an empty value
8971      if test "x$MV" = x; then
8972        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
8973$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
8974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8975$as_echo_n "checking for MV... " >&6; }
8976        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8977$as_echo "disabled" >&6; }
8978      else
8979        # Check if the provided tool contains a complete path.
8980        tool_specified="$MV"
8981        tool_basename="${tool_specified##*/}"
8982        if test "x$tool_basename" = "x$tool_specified"; then
8983          # A command without a complete path is provided, search $PATH.
8984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8985$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8986          # Extract the first word of "$tool_basename", so it can be a program name with args.
8987set dummy $tool_basename; ac_word=$2
8988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8989$as_echo_n "checking for $ac_word... " >&6; }
8990if ${ac_cv_path_MV+:} false; then :
8991  $as_echo_n "(cached) " >&6
8992else
8993  case $MV in
8994  [\\/]* | ?:[\\/]*)
8995  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8996  ;;
8997  *)
8998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8999for as_dir in $PATH
9000do
9001  IFS=$as_save_IFS
9002  test -z "$as_dir" && as_dir=.
9003    for ac_exec_ext in '' $ac_executable_extensions; do
9004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9005    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9007    break 2
9008  fi
9009done
9010  done
9011IFS=$as_save_IFS
9012
9013  ;;
9014esac
9015fi
9016MV=$ac_cv_path_MV
9017if test -n "$MV"; then
9018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9019$as_echo "$MV" >&6; }
9020else
9021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9022$as_echo "no" >&6; }
9023fi
9024
9025
9026          if test "x$MV" = x; then
9027            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9028          fi
9029        else
9030          # Otherwise we believe it is a complete path. Use it as it is.
9031          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9032$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9033          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9034$as_echo_n "checking for MV... " >&6; }
9035          if test ! -x "$tool_specified"; then
9036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9037$as_echo "not found" >&6; }
9038            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9039          fi
9040          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9041$as_echo "$tool_specified" >&6; }
9042        fi
9043      fi
9044    fi
9045
9046  fi
9047
9048
9049
9050  if test "x$MV" = x; then
9051    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9052  fi
9053
9054
9055
9056
9057
9058  # Publish this variable in the help.
9059
9060
9061  if [ -z "${NAWK+x}" ]; then
9062    # The variable is not set by user, try to locate tool using the code snippet
9063    for ac_prog in nawk gawk awk
9064do
9065  # Extract the first word of "$ac_prog", so it can be a program name with args.
9066set dummy $ac_prog; ac_word=$2
9067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9068$as_echo_n "checking for $ac_word... " >&6; }
9069if ${ac_cv_path_NAWK+:} false; then :
9070  $as_echo_n "(cached) " >&6
9071else
9072  case $NAWK in
9073  [\\/]* | ?:[\\/]*)
9074  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9075  ;;
9076  *)
9077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9078for as_dir in $PATH
9079do
9080  IFS=$as_save_IFS
9081  test -z "$as_dir" && as_dir=.
9082    for ac_exec_ext in '' $ac_executable_extensions; do
9083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9084    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9086    break 2
9087  fi
9088done
9089  done
9090IFS=$as_save_IFS
9091
9092  ;;
9093esac
9094fi
9095NAWK=$ac_cv_path_NAWK
9096if test -n "$NAWK"; then
9097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9098$as_echo "$NAWK" >&6; }
9099else
9100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9101$as_echo "no" >&6; }
9102fi
9103
9104
9105  test -n "$NAWK" && break
9106done
9107
9108  else
9109    # The variable is set, but is it from the command line or the environment?
9110
9111    # Try to remove the string !NAWK! from our list.
9112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9114      # If it failed, the variable was not from the command line. Ignore it,
9115      # but warn the user (except for BASH, which is always set by the calling BASH).
9116      if test "xNAWK" != xBASH; then
9117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9118$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9119      fi
9120      # Try to locate tool using the code snippet
9121      for ac_prog in nawk gawk awk
9122do
9123  # Extract the first word of "$ac_prog", so it can be a program name with args.
9124set dummy $ac_prog; ac_word=$2
9125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9126$as_echo_n "checking for $ac_word... " >&6; }
9127if ${ac_cv_path_NAWK+:} false; then :
9128  $as_echo_n "(cached) " >&6
9129else
9130  case $NAWK in
9131  [\\/]* | ?:[\\/]*)
9132  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9133  ;;
9134  *)
9135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9136for as_dir in $PATH
9137do
9138  IFS=$as_save_IFS
9139  test -z "$as_dir" && as_dir=.
9140    for ac_exec_ext in '' $ac_executable_extensions; do
9141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9142    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9144    break 2
9145  fi
9146done
9147  done
9148IFS=$as_save_IFS
9149
9150  ;;
9151esac
9152fi
9153NAWK=$ac_cv_path_NAWK
9154if test -n "$NAWK"; then
9155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9156$as_echo "$NAWK" >&6; }
9157else
9158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9159$as_echo "no" >&6; }
9160fi
9161
9162
9163  test -n "$NAWK" && break
9164done
9165
9166    else
9167      # If it succeeded, then it was overridden by the user. We will use it
9168      # for the tool.
9169
9170      # First remove it from the list of overridden variables, so we can test
9171      # for unknown variables in the end.
9172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9173
9174      # Check if we try to supply an empty value
9175      if test "x$NAWK" = x; then
9176        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9177$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9178        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9179$as_echo_n "checking for NAWK... " >&6; }
9180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9181$as_echo "disabled" >&6; }
9182      else
9183        # Check if the provided tool contains a complete path.
9184        tool_specified="$NAWK"
9185        tool_basename="${tool_specified##*/}"
9186        if test "x$tool_basename" = "x$tool_specified"; then
9187          # A command without a complete path is provided, search $PATH.
9188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9189$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9190          # Extract the first word of "$tool_basename", so it can be a program name with args.
9191set dummy $tool_basename; ac_word=$2
9192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9193$as_echo_n "checking for $ac_word... " >&6; }
9194if ${ac_cv_path_NAWK+:} false; then :
9195  $as_echo_n "(cached) " >&6
9196else
9197  case $NAWK in
9198  [\\/]* | ?:[\\/]*)
9199  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9200  ;;
9201  *)
9202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9203for as_dir in $PATH
9204do
9205  IFS=$as_save_IFS
9206  test -z "$as_dir" && as_dir=.
9207    for ac_exec_ext in '' $ac_executable_extensions; do
9208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9209    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9211    break 2
9212  fi
9213done
9214  done
9215IFS=$as_save_IFS
9216
9217  ;;
9218esac
9219fi
9220NAWK=$ac_cv_path_NAWK
9221if test -n "$NAWK"; then
9222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9223$as_echo "$NAWK" >&6; }
9224else
9225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9226$as_echo "no" >&6; }
9227fi
9228
9229
9230          if test "x$NAWK" = x; then
9231            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9232          fi
9233        else
9234          # Otherwise we believe it is a complete path. Use it as it is.
9235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9236$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9237          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9238$as_echo_n "checking for NAWK... " >&6; }
9239          if test ! -x "$tool_specified"; then
9240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9241$as_echo "not found" >&6; }
9242            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9243          fi
9244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9245$as_echo "$tool_specified" >&6; }
9246        fi
9247      fi
9248    fi
9249
9250  fi
9251
9252
9253
9254  if test "x$NAWK" = x; then
9255    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9256  fi
9257
9258
9259
9260
9261
9262  # Publish this variable in the help.
9263
9264
9265  if [ -z "${PRINTF+x}" ]; then
9266    # The variable is not set by user, try to locate tool using the code snippet
9267    for ac_prog in printf
9268do
9269  # Extract the first word of "$ac_prog", so it can be a program name with args.
9270set dummy $ac_prog; ac_word=$2
9271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9272$as_echo_n "checking for $ac_word... " >&6; }
9273if ${ac_cv_path_PRINTF+:} false; then :
9274  $as_echo_n "(cached) " >&6
9275else
9276  case $PRINTF in
9277  [\\/]* | ?:[\\/]*)
9278  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9279  ;;
9280  *)
9281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9282for as_dir in $PATH
9283do
9284  IFS=$as_save_IFS
9285  test -z "$as_dir" && as_dir=.
9286    for ac_exec_ext in '' $ac_executable_extensions; do
9287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9288    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9290    break 2
9291  fi
9292done
9293  done
9294IFS=$as_save_IFS
9295
9296  ;;
9297esac
9298fi
9299PRINTF=$ac_cv_path_PRINTF
9300if test -n "$PRINTF"; then
9301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9302$as_echo "$PRINTF" >&6; }
9303else
9304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9305$as_echo "no" >&6; }
9306fi
9307
9308
9309  test -n "$PRINTF" && break
9310done
9311
9312  else
9313    # The variable is set, but is it from the command line or the environment?
9314
9315    # Try to remove the string !PRINTF! from our list.
9316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9318      # If it failed, the variable was not from the command line. Ignore it,
9319      # but warn the user (except for BASH, which is always set by the calling BASH).
9320      if test "xPRINTF" != xBASH; then
9321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9322$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9323      fi
9324      # Try to locate tool using the code snippet
9325      for ac_prog in printf
9326do
9327  # Extract the first word of "$ac_prog", so it can be a program name with args.
9328set dummy $ac_prog; ac_word=$2
9329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9330$as_echo_n "checking for $ac_word... " >&6; }
9331if ${ac_cv_path_PRINTF+:} false; then :
9332  $as_echo_n "(cached) " >&6
9333else
9334  case $PRINTF in
9335  [\\/]* | ?:[\\/]*)
9336  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9337  ;;
9338  *)
9339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9340for as_dir in $PATH
9341do
9342  IFS=$as_save_IFS
9343  test -z "$as_dir" && as_dir=.
9344    for ac_exec_ext in '' $ac_executable_extensions; do
9345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9346    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9348    break 2
9349  fi
9350done
9351  done
9352IFS=$as_save_IFS
9353
9354  ;;
9355esac
9356fi
9357PRINTF=$ac_cv_path_PRINTF
9358if test -n "$PRINTF"; then
9359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9360$as_echo "$PRINTF" >&6; }
9361else
9362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363$as_echo "no" >&6; }
9364fi
9365
9366
9367  test -n "$PRINTF" && break
9368done
9369
9370    else
9371      # If it succeeded, then it was overridden by the user. We will use it
9372      # for the tool.
9373
9374      # First remove it from the list of overridden variables, so we can test
9375      # for unknown variables in the end.
9376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9377
9378      # Check if we try to supply an empty value
9379      if test "x$PRINTF" = x; then
9380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9381$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9383$as_echo_n "checking for PRINTF... " >&6; }
9384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9385$as_echo "disabled" >&6; }
9386      else
9387        # Check if the provided tool contains a complete path.
9388        tool_specified="$PRINTF"
9389        tool_basename="${tool_specified##*/}"
9390        if test "x$tool_basename" = "x$tool_specified"; then
9391          # A command without a complete path is provided, search $PATH.
9392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9393$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9394          # Extract the first word of "$tool_basename", so it can be a program name with args.
9395set dummy $tool_basename; ac_word=$2
9396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9397$as_echo_n "checking for $ac_word... " >&6; }
9398if ${ac_cv_path_PRINTF+:} false; then :
9399  $as_echo_n "(cached) " >&6
9400else
9401  case $PRINTF in
9402  [\\/]* | ?:[\\/]*)
9403  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9404  ;;
9405  *)
9406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9407for as_dir in $PATH
9408do
9409  IFS=$as_save_IFS
9410  test -z "$as_dir" && as_dir=.
9411    for ac_exec_ext in '' $ac_executable_extensions; do
9412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9413    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9415    break 2
9416  fi
9417done
9418  done
9419IFS=$as_save_IFS
9420
9421  ;;
9422esac
9423fi
9424PRINTF=$ac_cv_path_PRINTF
9425if test -n "$PRINTF"; then
9426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9427$as_echo "$PRINTF" >&6; }
9428else
9429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9430$as_echo "no" >&6; }
9431fi
9432
9433
9434          if test "x$PRINTF" = x; then
9435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9436          fi
9437        else
9438          # Otherwise we believe it is a complete path. Use it as it is.
9439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9440$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9442$as_echo_n "checking for PRINTF... " >&6; }
9443          if test ! -x "$tool_specified"; then
9444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9445$as_echo "not found" >&6; }
9446            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9447          fi
9448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9449$as_echo "$tool_specified" >&6; }
9450        fi
9451      fi
9452    fi
9453
9454  fi
9455
9456
9457
9458  if test "x$PRINTF" = x; then
9459    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9460  fi
9461
9462
9463
9464
9465
9466  # Publish this variable in the help.
9467
9468
9469  if [ -z "${RM+x}" ]; then
9470    # The variable is not set by user, try to locate tool using the code snippet
9471    for ac_prog in rm
9472do
9473  # Extract the first word of "$ac_prog", so it can be a program name with args.
9474set dummy $ac_prog; ac_word=$2
9475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9476$as_echo_n "checking for $ac_word... " >&6; }
9477if ${ac_cv_path_RM+:} false; then :
9478  $as_echo_n "(cached) " >&6
9479else
9480  case $RM in
9481  [\\/]* | ?:[\\/]*)
9482  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9483  ;;
9484  *)
9485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9486for as_dir in $PATH
9487do
9488  IFS=$as_save_IFS
9489  test -z "$as_dir" && as_dir=.
9490    for ac_exec_ext in '' $ac_executable_extensions; do
9491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9492    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9494    break 2
9495  fi
9496done
9497  done
9498IFS=$as_save_IFS
9499
9500  ;;
9501esac
9502fi
9503RM=$ac_cv_path_RM
9504if test -n "$RM"; then
9505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9506$as_echo "$RM" >&6; }
9507else
9508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9509$as_echo "no" >&6; }
9510fi
9511
9512
9513  test -n "$RM" && break
9514done
9515
9516  else
9517    # The variable is set, but is it from the command line or the environment?
9518
9519    # Try to remove the string !RM! from our list.
9520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9522      # If it failed, the variable was not from the command line. Ignore it,
9523      # but warn the user (except for BASH, which is always set by the calling BASH).
9524      if test "xRM" != xBASH; then
9525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9526$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9527      fi
9528      # Try to locate tool using the code snippet
9529      for ac_prog in rm
9530do
9531  # Extract the first word of "$ac_prog", so it can be a program name with args.
9532set dummy $ac_prog; ac_word=$2
9533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9534$as_echo_n "checking for $ac_word... " >&6; }
9535if ${ac_cv_path_RM+:} false; then :
9536  $as_echo_n "(cached) " >&6
9537else
9538  case $RM in
9539  [\\/]* | ?:[\\/]*)
9540  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9541  ;;
9542  *)
9543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9544for as_dir in $PATH
9545do
9546  IFS=$as_save_IFS
9547  test -z "$as_dir" && as_dir=.
9548    for ac_exec_ext in '' $ac_executable_extensions; do
9549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9550    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9552    break 2
9553  fi
9554done
9555  done
9556IFS=$as_save_IFS
9557
9558  ;;
9559esac
9560fi
9561RM=$ac_cv_path_RM
9562if test -n "$RM"; then
9563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9564$as_echo "$RM" >&6; }
9565else
9566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9567$as_echo "no" >&6; }
9568fi
9569
9570
9571  test -n "$RM" && break
9572done
9573
9574    else
9575      # If it succeeded, then it was overridden by the user. We will use it
9576      # for the tool.
9577
9578      # First remove it from the list of overridden variables, so we can test
9579      # for unknown variables in the end.
9580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9581
9582      # Check if we try to supply an empty value
9583      if test "x$RM" = x; then
9584        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9585$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9587$as_echo_n "checking for RM... " >&6; }
9588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9589$as_echo "disabled" >&6; }
9590      else
9591        # Check if the provided tool contains a complete path.
9592        tool_specified="$RM"
9593        tool_basename="${tool_specified##*/}"
9594        if test "x$tool_basename" = "x$tool_specified"; then
9595          # A command without a complete path is provided, search $PATH.
9596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9597$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9598          # Extract the first word of "$tool_basename", so it can be a program name with args.
9599set dummy $tool_basename; ac_word=$2
9600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9601$as_echo_n "checking for $ac_word... " >&6; }
9602if ${ac_cv_path_RM+:} false; then :
9603  $as_echo_n "(cached) " >&6
9604else
9605  case $RM in
9606  [\\/]* | ?:[\\/]*)
9607  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9608  ;;
9609  *)
9610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9611for as_dir in $PATH
9612do
9613  IFS=$as_save_IFS
9614  test -z "$as_dir" && as_dir=.
9615    for ac_exec_ext in '' $ac_executable_extensions; do
9616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9617    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9619    break 2
9620  fi
9621done
9622  done
9623IFS=$as_save_IFS
9624
9625  ;;
9626esac
9627fi
9628RM=$ac_cv_path_RM
9629if test -n "$RM"; then
9630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9631$as_echo "$RM" >&6; }
9632else
9633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634$as_echo "no" >&6; }
9635fi
9636
9637
9638          if test "x$RM" = x; then
9639            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9640          fi
9641        else
9642          # Otherwise we believe it is a complete path. Use it as it is.
9643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9644$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9645          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9646$as_echo_n "checking for RM... " >&6; }
9647          if test ! -x "$tool_specified"; then
9648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9649$as_echo "not found" >&6; }
9650            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9651          fi
9652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9653$as_echo "$tool_specified" >&6; }
9654        fi
9655      fi
9656    fi
9657
9658  fi
9659
9660
9661
9662  if test "x$RM" = x; then
9663    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9664  fi
9665
9666
9667
9668
9669
9670  # Publish this variable in the help.
9671
9672
9673  if [ -z "${RMDIR+x}" ]; then
9674    # The variable is not set by user, try to locate tool using the code snippet
9675    for ac_prog in rmdir
9676do
9677  # Extract the first word of "$ac_prog", so it can be a program name with args.
9678set dummy $ac_prog; ac_word=$2
9679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9680$as_echo_n "checking for $ac_word... " >&6; }
9681if ${ac_cv_path_RMDIR+:} false; then :
9682  $as_echo_n "(cached) " >&6
9683else
9684  case $RMDIR in
9685  [\\/]* | ?:[\\/]*)
9686  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9687  ;;
9688  *)
9689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9690for as_dir in $PATH
9691do
9692  IFS=$as_save_IFS
9693  test -z "$as_dir" && as_dir=.
9694    for ac_exec_ext in '' $ac_executable_extensions; do
9695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9696    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9698    break 2
9699  fi
9700done
9701  done
9702IFS=$as_save_IFS
9703
9704  ;;
9705esac
9706fi
9707RMDIR=$ac_cv_path_RMDIR
9708if test -n "$RMDIR"; then
9709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9710$as_echo "$RMDIR" >&6; }
9711else
9712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9713$as_echo "no" >&6; }
9714fi
9715
9716
9717  test -n "$RMDIR" && break
9718done
9719
9720  else
9721    # The variable is set, but is it from the command line or the environment?
9722
9723    # Try to remove the string !RMDIR! from our list.
9724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
9725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9726      # If it failed, the variable was not from the command line. Ignore it,
9727      # but warn the user (except for BASH, which is always set by the calling BASH).
9728      if test "xRMDIR" != xBASH; then
9729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
9730$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
9731      fi
9732      # Try to locate tool using the code snippet
9733      for ac_prog in rmdir
9734do
9735  # Extract the first word of "$ac_prog", so it can be a program name with args.
9736set dummy $ac_prog; ac_word=$2
9737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9738$as_echo_n "checking for $ac_word... " >&6; }
9739if ${ac_cv_path_RMDIR+:} false; then :
9740  $as_echo_n "(cached) " >&6
9741else
9742  case $RMDIR in
9743  [\\/]* | ?:[\\/]*)
9744  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9745  ;;
9746  *)
9747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9748for as_dir in $PATH
9749do
9750  IFS=$as_save_IFS
9751  test -z "$as_dir" && as_dir=.
9752    for ac_exec_ext in '' $ac_executable_extensions; do
9753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9754    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9756    break 2
9757  fi
9758done
9759  done
9760IFS=$as_save_IFS
9761
9762  ;;
9763esac
9764fi
9765RMDIR=$ac_cv_path_RMDIR
9766if test -n "$RMDIR"; then
9767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9768$as_echo "$RMDIR" >&6; }
9769else
9770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9771$as_echo "no" >&6; }
9772fi
9773
9774
9775  test -n "$RMDIR" && break
9776done
9777
9778    else
9779      # If it succeeded, then it was overridden by the user. We will use it
9780      # for the tool.
9781
9782      # First remove it from the list of overridden variables, so we can test
9783      # for unknown variables in the end.
9784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9785
9786      # Check if we try to supply an empty value
9787      if test "x$RMDIR" = x; then
9788        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
9789$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
9790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9791$as_echo_n "checking for RMDIR... " >&6; }
9792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9793$as_echo "disabled" >&6; }
9794      else
9795        # Check if the provided tool contains a complete path.
9796        tool_specified="$RMDIR"
9797        tool_basename="${tool_specified##*/}"
9798        if test "x$tool_basename" = "x$tool_specified"; then
9799          # A command without a complete path is provided, search $PATH.
9800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
9801$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
9802          # Extract the first word of "$tool_basename", so it can be a program name with args.
9803set dummy $tool_basename; ac_word=$2
9804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9805$as_echo_n "checking for $ac_word... " >&6; }
9806if ${ac_cv_path_RMDIR+:} false; then :
9807  $as_echo_n "(cached) " >&6
9808else
9809  case $RMDIR in
9810  [\\/]* | ?:[\\/]*)
9811  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
9812  ;;
9813  *)
9814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9815for as_dir in $PATH
9816do
9817  IFS=$as_save_IFS
9818  test -z "$as_dir" && as_dir=.
9819    for ac_exec_ext in '' $ac_executable_extensions; do
9820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9821    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
9822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9823    break 2
9824  fi
9825done
9826  done
9827IFS=$as_save_IFS
9828
9829  ;;
9830esac
9831fi
9832RMDIR=$ac_cv_path_RMDIR
9833if test -n "$RMDIR"; then
9834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
9835$as_echo "$RMDIR" >&6; }
9836else
9837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9838$as_echo "no" >&6; }
9839fi
9840
9841
9842          if test "x$RMDIR" = x; then
9843            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9844          fi
9845        else
9846          # Otherwise we believe it is a complete path. Use it as it is.
9847          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
9848$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
9849          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
9850$as_echo_n "checking for RMDIR... " >&6; }
9851          if test ! -x "$tool_specified"; then
9852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9853$as_echo "not found" >&6; }
9854            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9855          fi
9856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9857$as_echo "$tool_specified" >&6; }
9858        fi
9859      fi
9860    fi
9861
9862  fi
9863
9864
9865
9866  if test "x$RMDIR" = x; then
9867    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
9868  fi
9869
9870
9871
9872
9873
9874  # Publish this variable in the help.
9875
9876
9877  if [ -z "${SH+x}" ]; then
9878    # The variable is not set by user, try to locate tool using the code snippet
9879    for ac_prog in sh
9880do
9881  # Extract the first word of "$ac_prog", so it can be a program name with args.
9882set dummy $ac_prog; ac_word=$2
9883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9884$as_echo_n "checking for $ac_word... " >&6; }
9885if ${ac_cv_path_SH+:} false; then :
9886  $as_echo_n "(cached) " >&6
9887else
9888  case $SH in
9889  [\\/]* | ?:[\\/]*)
9890  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9891  ;;
9892  *)
9893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9894for as_dir in $PATH
9895do
9896  IFS=$as_save_IFS
9897  test -z "$as_dir" && as_dir=.
9898    for ac_exec_ext in '' $ac_executable_extensions; do
9899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9900    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9902    break 2
9903  fi
9904done
9905  done
9906IFS=$as_save_IFS
9907
9908  ;;
9909esac
9910fi
9911SH=$ac_cv_path_SH
9912if test -n "$SH"; then
9913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9914$as_echo "$SH" >&6; }
9915else
9916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9917$as_echo "no" >&6; }
9918fi
9919
9920
9921  test -n "$SH" && break
9922done
9923
9924  else
9925    # The variable is set, but is it from the command line or the environment?
9926
9927    # Try to remove the string !SH! from our list.
9928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9930      # If it failed, the variable was not from the command line. Ignore it,
9931      # but warn the user (except for BASH, which is always set by the calling BASH).
9932      if test "xSH" != xBASH; then
9933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9934$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9935      fi
9936      # Try to locate tool using the code snippet
9937      for ac_prog in sh
9938do
9939  # Extract the first word of "$ac_prog", so it can be a program name with args.
9940set dummy $ac_prog; ac_word=$2
9941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9942$as_echo_n "checking for $ac_word... " >&6; }
9943if ${ac_cv_path_SH+:} false; then :
9944  $as_echo_n "(cached) " >&6
9945else
9946  case $SH in
9947  [\\/]* | ?:[\\/]*)
9948  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9949  ;;
9950  *)
9951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9952for as_dir in $PATH
9953do
9954  IFS=$as_save_IFS
9955  test -z "$as_dir" && as_dir=.
9956    for ac_exec_ext in '' $ac_executable_extensions; do
9957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9958    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9960    break 2
9961  fi
9962done
9963  done
9964IFS=$as_save_IFS
9965
9966  ;;
9967esac
9968fi
9969SH=$ac_cv_path_SH
9970if test -n "$SH"; then
9971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9972$as_echo "$SH" >&6; }
9973else
9974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9975$as_echo "no" >&6; }
9976fi
9977
9978
9979  test -n "$SH" && break
9980done
9981
9982    else
9983      # If it succeeded, then it was overridden by the user. We will use it
9984      # for the tool.
9985
9986      # First remove it from the list of overridden variables, so we can test
9987      # for unknown variables in the end.
9988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9989
9990      # Check if we try to supply an empty value
9991      if test "x$SH" = x; then
9992        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
9993$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
9994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9995$as_echo_n "checking for SH... " >&6; }
9996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9997$as_echo "disabled" >&6; }
9998      else
9999        # Check if the provided tool contains a complete path.
10000        tool_specified="$SH"
10001        tool_basename="${tool_specified##*/}"
10002        if test "x$tool_basename" = "x$tool_specified"; then
10003          # A command without a complete path is provided, search $PATH.
10004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10005$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10006          # Extract the first word of "$tool_basename", so it can be a program name with args.
10007set dummy $tool_basename; ac_word=$2
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10009$as_echo_n "checking for $ac_word... " >&6; }
10010if ${ac_cv_path_SH+:} false; then :
10011  $as_echo_n "(cached) " >&6
10012else
10013  case $SH in
10014  [\\/]* | ?:[\\/]*)
10015  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10016  ;;
10017  *)
10018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10019for as_dir in $PATH
10020do
10021  IFS=$as_save_IFS
10022  test -z "$as_dir" && as_dir=.
10023    for ac_exec_ext in '' $ac_executable_extensions; do
10024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10025    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10027    break 2
10028  fi
10029done
10030  done
10031IFS=$as_save_IFS
10032
10033  ;;
10034esac
10035fi
10036SH=$ac_cv_path_SH
10037if test -n "$SH"; then
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10039$as_echo "$SH" >&6; }
10040else
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043fi
10044
10045
10046          if test "x$SH" = x; then
10047            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10048          fi
10049        else
10050          # Otherwise we believe it is a complete path. Use it as it is.
10051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10052$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10053          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10054$as_echo_n "checking for SH... " >&6; }
10055          if test ! -x "$tool_specified"; then
10056            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10057$as_echo "not found" >&6; }
10058            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10059          fi
10060          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10061$as_echo "$tool_specified" >&6; }
10062        fi
10063      fi
10064    fi
10065
10066  fi
10067
10068
10069
10070  if test "x$SH" = x; then
10071    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10072  fi
10073
10074
10075
10076
10077
10078  # Publish this variable in the help.
10079
10080
10081  if [ -z "${SORT+x}" ]; then
10082    # The variable is not set by user, try to locate tool using the code snippet
10083    for ac_prog in sort
10084do
10085  # Extract the first word of "$ac_prog", so it can be a program name with args.
10086set dummy $ac_prog; ac_word=$2
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10088$as_echo_n "checking for $ac_word... " >&6; }
10089if ${ac_cv_path_SORT+:} false; then :
10090  $as_echo_n "(cached) " >&6
10091else
10092  case $SORT in
10093  [\\/]* | ?:[\\/]*)
10094  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10095  ;;
10096  *)
10097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10098for as_dir in $PATH
10099do
10100  IFS=$as_save_IFS
10101  test -z "$as_dir" && as_dir=.
10102    for ac_exec_ext in '' $ac_executable_extensions; do
10103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10104    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10106    break 2
10107  fi
10108done
10109  done
10110IFS=$as_save_IFS
10111
10112  ;;
10113esac
10114fi
10115SORT=$ac_cv_path_SORT
10116if test -n "$SORT"; then
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10118$as_echo "$SORT" >&6; }
10119else
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
10122fi
10123
10124
10125  test -n "$SORT" && break
10126done
10127
10128  else
10129    # The variable is set, but is it from the command line or the environment?
10130
10131    # Try to remove the string !SORT! from our list.
10132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10134      # If it failed, the variable was not from the command line. Ignore it,
10135      # but warn the user (except for BASH, which is always set by the calling BASH).
10136      if test "xSORT" != xBASH; then
10137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10138$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10139      fi
10140      # Try to locate tool using the code snippet
10141      for ac_prog in sort
10142do
10143  # Extract the first word of "$ac_prog", so it can be a program name with args.
10144set dummy $ac_prog; ac_word=$2
10145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10146$as_echo_n "checking for $ac_word... " >&6; }
10147if ${ac_cv_path_SORT+:} false; then :
10148  $as_echo_n "(cached) " >&6
10149else
10150  case $SORT in
10151  [\\/]* | ?:[\\/]*)
10152  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10153  ;;
10154  *)
10155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10156for as_dir in $PATH
10157do
10158  IFS=$as_save_IFS
10159  test -z "$as_dir" && as_dir=.
10160    for ac_exec_ext in '' $ac_executable_extensions; do
10161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10162    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10164    break 2
10165  fi
10166done
10167  done
10168IFS=$as_save_IFS
10169
10170  ;;
10171esac
10172fi
10173SORT=$ac_cv_path_SORT
10174if test -n "$SORT"; then
10175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10176$as_echo "$SORT" >&6; }
10177else
10178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10179$as_echo "no" >&6; }
10180fi
10181
10182
10183  test -n "$SORT" && break
10184done
10185
10186    else
10187      # If it succeeded, then it was overridden by the user. We will use it
10188      # for the tool.
10189
10190      # First remove it from the list of overridden variables, so we can test
10191      # for unknown variables in the end.
10192      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10193
10194      # Check if we try to supply an empty value
10195      if test "x$SORT" = x; then
10196        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10197$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10198        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10199$as_echo_n "checking for SORT... " >&6; }
10200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10201$as_echo "disabled" >&6; }
10202      else
10203        # Check if the provided tool contains a complete path.
10204        tool_specified="$SORT"
10205        tool_basename="${tool_specified##*/}"
10206        if test "x$tool_basename" = "x$tool_specified"; then
10207          # A command without a complete path is provided, search $PATH.
10208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10209$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10210          # Extract the first word of "$tool_basename", so it can be a program name with args.
10211set dummy $tool_basename; ac_word=$2
10212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10213$as_echo_n "checking for $ac_word... " >&6; }
10214if ${ac_cv_path_SORT+:} false; then :
10215  $as_echo_n "(cached) " >&6
10216else
10217  case $SORT in
10218  [\\/]* | ?:[\\/]*)
10219  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10220  ;;
10221  *)
10222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10223for as_dir in $PATH
10224do
10225  IFS=$as_save_IFS
10226  test -z "$as_dir" && as_dir=.
10227    for ac_exec_ext in '' $ac_executable_extensions; do
10228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10229    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10231    break 2
10232  fi
10233done
10234  done
10235IFS=$as_save_IFS
10236
10237  ;;
10238esac
10239fi
10240SORT=$ac_cv_path_SORT
10241if test -n "$SORT"; then
10242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10243$as_echo "$SORT" >&6; }
10244else
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246$as_echo "no" >&6; }
10247fi
10248
10249
10250          if test "x$SORT" = x; then
10251            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10252          fi
10253        else
10254          # Otherwise we believe it is a complete path. Use it as it is.
10255          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10256$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10257          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10258$as_echo_n "checking for SORT... " >&6; }
10259          if test ! -x "$tool_specified"; then
10260            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10261$as_echo "not found" >&6; }
10262            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10263          fi
10264          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10265$as_echo "$tool_specified" >&6; }
10266        fi
10267      fi
10268    fi
10269
10270  fi
10271
10272
10273
10274  if test "x$SORT" = x; then
10275    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10276  fi
10277
10278
10279
10280
10281
10282  # Publish this variable in the help.
10283
10284
10285  if [ -z "${TAIL+x}" ]; then
10286    # The variable is not set by user, try to locate tool using the code snippet
10287    for ac_prog in tail
10288do
10289  # Extract the first word of "$ac_prog", so it can be a program name with args.
10290set dummy $ac_prog; ac_word=$2
10291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10292$as_echo_n "checking for $ac_word... " >&6; }
10293if ${ac_cv_path_TAIL+:} false; then :
10294  $as_echo_n "(cached) " >&6
10295else
10296  case $TAIL in
10297  [\\/]* | ?:[\\/]*)
10298  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10299  ;;
10300  *)
10301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10302for as_dir in $PATH
10303do
10304  IFS=$as_save_IFS
10305  test -z "$as_dir" && as_dir=.
10306    for ac_exec_ext in '' $ac_executable_extensions; do
10307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10308    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10310    break 2
10311  fi
10312done
10313  done
10314IFS=$as_save_IFS
10315
10316  ;;
10317esac
10318fi
10319TAIL=$ac_cv_path_TAIL
10320if test -n "$TAIL"; then
10321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10322$as_echo "$TAIL" >&6; }
10323else
10324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10325$as_echo "no" >&6; }
10326fi
10327
10328
10329  test -n "$TAIL" && break
10330done
10331
10332  else
10333    # The variable is set, but is it from the command line or the environment?
10334
10335    # Try to remove the string !TAIL! from our list.
10336    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10337    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10338      # If it failed, the variable was not from the command line. Ignore it,
10339      # but warn the user (except for BASH, which is always set by the calling BASH).
10340      if test "xTAIL" != xBASH; then
10341        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10342$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10343      fi
10344      # Try to locate tool using the code snippet
10345      for ac_prog in tail
10346do
10347  # Extract the first word of "$ac_prog", so it can be a program name with args.
10348set dummy $ac_prog; ac_word=$2
10349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10350$as_echo_n "checking for $ac_word... " >&6; }
10351if ${ac_cv_path_TAIL+:} false; then :
10352  $as_echo_n "(cached) " >&6
10353else
10354  case $TAIL in
10355  [\\/]* | ?:[\\/]*)
10356  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10357  ;;
10358  *)
10359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10360for as_dir in $PATH
10361do
10362  IFS=$as_save_IFS
10363  test -z "$as_dir" && as_dir=.
10364    for ac_exec_ext in '' $ac_executable_extensions; do
10365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10366    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10368    break 2
10369  fi
10370done
10371  done
10372IFS=$as_save_IFS
10373
10374  ;;
10375esac
10376fi
10377TAIL=$ac_cv_path_TAIL
10378if test -n "$TAIL"; then
10379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10380$as_echo "$TAIL" >&6; }
10381else
10382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10383$as_echo "no" >&6; }
10384fi
10385
10386
10387  test -n "$TAIL" && break
10388done
10389
10390    else
10391      # If it succeeded, then it was overridden by the user. We will use it
10392      # for the tool.
10393
10394      # First remove it from the list of overridden variables, so we can test
10395      # for unknown variables in the end.
10396      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10397
10398      # Check if we try to supply an empty value
10399      if test "x$TAIL" = x; then
10400        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10401$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10403$as_echo_n "checking for TAIL... " >&6; }
10404        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10405$as_echo "disabled" >&6; }
10406      else
10407        # Check if the provided tool contains a complete path.
10408        tool_specified="$TAIL"
10409        tool_basename="${tool_specified##*/}"
10410        if test "x$tool_basename" = "x$tool_specified"; then
10411          # A command without a complete path is provided, search $PATH.
10412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10413$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10414          # Extract the first word of "$tool_basename", so it can be a program name with args.
10415set dummy $tool_basename; ac_word=$2
10416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10417$as_echo_n "checking for $ac_word... " >&6; }
10418if ${ac_cv_path_TAIL+:} false; then :
10419  $as_echo_n "(cached) " >&6
10420else
10421  case $TAIL in
10422  [\\/]* | ?:[\\/]*)
10423  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10424  ;;
10425  *)
10426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10427for as_dir in $PATH
10428do
10429  IFS=$as_save_IFS
10430  test -z "$as_dir" && as_dir=.
10431    for ac_exec_ext in '' $ac_executable_extensions; do
10432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10433    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10435    break 2
10436  fi
10437done
10438  done
10439IFS=$as_save_IFS
10440
10441  ;;
10442esac
10443fi
10444TAIL=$ac_cv_path_TAIL
10445if test -n "$TAIL"; then
10446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10447$as_echo "$TAIL" >&6; }
10448else
10449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10450$as_echo "no" >&6; }
10451fi
10452
10453
10454          if test "x$TAIL" = x; then
10455            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10456          fi
10457        else
10458          # Otherwise we believe it is a complete path. Use it as it is.
10459          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10460$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10461          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10462$as_echo_n "checking for TAIL... " >&6; }
10463          if test ! -x "$tool_specified"; then
10464            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10465$as_echo "not found" >&6; }
10466            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10467          fi
10468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10469$as_echo "$tool_specified" >&6; }
10470        fi
10471      fi
10472    fi
10473
10474  fi
10475
10476
10477
10478  if test "x$TAIL" = x; then
10479    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10480  fi
10481
10482
10483
10484
10485
10486  # Publish this variable in the help.
10487
10488
10489  if [ -z "${TAR+x}" ]; then
10490    # The variable is not set by user, try to locate tool using the code snippet
10491    for ac_prog in tar
10492do
10493  # Extract the first word of "$ac_prog", so it can be a program name with args.
10494set dummy $ac_prog; ac_word=$2
10495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10496$as_echo_n "checking for $ac_word... " >&6; }
10497if ${ac_cv_path_TAR+:} false; then :
10498  $as_echo_n "(cached) " >&6
10499else
10500  case $TAR in
10501  [\\/]* | ?:[\\/]*)
10502  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10503  ;;
10504  *)
10505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10506for as_dir in $PATH
10507do
10508  IFS=$as_save_IFS
10509  test -z "$as_dir" && as_dir=.
10510    for ac_exec_ext in '' $ac_executable_extensions; do
10511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10512    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10514    break 2
10515  fi
10516done
10517  done
10518IFS=$as_save_IFS
10519
10520  ;;
10521esac
10522fi
10523TAR=$ac_cv_path_TAR
10524if test -n "$TAR"; then
10525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10526$as_echo "$TAR" >&6; }
10527else
10528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10529$as_echo "no" >&6; }
10530fi
10531
10532
10533  test -n "$TAR" && break
10534done
10535
10536  else
10537    # The variable is set, but is it from the command line or the environment?
10538
10539    # Try to remove the string !TAR! from our list.
10540    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10541    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10542      # If it failed, the variable was not from the command line. Ignore it,
10543      # but warn the user (except for BASH, which is always set by the calling BASH).
10544      if test "xTAR" != xBASH; then
10545        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10546$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10547      fi
10548      # Try to locate tool using the code snippet
10549      for ac_prog in tar
10550do
10551  # Extract the first word of "$ac_prog", so it can be a program name with args.
10552set dummy $ac_prog; ac_word=$2
10553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10554$as_echo_n "checking for $ac_word... " >&6; }
10555if ${ac_cv_path_TAR+:} false; then :
10556  $as_echo_n "(cached) " >&6
10557else
10558  case $TAR in
10559  [\\/]* | ?:[\\/]*)
10560  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10561  ;;
10562  *)
10563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10564for as_dir in $PATH
10565do
10566  IFS=$as_save_IFS
10567  test -z "$as_dir" && as_dir=.
10568    for ac_exec_ext in '' $ac_executable_extensions; do
10569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10570    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10572    break 2
10573  fi
10574done
10575  done
10576IFS=$as_save_IFS
10577
10578  ;;
10579esac
10580fi
10581TAR=$ac_cv_path_TAR
10582if test -n "$TAR"; then
10583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10584$as_echo "$TAR" >&6; }
10585else
10586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587$as_echo "no" >&6; }
10588fi
10589
10590
10591  test -n "$TAR" && break
10592done
10593
10594    else
10595      # If it succeeded, then it was overridden by the user. We will use it
10596      # for the tool.
10597
10598      # First remove it from the list of overridden variables, so we can test
10599      # for unknown variables in the end.
10600      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10601
10602      # Check if we try to supply an empty value
10603      if test "x$TAR" = x; then
10604        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10605$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10606        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10607$as_echo_n "checking for TAR... " >&6; }
10608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10609$as_echo "disabled" >&6; }
10610      else
10611        # Check if the provided tool contains a complete path.
10612        tool_specified="$TAR"
10613        tool_basename="${tool_specified##*/}"
10614        if test "x$tool_basename" = "x$tool_specified"; then
10615          # A command without a complete path is provided, search $PATH.
10616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10617$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10618          # Extract the first word of "$tool_basename", so it can be a program name with args.
10619set dummy $tool_basename; ac_word=$2
10620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10621$as_echo_n "checking for $ac_word... " >&6; }
10622if ${ac_cv_path_TAR+:} false; then :
10623  $as_echo_n "(cached) " >&6
10624else
10625  case $TAR in
10626  [\\/]* | ?:[\\/]*)
10627  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10628  ;;
10629  *)
10630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10631for as_dir in $PATH
10632do
10633  IFS=$as_save_IFS
10634  test -z "$as_dir" && as_dir=.
10635    for ac_exec_ext in '' $ac_executable_extensions; do
10636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10637    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10639    break 2
10640  fi
10641done
10642  done
10643IFS=$as_save_IFS
10644
10645  ;;
10646esac
10647fi
10648TAR=$ac_cv_path_TAR
10649if test -n "$TAR"; then
10650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10651$as_echo "$TAR" >&6; }
10652else
10653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10654$as_echo "no" >&6; }
10655fi
10656
10657
10658          if test "x$TAR" = x; then
10659            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10660          fi
10661        else
10662          # Otherwise we believe it is a complete path. Use it as it is.
10663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
10664$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
10665          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10666$as_echo_n "checking for TAR... " >&6; }
10667          if test ! -x "$tool_specified"; then
10668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10669$as_echo "not found" >&6; }
10670            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
10671          fi
10672          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10673$as_echo "$tool_specified" >&6; }
10674        fi
10675      fi
10676    fi
10677
10678  fi
10679
10680
10681
10682  if test "x$TAR" = x; then
10683    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
10684  fi
10685
10686
10687
10688
10689
10690  # Publish this variable in the help.
10691
10692
10693  if [ -z "${TEE+x}" ]; then
10694    # The variable is not set by user, try to locate tool using the code snippet
10695    for ac_prog in tee
10696do
10697  # Extract the first word of "$ac_prog", so it can be a program name with args.
10698set dummy $ac_prog; ac_word=$2
10699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10700$as_echo_n "checking for $ac_word... " >&6; }
10701if ${ac_cv_path_TEE+:} false; then :
10702  $as_echo_n "(cached) " >&6
10703else
10704  case $TEE in
10705  [\\/]* | ?:[\\/]*)
10706  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10707  ;;
10708  *)
10709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10710for as_dir in $PATH
10711do
10712  IFS=$as_save_IFS
10713  test -z "$as_dir" && as_dir=.
10714    for ac_exec_ext in '' $ac_executable_extensions; do
10715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10716    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10718    break 2
10719  fi
10720done
10721  done
10722IFS=$as_save_IFS
10723
10724  ;;
10725esac
10726fi
10727TEE=$ac_cv_path_TEE
10728if test -n "$TEE"; then
10729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10730$as_echo "$TEE" >&6; }
10731else
10732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10733$as_echo "no" >&6; }
10734fi
10735
10736
10737  test -n "$TEE" && break
10738done
10739
10740  else
10741    # The variable is set, but is it from the command line or the environment?
10742
10743    # Try to remove the string !TEE! from our list.
10744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10746      # If it failed, the variable was not from the command line. Ignore it,
10747      # but warn the user (except for BASH, which is always set by the calling BASH).
10748      if test "xTEE" != xBASH; then
10749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10750$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10751      fi
10752      # Try to locate tool using the code snippet
10753      for ac_prog in tee
10754do
10755  # Extract the first word of "$ac_prog", so it can be a program name with args.
10756set dummy $ac_prog; ac_word=$2
10757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10758$as_echo_n "checking for $ac_word... " >&6; }
10759if ${ac_cv_path_TEE+:} false; then :
10760  $as_echo_n "(cached) " >&6
10761else
10762  case $TEE in
10763  [\\/]* | ?:[\\/]*)
10764  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10765  ;;
10766  *)
10767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10768for as_dir in $PATH
10769do
10770  IFS=$as_save_IFS
10771  test -z "$as_dir" && as_dir=.
10772    for ac_exec_ext in '' $ac_executable_extensions; do
10773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10774    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10776    break 2
10777  fi
10778done
10779  done
10780IFS=$as_save_IFS
10781
10782  ;;
10783esac
10784fi
10785TEE=$ac_cv_path_TEE
10786if test -n "$TEE"; then
10787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10788$as_echo "$TEE" >&6; }
10789else
10790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10791$as_echo "no" >&6; }
10792fi
10793
10794
10795  test -n "$TEE" && break
10796done
10797
10798    else
10799      # If it succeeded, then it was overridden by the user. We will use it
10800      # for the tool.
10801
10802      # First remove it from the list of overridden variables, so we can test
10803      # for unknown variables in the end.
10804      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10805
10806      # Check if we try to supply an empty value
10807      if test "x$TEE" = x; then
10808        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
10809$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
10810        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10811$as_echo_n "checking for TEE... " >&6; }
10812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10813$as_echo "disabled" >&6; }
10814      else
10815        # Check if the provided tool contains a complete path.
10816        tool_specified="$TEE"
10817        tool_basename="${tool_specified##*/}"
10818        if test "x$tool_basename" = "x$tool_specified"; then
10819          # A command without a complete path is provided, search $PATH.
10820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10821$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10822          # Extract the first word of "$tool_basename", so it can be a program name with args.
10823set dummy $tool_basename; ac_word=$2
10824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10825$as_echo_n "checking for $ac_word... " >&6; }
10826if ${ac_cv_path_TEE+:} false; then :
10827  $as_echo_n "(cached) " >&6
10828else
10829  case $TEE in
10830  [\\/]* | ?:[\\/]*)
10831  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10832  ;;
10833  *)
10834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10835for as_dir in $PATH
10836do
10837  IFS=$as_save_IFS
10838  test -z "$as_dir" && as_dir=.
10839    for ac_exec_ext in '' $ac_executable_extensions; do
10840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10841    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10843    break 2
10844  fi
10845done
10846  done
10847IFS=$as_save_IFS
10848
10849  ;;
10850esac
10851fi
10852TEE=$ac_cv_path_TEE
10853if test -n "$TEE"; then
10854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10855$as_echo "$TEE" >&6; }
10856else
10857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10858$as_echo "no" >&6; }
10859fi
10860
10861
10862          if test "x$TEE" = x; then
10863            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10864          fi
10865        else
10866          # Otherwise we believe it is a complete path. Use it as it is.
10867          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10868$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10869          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10870$as_echo_n "checking for TEE... " >&6; }
10871          if test ! -x "$tool_specified"; then
10872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10873$as_echo "not found" >&6; }
10874            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10875          fi
10876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10877$as_echo "$tool_specified" >&6; }
10878        fi
10879      fi
10880    fi
10881
10882  fi
10883
10884
10885
10886  if test "x$TEE" = x; then
10887    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10888  fi
10889
10890
10891
10892
10893
10894  # Publish this variable in the help.
10895
10896
10897  if [ -z "${TOUCH+x}" ]; then
10898    # The variable is not set by user, try to locate tool using the code snippet
10899    for ac_prog in touch
10900do
10901  # Extract the first word of "$ac_prog", so it can be a program name with args.
10902set dummy $ac_prog; ac_word=$2
10903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10904$as_echo_n "checking for $ac_word... " >&6; }
10905if ${ac_cv_path_TOUCH+:} false; then :
10906  $as_echo_n "(cached) " >&6
10907else
10908  case $TOUCH in
10909  [\\/]* | ?:[\\/]*)
10910  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10911  ;;
10912  *)
10913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10914for as_dir in $PATH
10915do
10916  IFS=$as_save_IFS
10917  test -z "$as_dir" && as_dir=.
10918    for ac_exec_ext in '' $ac_executable_extensions; do
10919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10920    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10922    break 2
10923  fi
10924done
10925  done
10926IFS=$as_save_IFS
10927
10928  ;;
10929esac
10930fi
10931TOUCH=$ac_cv_path_TOUCH
10932if test -n "$TOUCH"; then
10933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10934$as_echo "$TOUCH" >&6; }
10935else
10936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10937$as_echo "no" >&6; }
10938fi
10939
10940
10941  test -n "$TOUCH" && break
10942done
10943
10944  else
10945    # The variable is set, but is it from the command line or the environment?
10946
10947    # Try to remove the string !TOUCH! from our list.
10948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10950      # If it failed, the variable was not from the command line. Ignore it,
10951      # but warn the user (except for BASH, which is always set by the calling BASH).
10952      if test "xTOUCH" != xBASH; then
10953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10954$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10955      fi
10956      # Try to locate tool using the code snippet
10957      for ac_prog in touch
10958do
10959  # Extract the first word of "$ac_prog", so it can be a program name with args.
10960set dummy $ac_prog; ac_word=$2
10961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10962$as_echo_n "checking for $ac_word... " >&6; }
10963if ${ac_cv_path_TOUCH+:} false; then :
10964  $as_echo_n "(cached) " >&6
10965else
10966  case $TOUCH in
10967  [\\/]* | ?:[\\/]*)
10968  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10969  ;;
10970  *)
10971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10972for as_dir in $PATH
10973do
10974  IFS=$as_save_IFS
10975  test -z "$as_dir" && as_dir=.
10976    for ac_exec_ext in '' $ac_executable_extensions; do
10977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10978    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10980    break 2
10981  fi
10982done
10983  done
10984IFS=$as_save_IFS
10985
10986  ;;
10987esac
10988fi
10989TOUCH=$ac_cv_path_TOUCH
10990if test -n "$TOUCH"; then
10991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10992$as_echo "$TOUCH" >&6; }
10993else
10994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995$as_echo "no" >&6; }
10996fi
10997
10998
10999  test -n "$TOUCH" && break
11000done
11001
11002    else
11003      # If it succeeded, then it was overridden by the user. We will use it
11004      # for the tool.
11005
11006      # First remove it from the list of overridden variables, so we can test
11007      # for unknown variables in the end.
11008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11009
11010      # Check if we try to supply an empty value
11011      if test "x$TOUCH" = x; then
11012        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11013$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11015$as_echo_n "checking for TOUCH... " >&6; }
11016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11017$as_echo "disabled" >&6; }
11018      else
11019        # Check if the provided tool contains a complete path.
11020        tool_specified="$TOUCH"
11021        tool_basename="${tool_specified##*/}"
11022        if test "x$tool_basename" = "x$tool_specified"; then
11023          # A command without a complete path is provided, search $PATH.
11024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11025$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11026          # Extract the first word of "$tool_basename", so it can be a program name with args.
11027set dummy $tool_basename; ac_word=$2
11028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11029$as_echo_n "checking for $ac_word... " >&6; }
11030if ${ac_cv_path_TOUCH+:} false; then :
11031  $as_echo_n "(cached) " >&6
11032else
11033  case $TOUCH in
11034  [\\/]* | ?:[\\/]*)
11035  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11036  ;;
11037  *)
11038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11039for as_dir in $PATH
11040do
11041  IFS=$as_save_IFS
11042  test -z "$as_dir" && as_dir=.
11043    for ac_exec_ext in '' $ac_executable_extensions; do
11044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11045    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11047    break 2
11048  fi
11049done
11050  done
11051IFS=$as_save_IFS
11052
11053  ;;
11054esac
11055fi
11056TOUCH=$ac_cv_path_TOUCH
11057if test -n "$TOUCH"; then
11058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11059$as_echo "$TOUCH" >&6; }
11060else
11061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11062$as_echo "no" >&6; }
11063fi
11064
11065
11066          if test "x$TOUCH" = x; then
11067            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11068          fi
11069        else
11070          # Otherwise we believe it is a complete path. Use it as it is.
11071          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11072$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11073          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11074$as_echo_n "checking for TOUCH... " >&6; }
11075          if test ! -x "$tool_specified"; then
11076            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11077$as_echo "not found" >&6; }
11078            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11079          fi
11080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11081$as_echo "$tool_specified" >&6; }
11082        fi
11083      fi
11084    fi
11085
11086  fi
11087
11088
11089
11090  if test "x$TOUCH" = x; then
11091    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11092  fi
11093
11094
11095
11096
11097
11098  # Publish this variable in the help.
11099
11100
11101  if [ -z "${TR+x}" ]; then
11102    # The variable is not set by user, try to locate tool using the code snippet
11103    for ac_prog in tr
11104do
11105  # Extract the first word of "$ac_prog", so it can be a program name with args.
11106set dummy $ac_prog; ac_word=$2
11107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11108$as_echo_n "checking for $ac_word... " >&6; }
11109if ${ac_cv_path_TR+:} false; then :
11110  $as_echo_n "(cached) " >&6
11111else
11112  case $TR in
11113  [\\/]* | ?:[\\/]*)
11114  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11115  ;;
11116  *)
11117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11118for as_dir in $PATH
11119do
11120  IFS=$as_save_IFS
11121  test -z "$as_dir" && as_dir=.
11122    for ac_exec_ext in '' $ac_executable_extensions; do
11123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11124    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11126    break 2
11127  fi
11128done
11129  done
11130IFS=$as_save_IFS
11131
11132  ;;
11133esac
11134fi
11135TR=$ac_cv_path_TR
11136if test -n "$TR"; then
11137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11138$as_echo "$TR" >&6; }
11139else
11140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11141$as_echo "no" >&6; }
11142fi
11143
11144
11145  test -n "$TR" && break
11146done
11147
11148  else
11149    # The variable is set, but is it from the command line or the environment?
11150
11151    # Try to remove the string !TR! from our list.
11152    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11153    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11154      # If it failed, the variable was not from the command line. Ignore it,
11155      # but warn the user (except for BASH, which is always set by the calling BASH).
11156      if test "xTR" != xBASH; then
11157        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11158$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11159      fi
11160      # Try to locate tool using the code snippet
11161      for ac_prog in tr
11162do
11163  # Extract the first word of "$ac_prog", so it can be a program name with args.
11164set dummy $ac_prog; ac_word=$2
11165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11166$as_echo_n "checking for $ac_word... " >&6; }
11167if ${ac_cv_path_TR+:} false; then :
11168  $as_echo_n "(cached) " >&6
11169else
11170  case $TR in
11171  [\\/]* | ?:[\\/]*)
11172  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11173  ;;
11174  *)
11175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11176for as_dir in $PATH
11177do
11178  IFS=$as_save_IFS
11179  test -z "$as_dir" && as_dir=.
11180    for ac_exec_ext in '' $ac_executable_extensions; do
11181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11182    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11184    break 2
11185  fi
11186done
11187  done
11188IFS=$as_save_IFS
11189
11190  ;;
11191esac
11192fi
11193TR=$ac_cv_path_TR
11194if test -n "$TR"; then
11195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11196$as_echo "$TR" >&6; }
11197else
11198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11199$as_echo "no" >&6; }
11200fi
11201
11202
11203  test -n "$TR" && break
11204done
11205
11206    else
11207      # If it succeeded, then it was overridden by the user. We will use it
11208      # for the tool.
11209
11210      # First remove it from the list of overridden variables, so we can test
11211      # for unknown variables in the end.
11212      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11213
11214      # Check if we try to supply an empty value
11215      if test "x$TR" = x; then
11216        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11217$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11219$as_echo_n "checking for TR... " >&6; }
11220        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11221$as_echo "disabled" >&6; }
11222      else
11223        # Check if the provided tool contains a complete path.
11224        tool_specified="$TR"
11225        tool_basename="${tool_specified##*/}"
11226        if test "x$tool_basename" = "x$tool_specified"; then
11227          # A command without a complete path is provided, search $PATH.
11228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11229$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11230          # Extract the first word of "$tool_basename", so it can be a program name with args.
11231set dummy $tool_basename; ac_word=$2
11232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11233$as_echo_n "checking for $ac_word... " >&6; }
11234if ${ac_cv_path_TR+:} false; then :
11235  $as_echo_n "(cached) " >&6
11236else
11237  case $TR in
11238  [\\/]* | ?:[\\/]*)
11239  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11240  ;;
11241  *)
11242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11243for as_dir in $PATH
11244do
11245  IFS=$as_save_IFS
11246  test -z "$as_dir" && as_dir=.
11247    for ac_exec_ext in '' $ac_executable_extensions; do
11248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11249    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11251    break 2
11252  fi
11253done
11254  done
11255IFS=$as_save_IFS
11256
11257  ;;
11258esac
11259fi
11260TR=$ac_cv_path_TR
11261if test -n "$TR"; then
11262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11263$as_echo "$TR" >&6; }
11264else
11265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11266$as_echo "no" >&6; }
11267fi
11268
11269
11270          if test "x$TR" = x; then
11271            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11272          fi
11273        else
11274          # Otherwise we believe it is a complete path. Use it as it is.
11275          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11276$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11277          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11278$as_echo_n "checking for TR... " >&6; }
11279          if test ! -x "$tool_specified"; then
11280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11281$as_echo "not found" >&6; }
11282            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11283          fi
11284          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11285$as_echo "$tool_specified" >&6; }
11286        fi
11287      fi
11288    fi
11289
11290  fi
11291
11292
11293
11294  if test "x$TR" = x; then
11295    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11296  fi
11297
11298
11299
11300
11301
11302  # Publish this variable in the help.
11303
11304
11305  if [ -z "${UNAME+x}" ]; then
11306    # The variable is not set by user, try to locate tool using the code snippet
11307    for ac_prog in uname
11308do
11309  # Extract the first word of "$ac_prog", so it can be a program name with args.
11310set dummy $ac_prog; ac_word=$2
11311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11312$as_echo_n "checking for $ac_word... " >&6; }
11313if ${ac_cv_path_UNAME+:} false; then :
11314  $as_echo_n "(cached) " >&6
11315else
11316  case $UNAME in
11317  [\\/]* | ?:[\\/]*)
11318  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11319  ;;
11320  *)
11321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11322for as_dir in $PATH
11323do
11324  IFS=$as_save_IFS
11325  test -z "$as_dir" && as_dir=.
11326    for ac_exec_ext in '' $ac_executable_extensions; do
11327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11328    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11330    break 2
11331  fi
11332done
11333  done
11334IFS=$as_save_IFS
11335
11336  ;;
11337esac
11338fi
11339UNAME=$ac_cv_path_UNAME
11340if test -n "$UNAME"; then
11341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11342$as_echo "$UNAME" >&6; }
11343else
11344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11345$as_echo "no" >&6; }
11346fi
11347
11348
11349  test -n "$UNAME" && break
11350done
11351
11352  else
11353    # The variable is set, but is it from the command line or the environment?
11354
11355    # Try to remove the string !UNAME! from our list.
11356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11358      # If it failed, the variable was not from the command line. Ignore it,
11359      # but warn the user (except for BASH, which is always set by the calling BASH).
11360      if test "xUNAME" != xBASH; then
11361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11362$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11363      fi
11364      # Try to locate tool using the code snippet
11365      for ac_prog in uname
11366do
11367  # Extract the first word of "$ac_prog", so it can be a program name with args.
11368set dummy $ac_prog; ac_word=$2
11369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11370$as_echo_n "checking for $ac_word... " >&6; }
11371if ${ac_cv_path_UNAME+:} false; then :
11372  $as_echo_n "(cached) " >&6
11373else
11374  case $UNAME in
11375  [\\/]* | ?:[\\/]*)
11376  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11377  ;;
11378  *)
11379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11380for as_dir in $PATH
11381do
11382  IFS=$as_save_IFS
11383  test -z "$as_dir" && as_dir=.
11384    for ac_exec_ext in '' $ac_executable_extensions; do
11385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11386    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11388    break 2
11389  fi
11390done
11391  done
11392IFS=$as_save_IFS
11393
11394  ;;
11395esac
11396fi
11397UNAME=$ac_cv_path_UNAME
11398if test -n "$UNAME"; then
11399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11400$as_echo "$UNAME" >&6; }
11401else
11402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403$as_echo "no" >&6; }
11404fi
11405
11406
11407  test -n "$UNAME" && break
11408done
11409
11410    else
11411      # If it succeeded, then it was overridden by the user. We will use it
11412      # for the tool.
11413
11414      # First remove it from the list of overridden variables, so we can test
11415      # for unknown variables in the end.
11416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11417
11418      # Check if we try to supply an empty value
11419      if test "x$UNAME" = x; then
11420        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11421$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11423$as_echo_n "checking for UNAME... " >&6; }
11424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11425$as_echo "disabled" >&6; }
11426      else
11427        # Check if the provided tool contains a complete path.
11428        tool_specified="$UNAME"
11429        tool_basename="${tool_specified##*/}"
11430        if test "x$tool_basename" = "x$tool_specified"; then
11431          # A command without a complete path is provided, search $PATH.
11432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11433$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11434          # Extract the first word of "$tool_basename", so it can be a program name with args.
11435set dummy $tool_basename; ac_word=$2
11436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11437$as_echo_n "checking for $ac_word... " >&6; }
11438if ${ac_cv_path_UNAME+:} false; then :
11439  $as_echo_n "(cached) " >&6
11440else
11441  case $UNAME in
11442  [\\/]* | ?:[\\/]*)
11443  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11444  ;;
11445  *)
11446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11447for as_dir in $PATH
11448do
11449  IFS=$as_save_IFS
11450  test -z "$as_dir" && as_dir=.
11451    for ac_exec_ext in '' $ac_executable_extensions; do
11452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11453    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11455    break 2
11456  fi
11457done
11458  done
11459IFS=$as_save_IFS
11460
11461  ;;
11462esac
11463fi
11464UNAME=$ac_cv_path_UNAME
11465if test -n "$UNAME"; then
11466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11467$as_echo "$UNAME" >&6; }
11468else
11469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11470$as_echo "no" >&6; }
11471fi
11472
11473
11474          if test "x$UNAME" = x; then
11475            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11476          fi
11477        else
11478          # Otherwise we believe it is a complete path. Use it as it is.
11479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11480$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11481          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11482$as_echo_n "checking for UNAME... " >&6; }
11483          if test ! -x "$tool_specified"; then
11484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11485$as_echo "not found" >&6; }
11486            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11487          fi
11488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11489$as_echo "$tool_specified" >&6; }
11490        fi
11491      fi
11492    fi
11493
11494  fi
11495
11496
11497
11498  if test "x$UNAME" = x; then
11499    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11500  fi
11501
11502
11503
11504
11505
11506  # Publish this variable in the help.
11507
11508
11509  if [ -z "${UNIQ+x}" ]; then
11510    # The variable is not set by user, try to locate tool using the code snippet
11511    for ac_prog in uniq
11512do
11513  # Extract the first word of "$ac_prog", so it can be a program name with args.
11514set dummy $ac_prog; ac_word=$2
11515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11516$as_echo_n "checking for $ac_word... " >&6; }
11517if ${ac_cv_path_UNIQ+:} false; then :
11518  $as_echo_n "(cached) " >&6
11519else
11520  case $UNIQ in
11521  [\\/]* | ?:[\\/]*)
11522  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11523  ;;
11524  *)
11525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11526for as_dir in $PATH
11527do
11528  IFS=$as_save_IFS
11529  test -z "$as_dir" && as_dir=.
11530    for ac_exec_ext in '' $ac_executable_extensions; do
11531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11532    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11534    break 2
11535  fi
11536done
11537  done
11538IFS=$as_save_IFS
11539
11540  ;;
11541esac
11542fi
11543UNIQ=$ac_cv_path_UNIQ
11544if test -n "$UNIQ"; then
11545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11546$as_echo "$UNIQ" >&6; }
11547else
11548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11549$as_echo "no" >&6; }
11550fi
11551
11552
11553  test -n "$UNIQ" && break
11554done
11555
11556  else
11557    # The variable is set, but is it from the command line or the environment?
11558
11559    # Try to remove the string !UNIQ! from our list.
11560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11562      # If it failed, the variable was not from the command line. Ignore it,
11563      # but warn the user (except for BASH, which is always set by the calling BASH).
11564      if test "xUNIQ" != xBASH; then
11565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11566$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11567      fi
11568      # Try to locate tool using the code snippet
11569      for ac_prog in uniq
11570do
11571  # Extract the first word of "$ac_prog", so it can be a program name with args.
11572set dummy $ac_prog; ac_word=$2
11573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11574$as_echo_n "checking for $ac_word... " >&6; }
11575if ${ac_cv_path_UNIQ+:} false; then :
11576  $as_echo_n "(cached) " >&6
11577else
11578  case $UNIQ in
11579  [\\/]* | ?:[\\/]*)
11580  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11581  ;;
11582  *)
11583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11584for as_dir in $PATH
11585do
11586  IFS=$as_save_IFS
11587  test -z "$as_dir" && as_dir=.
11588    for ac_exec_ext in '' $ac_executable_extensions; do
11589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11590    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11592    break 2
11593  fi
11594done
11595  done
11596IFS=$as_save_IFS
11597
11598  ;;
11599esac
11600fi
11601UNIQ=$ac_cv_path_UNIQ
11602if test -n "$UNIQ"; then
11603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11604$as_echo "$UNIQ" >&6; }
11605else
11606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11607$as_echo "no" >&6; }
11608fi
11609
11610
11611  test -n "$UNIQ" && break
11612done
11613
11614    else
11615      # If it succeeded, then it was overridden by the user. We will use it
11616      # for the tool.
11617
11618      # First remove it from the list of overridden variables, so we can test
11619      # for unknown variables in the end.
11620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11621
11622      # Check if we try to supply an empty value
11623      if test "x$UNIQ" = x; then
11624        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11625$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11626        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11627$as_echo_n "checking for UNIQ... " >&6; }
11628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11629$as_echo "disabled" >&6; }
11630      else
11631        # Check if the provided tool contains a complete path.
11632        tool_specified="$UNIQ"
11633        tool_basename="${tool_specified##*/}"
11634        if test "x$tool_basename" = "x$tool_specified"; then
11635          # A command without a complete path is provided, search $PATH.
11636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11637$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11638          # Extract the first word of "$tool_basename", so it can be a program name with args.
11639set dummy $tool_basename; ac_word=$2
11640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11641$as_echo_n "checking for $ac_word... " >&6; }
11642if ${ac_cv_path_UNIQ+:} false; then :
11643  $as_echo_n "(cached) " >&6
11644else
11645  case $UNIQ in
11646  [\\/]* | ?:[\\/]*)
11647  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11648  ;;
11649  *)
11650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11651for as_dir in $PATH
11652do
11653  IFS=$as_save_IFS
11654  test -z "$as_dir" && as_dir=.
11655    for ac_exec_ext in '' $ac_executable_extensions; do
11656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11657    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11659    break 2
11660  fi
11661done
11662  done
11663IFS=$as_save_IFS
11664
11665  ;;
11666esac
11667fi
11668UNIQ=$ac_cv_path_UNIQ
11669if test -n "$UNIQ"; then
11670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11671$as_echo "$UNIQ" >&6; }
11672else
11673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11674$as_echo "no" >&6; }
11675fi
11676
11677
11678          if test "x$UNIQ" = x; then
11679            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11680          fi
11681        else
11682          # Otherwise we believe it is a complete path. Use it as it is.
11683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
11684$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
11685          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11686$as_echo_n "checking for UNIQ... " >&6; }
11687          if test ! -x "$tool_specified"; then
11688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11689$as_echo "not found" >&6; }
11690            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
11691          fi
11692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11693$as_echo "$tool_specified" >&6; }
11694        fi
11695      fi
11696    fi
11697
11698  fi
11699
11700
11701
11702  if test "x$UNIQ" = x; then
11703    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
11704  fi
11705
11706
11707
11708
11709
11710  # Publish this variable in the help.
11711
11712
11713  if [ -z "${WC+x}" ]; then
11714    # The variable is not set by user, try to locate tool using the code snippet
11715    for ac_prog in wc
11716do
11717  # Extract the first word of "$ac_prog", so it can be a program name with args.
11718set dummy $ac_prog; ac_word=$2
11719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11720$as_echo_n "checking for $ac_word... " >&6; }
11721if ${ac_cv_path_WC+:} false; then :
11722  $as_echo_n "(cached) " >&6
11723else
11724  case $WC in
11725  [\\/]* | ?:[\\/]*)
11726  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11727  ;;
11728  *)
11729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11730for as_dir in $PATH
11731do
11732  IFS=$as_save_IFS
11733  test -z "$as_dir" && as_dir=.
11734    for ac_exec_ext in '' $ac_executable_extensions; do
11735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11736    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11738    break 2
11739  fi
11740done
11741  done
11742IFS=$as_save_IFS
11743
11744  ;;
11745esac
11746fi
11747WC=$ac_cv_path_WC
11748if test -n "$WC"; then
11749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11750$as_echo "$WC" >&6; }
11751else
11752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11753$as_echo "no" >&6; }
11754fi
11755
11756
11757  test -n "$WC" && break
11758done
11759
11760  else
11761    # The variable is set, but is it from the command line or the environment?
11762
11763    # Try to remove the string !WC! from our list.
11764    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
11765    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11766      # If it failed, the variable was not from the command line. Ignore it,
11767      # but warn the user (except for BASH, which is always set by the calling BASH).
11768      if test "xWC" != xBASH; then
11769        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
11770$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
11771      fi
11772      # Try to locate tool using the code snippet
11773      for ac_prog in wc
11774do
11775  # Extract the first word of "$ac_prog", so it can be a program name with args.
11776set dummy $ac_prog; ac_word=$2
11777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11778$as_echo_n "checking for $ac_word... " >&6; }
11779if ${ac_cv_path_WC+:} false; then :
11780  $as_echo_n "(cached) " >&6
11781else
11782  case $WC in
11783  [\\/]* | ?:[\\/]*)
11784  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11785  ;;
11786  *)
11787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11788for as_dir in $PATH
11789do
11790  IFS=$as_save_IFS
11791  test -z "$as_dir" && as_dir=.
11792    for ac_exec_ext in '' $ac_executable_extensions; do
11793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11794    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11796    break 2
11797  fi
11798done
11799  done
11800IFS=$as_save_IFS
11801
11802  ;;
11803esac
11804fi
11805WC=$ac_cv_path_WC
11806if test -n "$WC"; then
11807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11808$as_echo "$WC" >&6; }
11809else
11810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11811$as_echo "no" >&6; }
11812fi
11813
11814
11815  test -n "$WC" && break
11816done
11817
11818    else
11819      # If it succeeded, then it was overridden by the user. We will use it
11820      # for the tool.
11821
11822      # First remove it from the list of overridden variables, so we can test
11823      # for unknown variables in the end.
11824      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11825
11826      # Check if we try to supply an empty value
11827      if test "x$WC" = x; then
11828        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
11829$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
11830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11831$as_echo_n "checking for WC... " >&6; }
11832        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11833$as_echo "disabled" >&6; }
11834      else
11835        # Check if the provided tool contains a complete path.
11836        tool_specified="$WC"
11837        tool_basename="${tool_specified##*/}"
11838        if test "x$tool_basename" = "x$tool_specified"; then
11839          # A command without a complete path is provided, search $PATH.
11840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11841$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11842          # Extract the first word of "$tool_basename", so it can be a program name with args.
11843set dummy $tool_basename; ac_word=$2
11844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11845$as_echo_n "checking for $ac_word... " >&6; }
11846if ${ac_cv_path_WC+:} false; then :
11847  $as_echo_n "(cached) " >&6
11848else
11849  case $WC in
11850  [\\/]* | ?:[\\/]*)
11851  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11852  ;;
11853  *)
11854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11855for as_dir in $PATH
11856do
11857  IFS=$as_save_IFS
11858  test -z "$as_dir" && as_dir=.
11859    for ac_exec_ext in '' $ac_executable_extensions; do
11860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11861    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11863    break 2
11864  fi
11865done
11866  done
11867IFS=$as_save_IFS
11868
11869  ;;
11870esac
11871fi
11872WC=$ac_cv_path_WC
11873if test -n "$WC"; then
11874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11875$as_echo "$WC" >&6; }
11876else
11877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11878$as_echo "no" >&6; }
11879fi
11880
11881
11882          if test "x$WC" = x; then
11883            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11884          fi
11885        else
11886          # Otherwise we believe it is a complete path. Use it as it is.
11887          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11888$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11889          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11890$as_echo_n "checking for WC... " >&6; }
11891          if test ! -x "$tool_specified"; then
11892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11893$as_echo "not found" >&6; }
11894            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11895          fi
11896          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11897$as_echo "$tool_specified" >&6; }
11898        fi
11899      fi
11900    fi
11901
11902  fi
11903
11904
11905
11906  if test "x$WC" = x; then
11907    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11908  fi
11909
11910
11911
11912
11913
11914  # Publish this variable in the help.
11915
11916
11917  if [ -z "${WHICH+x}" ]; then
11918    # The variable is not set by user, try to locate tool using the code snippet
11919    for ac_prog in which
11920do
11921  # Extract the first word of "$ac_prog", so it can be a program name with args.
11922set dummy $ac_prog; ac_word=$2
11923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11924$as_echo_n "checking for $ac_word... " >&6; }
11925if ${ac_cv_path_WHICH+:} false; then :
11926  $as_echo_n "(cached) " >&6
11927else
11928  case $WHICH in
11929  [\\/]* | ?:[\\/]*)
11930  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11931  ;;
11932  *)
11933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11934for as_dir in $PATH
11935do
11936  IFS=$as_save_IFS
11937  test -z "$as_dir" && as_dir=.
11938    for ac_exec_ext in '' $ac_executable_extensions; do
11939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11940    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11942    break 2
11943  fi
11944done
11945  done
11946IFS=$as_save_IFS
11947
11948  ;;
11949esac
11950fi
11951WHICH=$ac_cv_path_WHICH
11952if test -n "$WHICH"; then
11953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11954$as_echo "$WHICH" >&6; }
11955else
11956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11957$as_echo "no" >&6; }
11958fi
11959
11960
11961  test -n "$WHICH" && break
11962done
11963
11964  else
11965    # The variable is set, but is it from the command line or the environment?
11966
11967    # Try to remove the string !WHICH! from our list.
11968    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11969    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11970      # If it failed, the variable was not from the command line. Ignore it,
11971      # but warn the user (except for BASH, which is always set by the calling BASH).
11972      if test "xWHICH" != xBASH; then
11973        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11974$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11975      fi
11976      # Try to locate tool using the code snippet
11977      for ac_prog in which
11978do
11979  # Extract the first word of "$ac_prog", so it can be a program name with args.
11980set dummy $ac_prog; ac_word=$2
11981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11982$as_echo_n "checking for $ac_word... " >&6; }
11983if ${ac_cv_path_WHICH+:} false; then :
11984  $as_echo_n "(cached) " >&6
11985else
11986  case $WHICH in
11987  [\\/]* | ?:[\\/]*)
11988  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11989  ;;
11990  *)
11991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11992for as_dir in $PATH
11993do
11994  IFS=$as_save_IFS
11995  test -z "$as_dir" && as_dir=.
11996    for ac_exec_ext in '' $ac_executable_extensions; do
11997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11998    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12000    break 2
12001  fi
12002done
12003  done
12004IFS=$as_save_IFS
12005
12006  ;;
12007esac
12008fi
12009WHICH=$ac_cv_path_WHICH
12010if test -n "$WHICH"; then
12011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12012$as_echo "$WHICH" >&6; }
12013else
12014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12015$as_echo "no" >&6; }
12016fi
12017
12018
12019  test -n "$WHICH" && break
12020done
12021
12022    else
12023      # If it succeeded, then it was overridden by the user. We will use it
12024      # for the tool.
12025
12026      # First remove it from the list of overridden variables, so we can test
12027      # for unknown variables in the end.
12028      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12029
12030      # Check if we try to supply an empty value
12031      if test "x$WHICH" = x; then
12032        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12033$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12035$as_echo_n "checking for WHICH... " >&6; }
12036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12037$as_echo "disabled" >&6; }
12038      else
12039        # Check if the provided tool contains a complete path.
12040        tool_specified="$WHICH"
12041        tool_basename="${tool_specified##*/}"
12042        if test "x$tool_basename" = "x$tool_specified"; then
12043          # A command without a complete path is provided, search $PATH.
12044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12045$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12046          # Extract the first word of "$tool_basename", so it can be a program name with args.
12047set dummy $tool_basename; ac_word=$2
12048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12049$as_echo_n "checking for $ac_word... " >&6; }
12050if ${ac_cv_path_WHICH+:} false; then :
12051  $as_echo_n "(cached) " >&6
12052else
12053  case $WHICH in
12054  [\\/]* | ?:[\\/]*)
12055  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12056  ;;
12057  *)
12058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12059for as_dir in $PATH
12060do
12061  IFS=$as_save_IFS
12062  test -z "$as_dir" && as_dir=.
12063    for ac_exec_ext in '' $ac_executable_extensions; do
12064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12065    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12067    break 2
12068  fi
12069done
12070  done
12071IFS=$as_save_IFS
12072
12073  ;;
12074esac
12075fi
12076WHICH=$ac_cv_path_WHICH
12077if test -n "$WHICH"; then
12078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12079$as_echo "$WHICH" >&6; }
12080else
12081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12082$as_echo "no" >&6; }
12083fi
12084
12085
12086          if test "x$WHICH" = x; then
12087            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12088          fi
12089        else
12090          # Otherwise we believe it is a complete path. Use it as it is.
12091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12092$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12093          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12094$as_echo_n "checking for WHICH... " >&6; }
12095          if test ! -x "$tool_specified"; then
12096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12097$as_echo "not found" >&6; }
12098            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12099          fi
12100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12101$as_echo "$tool_specified" >&6; }
12102        fi
12103      fi
12104    fi
12105
12106  fi
12107
12108
12109
12110  if test "x$WHICH" = x; then
12111    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12112  fi
12113
12114
12115
12116
12117
12118  # Publish this variable in the help.
12119
12120
12121  if [ -z "${XARGS+x}" ]; then
12122    # The variable is not set by user, try to locate tool using the code snippet
12123    for ac_prog in xargs
12124do
12125  # Extract the first word of "$ac_prog", so it can be a program name with args.
12126set dummy $ac_prog; ac_word=$2
12127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12128$as_echo_n "checking for $ac_word... " >&6; }
12129if ${ac_cv_path_XARGS+:} false; then :
12130  $as_echo_n "(cached) " >&6
12131else
12132  case $XARGS in
12133  [\\/]* | ?:[\\/]*)
12134  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12135  ;;
12136  *)
12137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12138for as_dir in $PATH
12139do
12140  IFS=$as_save_IFS
12141  test -z "$as_dir" && as_dir=.
12142    for ac_exec_ext in '' $ac_executable_extensions; do
12143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12144    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12146    break 2
12147  fi
12148done
12149  done
12150IFS=$as_save_IFS
12151
12152  ;;
12153esac
12154fi
12155XARGS=$ac_cv_path_XARGS
12156if test -n "$XARGS"; then
12157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12158$as_echo "$XARGS" >&6; }
12159else
12160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12161$as_echo "no" >&6; }
12162fi
12163
12164
12165  test -n "$XARGS" && break
12166done
12167
12168  else
12169    # The variable is set, but is it from the command line or the environment?
12170
12171    # Try to remove the string !XARGS! from our list.
12172    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12173    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12174      # If it failed, the variable was not from the command line. Ignore it,
12175      # but warn the user (except for BASH, which is always set by the calling BASH).
12176      if test "xXARGS" != xBASH; then
12177        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12178$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12179      fi
12180      # Try to locate tool using the code snippet
12181      for ac_prog in xargs
12182do
12183  # Extract the first word of "$ac_prog", so it can be a program name with args.
12184set dummy $ac_prog; ac_word=$2
12185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12186$as_echo_n "checking for $ac_word... " >&6; }
12187if ${ac_cv_path_XARGS+:} false; then :
12188  $as_echo_n "(cached) " >&6
12189else
12190  case $XARGS in
12191  [\\/]* | ?:[\\/]*)
12192  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12193  ;;
12194  *)
12195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12196for as_dir in $PATH
12197do
12198  IFS=$as_save_IFS
12199  test -z "$as_dir" && as_dir=.
12200    for ac_exec_ext in '' $ac_executable_extensions; do
12201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12202    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12204    break 2
12205  fi
12206done
12207  done
12208IFS=$as_save_IFS
12209
12210  ;;
12211esac
12212fi
12213XARGS=$ac_cv_path_XARGS
12214if test -n "$XARGS"; then
12215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12216$as_echo "$XARGS" >&6; }
12217else
12218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12219$as_echo "no" >&6; }
12220fi
12221
12222
12223  test -n "$XARGS" && break
12224done
12225
12226    else
12227      # If it succeeded, then it was overridden by the user. We will use it
12228      # for the tool.
12229
12230      # First remove it from the list of overridden variables, so we can test
12231      # for unknown variables in the end.
12232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12233
12234      # Check if we try to supply an empty value
12235      if test "x$XARGS" = x; then
12236        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12237$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12239$as_echo_n "checking for XARGS... " >&6; }
12240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12241$as_echo "disabled" >&6; }
12242      else
12243        # Check if the provided tool contains a complete path.
12244        tool_specified="$XARGS"
12245        tool_basename="${tool_specified##*/}"
12246        if test "x$tool_basename" = "x$tool_specified"; then
12247          # A command without a complete path is provided, search $PATH.
12248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12249$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12250          # Extract the first word of "$tool_basename", so it can be a program name with args.
12251set dummy $tool_basename; ac_word=$2
12252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12253$as_echo_n "checking for $ac_word... " >&6; }
12254if ${ac_cv_path_XARGS+:} false; then :
12255  $as_echo_n "(cached) " >&6
12256else
12257  case $XARGS in
12258  [\\/]* | ?:[\\/]*)
12259  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12260  ;;
12261  *)
12262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12263for as_dir in $PATH
12264do
12265  IFS=$as_save_IFS
12266  test -z "$as_dir" && as_dir=.
12267    for ac_exec_ext in '' $ac_executable_extensions; do
12268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12269    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12271    break 2
12272  fi
12273done
12274  done
12275IFS=$as_save_IFS
12276
12277  ;;
12278esac
12279fi
12280XARGS=$ac_cv_path_XARGS
12281if test -n "$XARGS"; then
12282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12283$as_echo "$XARGS" >&6; }
12284else
12285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12286$as_echo "no" >&6; }
12287fi
12288
12289
12290          if test "x$XARGS" = x; then
12291            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12292          fi
12293        else
12294          # Otherwise we believe it is a complete path. Use it as it is.
12295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12296$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12297          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12298$as_echo_n "checking for XARGS... " >&6; }
12299          if test ! -x "$tool_specified"; then
12300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12301$as_echo "not found" >&6; }
12302            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12303          fi
12304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12305$as_echo "$tool_specified" >&6; }
12306        fi
12307      fi
12308    fi
12309
12310  fi
12311
12312
12313
12314  if test "x$XARGS" = x; then
12315    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12316  fi
12317
12318
12319
12320  # Then required tools that require some special treatment.
12321
12322
12323  # Publish this variable in the help.
12324
12325
12326  if [ -z "${AWK+x}" ]; then
12327    # The variable is not set by user, try to locate tool using the code snippet
12328    for ac_prog in gawk mawk nawk awk
12329do
12330  # Extract the first word of "$ac_prog", so it can be a program name with args.
12331set dummy $ac_prog; ac_word=$2
12332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12333$as_echo_n "checking for $ac_word... " >&6; }
12334if ${ac_cv_prog_AWK+:} false; then :
12335  $as_echo_n "(cached) " >&6
12336else
12337  if test -n "$AWK"; then
12338  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12339else
12340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12341for as_dir in $PATH
12342do
12343  IFS=$as_save_IFS
12344  test -z "$as_dir" && as_dir=.
12345    for ac_exec_ext in '' $ac_executable_extensions; do
12346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12347    ac_cv_prog_AWK="$ac_prog"
12348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12349    break 2
12350  fi
12351done
12352  done
12353IFS=$as_save_IFS
12354
12355fi
12356fi
12357AWK=$ac_cv_prog_AWK
12358if test -n "$AWK"; then
12359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12360$as_echo "$AWK" >&6; }
12361else
12362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12363$as_echo "no" >&6; }
12364fi
12365
12366
12367  test -n "$AWK" && break
12368done
12369
12370  else
12371    # The variable is set, but is it from the command line or the environment?
12372
12373    # Try to remove the string !AWK! from our list.
12374    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12375    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12376      # If it failed, the variable was not from the command line. Ignore it,
12377      # but warn the user (except for BASH, which is always set by the calling BASH).
12378      if test "xAWK" != xBASH; then
12379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12380$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12381      fi
12382      # Try to locate tool using the code snippet
12383      for ac_prog in gawk mawk nawk awk
12384do
12385  # Extract the first word of "$ac_prog", so it can be a program name with args.
12386set dummy $ac_prog; ac_word=$2
12387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12388$as_echo_n "checking for $ac_word... " >&6; }
12389if ${ac_cv_prog_AWK+:} false; then :
12390  $as_echo_n "(cached) " >&6
12391else
12392  if test -n "$AWK"; then
12393  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12394else
12395as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12396for as_dir in $PATH
12397do
12398  IFS=$as_save_IFS
12399  test -z "$as_dir" && as_dir=.
12400    for ac_exec_ext in '' $ac_executable_extensions; do
12401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12402    ac_cv_prog_AWK="$ac_prog"
12403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12404    break 2
12405  fi
12406done
12407  done
12408IFS=$as_save_IFS
12409
12410fi
12411fi
12412AWK=$ac_cv_prog_AWK
12413if test -n "$AWK"; then
12414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12415$as_echo "$AWK" >&6; }
12416else
12417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12418$as_echo "no" >&6; }
12419fi
12420
12421
12422  test -n "$AWK" && break
12423done
12424
12425    else
12426      # If it succeeded, then it was overridden by the user. We will use it
12427      # for the tool.
12428
12429      # First remove it from the list of overridden variables, so we can test
12430      # for unknown variables in the end.
12431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12432
12433      # Check if we try to supply an empty value
12434      if test "x$AWK" = x; then
12435        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12436$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12437        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12438$as_echo_n "checking for AWK... " >&6; }
12439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12440$as_echo "disabled" >&6; }
12441      else
12442        # Check if the provided tool contains a complete path.
12443        tool_specified="$AWK"
12444        tool_basename="${tool_specified##*/}"
12445        if test "x$tool_basename" = "x$tool_specified"; then
12446          # A command without a complete path is provided, search $PATH.
12447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12448$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12449          # Extract the first word of "$tool_basename", so it can be a program name with args.
12450set dummy $tool_basename; ac_word=$2
12451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12452$as_echo_n "checking for $ac_word... " >&6; }
12453if ${ac_cv_path_AWK+:} false; then :
12454  $as_echo_n "(cached) " >&6
12455else
12456  case $AWK in
12457  [\\/]* | ?:[\\/]*)
12458  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12459  ;;
12460  *)
12461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12462for as_dir in $PATH
12463do
12464  IFS=$as_save_IFS
12465  test -z "$as_dir" && as_dir=.
12466    for ac_exec_ext in '' $ac_executable_extensions; do
12467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12468    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12470    break 2
12471  fi
12472done
12473  done
12474IFS=$as_save_IFS
12475
12476  ;;
12477esac
12478fi
12479AWK=$ac_cv_path_AWK
12480if test -n "$AWK"; then
12481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12482$as_echo "$AWK" >&6; }
12483else
12484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12485$as_echo "no" >&6; }
12486fi
12487
12488
12489          if test "x$AWK" = x; then
12490            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12491          fi
12492        else
12493          # Otherwise we believe it is a complete path. Use it as it is.
12494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12495$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12496          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12497$as_echo_n "checking for AWK... " >&6; }
12498          if test ! -x "$tool_specified"; then
12499            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12500$as_echo "not found" >&6; }
12501            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12502          fi
12503          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12504$as_echo "$tool_specified" >&6; }
12505        fi
12506      fi
12507    fi
12508
12509  fi
12510
12511
12512  if test "x$AWK" = x; then
12513    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12514  fi
12515
12516
12517
12518
12519  # Publish this variable in the help.
12520
12521
12522  if [ -z "${GREP+x}" ]; then
12523    # The variable is not set by user, try to locate tool using the code snippet
12524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12525$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12526if ${ac_cv_path_GREP+:} false; then :
12527  $as_echo_n "(cached) " >&6
12528else
12529  if test -z "$GREP"; then
12530  ac_path_GREP_found=false
12531  # Loop through the user's path and test for each of PROGNAME-LIST
12532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12533for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12534do
12535  IFS=$as_save_IFS
12536  test -z "$as_dir" && as_dir=.
12537    for ac_prog in grep ggrep; do
12538    for ac_exec_ext in '' $ac_executable_extensions; do
12539      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12540      as_fn_executable_p "$ac_path_GREP" || continue
12541# Check for GNU ac_path_GREP and select it if it is found.
12542  # Check for GNU $ac_path_GREP
12543case `"$ac_path_GREP" --version 2>&1` in
12544*GNU*)
12545  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12546*)
12547  ac_count=0
12548  $as_echo_n 0123456789 >"conftest.in"
12549  while :
12550  do
12551    cat "conftest.in" "conftest.in" >"conftest.tmp"
12552    mv "conftest.tmp" "conftest.in"
12553    cp "conftest.in" "conftest.nl"
12554    $as_echo 'GREP' >> "conftest.nl"
12555    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12556    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12557    as_fn_arith $ac_count + 1 && ac_count=$as_val
12558    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12559      # Best one so far, save it but keep looking for a better one
12560      ac_cv_path_GREP="$ac_path_GREP"
12561      ac_path_GREP_max=$ac_count
12562    fi
12563    # 10*(2^10) chars as input seems more than enough
12564    test $ac_count -gt 10 && break
12565  done
12566  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12567esac
12568
12569      $ac_path_GREP_found && break 3
12570    done
12571  done
12572  done
12573IFS=$as_save_IFS
12574  if test -z "$ac_cv_path_GREP"; then
12575    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12576  fi
12577else
12578  ac_cv_path_GREP=$GREP
12579fi
12580
12581fi
12582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12583$as_echo "$ac_cv_path_GREP" >&6; }
12584 GREP="$ac_cv_path_GREP"
12585
12586
12587  else
12588    # The variable is set, but is it from the command line or the environment?
12589
12590    # Try to remove the string !GREP! from our list.
12591    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12592    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12593      # If it failed, the variable was not from the command line. Ignore it,
12594      # but warn the user (except for BASH, which is always set by the calling BASH).
12595      if test "xGREP" != xBASH; then
12596        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12597$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12598      fi
12599      # Try to locate tool using the code snippet
12600      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12601$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12602if ${ac_cv_path_GREP+:} false; then :
12603  $as_echo_n "(cached) " >&6
12604else
12605  if test -z "$GREP"; then
12606  ac_path_GREP_found=false
12607  # Loop through the user's path and test for each of PROGNAME-LIST
12608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12609for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12610do
12611  IFS=$as_save_IFS
12612  test -z "$as_dir" && as_dir=.
12613    for ac_prog in grep ggrep; do
12614    for ac_exec_ext in '' $ac_executable_extensions; do
12615      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12616      as_fn_executable_p "$ac_path_GREP" || continue
12617# Check for GNU ac_path_GREP and select it if it is found.
12618  # Check for GNU $ac_path_GREP
12619case `"$ac_path_GREP" --version 2>&1` in
12620*GNU*)
12621  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12622*)
12623  ac_count=0
12624  $as_echo_n 0123456789 >"conftest.in"
12625  while :
12626  do
12627    cat "conftest.in" "conftest.in" >"conftest.tmp"
12628    mv "conftest.tmp" "conftest.in"
12629    cp "conftest.in" "conftest.nl"
12630    $as_echo 'GREP' >> "conftest.nl"
12631    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12632    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12633    as_fn_arith $ac_count + 1 && ac_count=$as_val
12634    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12635      # Best one so far, save it but keep looking for a better one
12636      ac_cv_path_GREP="$ac_path_GREP"
12637      ac_path_GREP_max=$ac_count
12638    fi
12639    # 10*(2^10) chars as input seems more than enough
12640    test $ac_count -gt 10 && break
12641  done
12642  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12643esac
12644
12645      $ac_path_GREP_found && break 3
12646    done
12647  done
12648  done
12649IFS=$as_save_IFS
12650  if test -z "$ac_cv_path_GREP"; then
12651    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12652  fi
12653else
12654  ac_cv_path_GREP=$GREP
12655fi
12656
12657fi
12658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12659$as_echo "$ac_cv_path_GREP" >&6; }
12660 GREP="$ac_cv_path_GREP"
12661
12662
12663    else
12664      # If it succeeded, then it was overridden by the user. We will use it
12665      # for the tool.
12666
12667      # First remove it from the list of overridden variables, so we can test
12668      # for unknown variables in the end.
12669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12670
12671      # Check if we try to supply an empty value
12672      if test "x$GREP" = x; then
12673        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
12674$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
12675        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12676$as_echo_n "checking for GREP... " >&6; }
12677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12678$as_echo "disabled" >&6; }
12679      else
12680        # Check if the provided tool contains a complete path.
12681        tool_specified="$GREP"
12682        tool_basename="${tool_specified##*/}"
12683        if test "x$tool_basename" = "x$tool_specified"; then
12684          # A command without a complete path is provided, search $PATH.
12685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
12686$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
12687          # Extract the first word of "$tool_basename", so it can be a program name with args.
12688set dummy $tool_basename; ac_word=$2
12689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12690$as_echo_n "checking for $ac_word... " >&6; }
12691if ${ac_cv_path_GREP+:} false; then :
12692  $as_echo_n "(cached) " >&6
12693else
12694  case $GREP in
12695  [\\/]* | ?:[\\/]*)
12696  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
12697  ;;
12698  *)
12699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12700for as_dir in $PATH
12701do
12702  IFS=$as_save_IFS
12703  test -z "$as_dir" && as_dir=.
12704    for ac_exec_ext in '' $ac_executable_extensions; do
12705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12706    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
12707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12708    break 2
12709  fi
12710done
12711  done
12712IFS=$as_save_IFS
12713
12714  ;;
12715esac
12716fi
12717GREP=$ac_cv_path_GREP
12718if test -n "$GREP"; then
12719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
12720$as_echo "$GREP" >&6; }
12721else
12722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12723$as_echo "no" >&6; }
12724fi
12725
12726
12727          if test "x$GREP" = x; then
12728            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12729          fi
12730        else
12731          # Otherwise we believe it is a complete path. Use it as it is.
12732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
12733$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
12734          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
12735$as_echo_n "checking for GREP... " >&6; }
12736          if test ! -x "$tool_specified"; then
12737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12738$as_echo "not found" >&6; }
12739            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12740          fi
12741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12742$as_echo "$tool_specified" >&6; }
12743        fi
12744      fi
12745    fi
12746
12747  fi
12748
12749
12750  if test "x$GREP" = x; then
12751    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
12752  fi
12753
12754
12755
12756
12757  # Publish this variable in the help.
12758
12759
12760  if [ -z "${EGREP+x}" ]; then
12761    # The variable is not set by user, try to locate tool using the code snippet
12762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12763$as_echo_n "checking for egrep... " >&6; }
12764if ${ac_cv_path_EGREP+:} false; then :
12765  $as_echo_n "(cached) " >&6
12766else
12767  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12768   then ac_cv_path_EGREP="$GREP -E"
12769   else
12770     if test -z "$EGREP"; then
12771  ac_path_EGREP_found=false
12772  # Loop through the user's path and test for each of PROGNAME-LIST
12773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12774for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12775do
12776  IFS=$as_save_IFS
12777  test -z "$as_dir" && as_dir=.
12778    for ac_prog in egrep; do
12779    for ac_exec_ext in '' $ac_executable_extensions; do
12780      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12781      as_fn_executable_p "$ac_path_EGREP" || continue
12782# Check for GNU ac_path_EGREP and select it if it is found.
12783  # Check for GNU $ac_path_EGREP
12784case `"$ac_path_EGREP" --version 2>&1` in
12785*GNU*)
12786  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12787*)
12788  ac_count=0
12789  $as_echo_n 0123456789 >"conftest.in"
12790  while :
12791  do
12792    cat "conftest.in" "conftest.in" >"conftest.tmp"
12793    mv "conftest.tmp" "conftest.in"
12794    cp "conftest.in" "conftest.nl"
12795    $as_echo 'EGREP' >> "conftest.nl"
12796    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12797    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12798    as_fn_arith $ac_count + 1 && ac_count=$as_val
12799    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12800      # Best one so far, save it but keep looking for a better one
12801      ac_cv_path_EGREP="$ac_path_EGREP"
12802      ac_path_EGREP_max=$ac_count
12803    fi
12804    # 10*(2^10) chars as input seems more than enough
12805    test $ac_count -gt 10 && break
12806  done
12807  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12808esac
12809
12810      $ac_path_EGREP_found && break 3
12811    done
12812  done
12813  done
12814IFS=$as_save_IFS
12815  if test -z "$ac_cv_path_EGREP"; then
12816    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12817  fi
12818else
12819  ac_cv_path_EGREP=$EGREP
12820fi
12821
12822   fi
12823fi
12824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12825$as_echo "$ac_cv_path_EGREP" >&6; }
12826 EGREP="$ac_cv_path_EGREP"
12827
12828
12829  else
12830    # The variable is set, but is it from the command line or the environment?
12831
12832    # Try to remove the string !EGREP! from our list.
12833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
12834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12835      # If it failed, the variable was not from the command line. Ignore it,
12836      # but warn the user (except for BASH, which is always set by the calling BASH).
12837      if test "xEGREP" != xBASH; then
12838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12839$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12840      fi
12841      # Try to locate tool using the code snippet
12842      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12843$as_echo_n "checking for egrep... " >&6; }
12844if ${ac_cv_path_EGREP+:} false; then :
12845  $as_echo_n "(cached) " >&6
12846else
12847  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12848   then ac_cv_path_EGREP="$GREP -E"
12849   else
12850     if test -z "$EGREP"; then
12851  ac_path_EGREP_found=false
12852  # Loop through the user's path and test for each of PROGNAME-LIST
12853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12854for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12855do
12856  IFS=$as_save_IFS
12857  test -z "$as_dir" && as_dir=.
12858    for ac_prog in egrep; do
12859    for ac_exec_ext in '' $ac_executable_extensions; do
12860      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12861      as_fn_executable_p "$ac_path_EGREP" || continue
12862# Check for GNU ac_path_EGREP and select it if it is found.
12863  # Check for GNU $ac_path_EGREP
12864case `"$ac_path_EGREP" --version 2>&1` in
12865*GNU*)
12866  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12867*)
12868  ac_count=0
12869  $as_echo_n 0123456789 >"conftest.in"
12870  while :
12871  do
12872    cat "conftest.in" "conftest.in" >"conftest.tmp"
12873    mv "conftest.tmp" "conftest.in"
12874    cp "conftest.in" "conftest.nl"
12875    $as_echo 'EGREP' >> "conftest.nl"
12876    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12877    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12878    as_fn_arith $ac_count + 1 && ac_count=$as_val
12879    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12880      # Best one so far, save it but keep looking for a better one
12881      ac_cv_path_EGREP="$ac_path_EGREP"
12882      ac_path_EGREP_max=$ac_count
12883    fi
12884    # 10*(2^10) chars as input seems more than enough
12885    test $ac_count -gt 10 && break
12886  done
12887  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12888esac
12889
12890      $ac_path_EGREP_found && break 3
12891    done
12892  done
12893  done
12894IFS=$as_save_IFS
12895  if test -z "$ac_cv_path_EGREP"; then
12896    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12897  fi
12898else
12899  ac_cv_path_EGREP=$EGREP
12900fi
12901
12902   fi
12903fi
12904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12905$as_echo "$ac_cv_path_EGREP" >&6; }
12906 EGREP="$ac_cv_path_EGREP"
12907
12908
12909    else
12910      # If it succeeded, then it was overridden by the user. We will use it
12911      # for the tool.
12912
12913      # First remove it from the list of overridden variables, so we can test
12914      # for unknown variables in the end.
12915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12916
12917      # Check if we try to supply an empty value
12918      if test "x$EGREP" = x; then
12919        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
12920$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
12921        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12922$as_echo_n "checking for EGREP... " >&6; }
12923        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12924$as_echo "disabled" >&6; }
12925      else
12926        # Check if the provided tool contains a complete path.
12927        tool_specified="$EGREP"
12928        tool_basename="${tool_specified##*/}"
12929        if test "x$tool_basename" = "x$tool_specified"; then
12930          # A command without a complete path is provided, search $PATH.
12931          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12932$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12933          # Extract the first word of "$tool_basename", so it can be a program name with args.
12934set dummy $tool_basename; ac_word=$2
12935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12936$as_echo_n "checking for $ac_word... " >&6; }
12937if ${ac_cv_path_EGREP+:} false; then :
12938  $as_echo_n "(cached) " >&6
12939else
12940  case $EGREP in
12941  [\\/]* | ?:[\\/]*)
12942  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12943  ;;
12944  *)
12945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12946for as_dir in $PATH
12947do
12948  IFS=$as_save_IFS
12949  test -z "$as_dir" && as_dir=.
12950    for ac_exec_ext in '' $ac_executable_extensions; do
12951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12952    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12954    break 2
12955  fi
12956done
12957  done
12958IFS=$as_save_IFS
12959
12960  ;;
12961esac
12962fi
12963EGREP=$ac_cv_path_EGREP
12964if test -n "$EGREP"; then
12965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12966$as_echo "$EGREP" >&6; }
12967else
12968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12969$as_echo "no" >&6; }
12970fi
12971
12972
12973          if test "x$EGREP" = x; then
12974            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12975          fi
12976        else
12977          # Otherwise we believe it is a complete path. Use it as it is.
12978          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12979$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12980          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12981$as_echo_n "checking for EGREP... " >&6; }
12982          if test ! -x "$tool_specified"; then
12983            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12984$as_echo "not found" >&6; }
12985            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12986          fi
12987          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12988$as_echo "$tool_specified" >&6; }
12989        fi
12990      fi
12991    fi
12992
12993  fi
12994
12995
12996  if test "x$EGREP" = x; then
12997    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12998  fi
12999
13000
13001
13002
13003  # Publish this variable in the help.
13004
13005
13006  if [ -z "${FGREP+x}" ]; then
13007    # The variable is not set by user, try to locate tool using the code snippet
13008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13009$as_echo_n "checking for fgrep... " >&6; }
13010if ${ac_cv_path_FGREP+:} false; then :
13011  $as_echo_n "(cached) " >&6
13012else
13013  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13014   then ac_cv_path_FGREP="$GREP -F"
13015   else
13016     if test -z "$FGREP"; then
13017  ac_path_FGREP_found=false
13018  # Loop through the user's path and test for each of PROGNAME-LIST
13019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13020for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13021do
13022  IFS=$as_save_IFS
13023  test -z "$as_dir" && as_dir=.
13024    for ac_prog in fgrep; do
13025    for ac_exec_ext in '' $ac_executable_extensions; do
13026      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13027      as_fn_executable_p "$ac_path_FGREP" || continue
13028# Check for GNU ac_path_FGREP and select it if it is found.
13029  # Check for GNU $ac_path_FGREP
13030case `"$ac_path_FGREP" --version 2>&1` in
13031*GNU*)
13032  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13033*)
13034  ac_count=0
13035  $as_echo_n 0123456789 >"conftest.in"
13036  while :
13037  do
13038    cat "conftest.in" "conftest.in" >"conftest.tmp"
13039    mv "conftest.tmp" "conftest.in"
13040    cp "conftest.in" "conftest.nl"
13041    $as_echo 'FGREP' >> "conftest.nl"
13042    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13043    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13044    as_fn_arith $ac_count + 1 && ac_count=$as_val
13045    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13046      # Best one so far, save it but keep looking for a better one
13047      ac_cv_path_FGREP="$ac_path_FGREP"
13048      ac_path_FGREP_max=$ac_count
13049    fi
13050    # 10*(2^10) chars as input seems more than enough
13051    test $ac_count -gt 10 && break
13052  done
13053  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13054esac
13055
13056      $ac_path_FGREP_found && break 3
13057    done
13058  done
13059  done
13060IFS=$as_save_IFS
13061  if test -z "$ac_cv_path_FGREP"; then
13062    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13063  fi
13064else
13065  ac_cv_path_FGREP=$FGREP
13066fi
13067
13068   fi
13069fi
13070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13071$as_echo "$ac_cv_path_FGREP" >&6; }
13072 FGREP="$ac_cv_path_FGREP"
13073
13074
13075  else
13076    # The variable is set, but is it from the command line or the environment?
13077
13078    # Try to remove the string !FGREP! from our list.
13079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13081      # If it failed, the variable was not from the command line. Ignore it,
13082      # but warn the user (except for BASH, which is always set by the calling BASH).
13083      if test "xFGREP" != xBASH; then
13084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13085$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13086      fi
13087      # Try to locate tool using the code snippet
13088      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13089$as_echo_n "checking for fgrep... " >&6; }
13090if ${ac_cv_path_FGREP+:} false; then :
13091  $as_echo_n "(cached) " >&6
13092else
13093  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13094   then ac_cv_path_FGREP="$GREP -F"
13095   else
13096     if test -z "$FGREP"; then
13097  ac_path_FGREP_found=false
13098  # Loop through the user's path and test for each of PROGNAME-LIST
13099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13100for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13101do
13102  IFS=$as_save_IFS
13103  test -z "$as_dir" && as_dir=.
13104    for ac_prog in fgrep; do
13105    for ac_exec_ext in '' $ac_executable_extensions; do
13106      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13107      as_fn_executable_p "$ac_path_FGREP" || continue
13108# Check for GNU ac_path_FGREP and select it if it is found.
13109  # Check for GNU $ac_path_FGREP
13110case `"$ac_path_FGREP" --version 2>&1` in
13111*GNU*)
13112  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13113*)
13114  ac_count=0
13115  $as_echo_n 0123456789 >"conftest.in"
13116  while :
13117  do
13118    cat "conftest.in" "conftest.in" >"conftest.tmp"
13119    mv "conftest.tmp" "conftest.in"
13120    cp "conftest.in" "conftest.nl"
13121    $as_echo 'FGREP' >> "conftest.nl"
13122    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13123    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13124    as_fn_arith $ac_count + 1 && ac_count=$as_val
13125    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13126      # Best one so far, save it but keep looking for a better one
13127      ac_cv_path_FGREP="$ac_path_FGREP"
13128      ac_path_FGREP_max=$ac_count
13129    fi
13130    # 10*(2^10) chars as input seems more than enough
13131    test $ac_count -gt 10 && break
13132  done
13133  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13134esac
13135
13136      $ac_path_FGREP_found && break 3
13137    done
13138  done
13139  done
13140IFS=$as_save_IFS
13141  if test -z "$ac_cv_path_FGREP"; then
13142    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13143  fi
13144else
13145  ac_cv_path_FGREP=$FGREP
13146fi
13147
13148   fi
13149fi
13150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13151$as_echo "$ac_cv_path_FGREP" >&6; }
13152 FGREP="$ac_cv_path_FGREP"
13153
13154
13155    else
13156      # If it succeeded, then it was overridden by the user. We will use it
13157      # for the tool.
13158
13159      # First remove it from the list of overridden variables, so we can test
13160      # for unknown variables in the end.
13161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13162
13163      # Check if we try to supply an empty value
13164      if test "x$FGREP" = x; then
13165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13166$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13168$as_echo_n "checking for FGREP... " >&6; }
13169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13170$as_echo "disabled" >&6; }
13171      else
13172        # Check if the provided tool contains a complete path.
13173        tool_specified="$FGREP"
13174        tool_basename="${tool_specified##*/}"
13175        if test "x$tool_basename" = "x$tool_specified"; then
13176          # A command without a complete path is provided, search $PATH.
13177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13178$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13179          # Extract the first word of "$tool_basename", so it can be a program name with args.
13180set dummy $tool_basename; ac_word=$2
13181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13182$as_echo_n "checking for $ac_word... " >&6; }
13183if ${ac_cv_path_FGREP+:} false; then :
13184  $as_echo_n "(cached) " >&6
13185else
13186  case $FGREP in
13187  [\\/]* | ?:[\\/]*)
13188  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13189  ;;
13190  *)
13191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13192for as_dir in $PATH
13193do
13194  IFS=$as_save_IFS
13195  test -z "$as_dir" && as_dir=.
13196    for ac_exec_ext in '' $ac_executable_extensions; do
13197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13198    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13200    break 2
13201  fi
13202done
13203  done
13204IFS=$as_save_IFS
13205
13206  ;;
13207esac
13208fi
13209FGREP=$ac_cv_path_FGREP
13210if test -n "$FGREP"; then
13211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13212$as_echo "$FGREP" >&6; }
13213else
13214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13215$as_echo "no" >&6; }
13216fi
13217
13218
13219          if test "x$FGREP" = x; then
13220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13221          fi
13222        else
13223          # Otherwise we believe it is a complete path. Use it as it is.
13224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13225$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13227$as_echo_n "checking for FGREP... " >&6; }
13228          if test ! -x "$tool_specified"; then
13229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13230$as_echo "not found" >&6; }
13231            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13232          fi
13233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13234$as_echo "$tool_specified" >&6; }
13235        fi
13236      fi
13237    fi
13238
13239  fi
13240
13241
13242  if test "x$FGREP" = x; then
13243    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13244  fi
13245
13246
13247
13248
13249  # Publish this variable in the help.
13250
13251
13252  if [ -z "${SED+x}" ]; then
13253    # The variable is not set by user, try to locate tool using the code snippet
13254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13255$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13256if ${ac_cv_path_SED+:} false; then :
13257  $as_echo_n "(cached) " >&6
13258else
13259            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13260     for ac_i in 1 2 3 4 5 6 7; do
13261       ac_script="$ac_script$as_nl$ac_script"
13262     done
13263     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13264     { ac_script=; unset ac_script;}
13265     if test -z "$SED"; then
13266  ac_path_SED_found=false
13267  # Loop through the user's path and test for each of PROGNAME-LIST
13268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13269for as_dir in $PATH
13270do
13271  IFS=$as_save_IFS
13272  test -z "$as_dir" && as_dir=.
13273    for ac_prog in sed gsed; do
13274    for ac_exec_ext in '' $ac_executable_extensions; do
13275      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13276      as_fn_executable_p "$ac_path_SED" || continue
13277# Check for GNU ac_path_SED and select it if it is found.
13278  # Check for GNU $ac_path_SED
13279case `"$ac_path_SED" --version 2>&1` in
13280*GNU*)
13281  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13282*)
13283  ac_count=0
13284  $as_echo_n 0123456789 >"conftest.in"
13285  while :
13286  do
13287    cat "conftest.in" "conftest.in" >"conftest.tmp"
13288    mv "conftest.tmp" "conftest.in"
13289    cp "conftest.in" "conftest.nl"
13290    $as_echo '' >> "conftest.nl"
13291    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13292    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13293    as_fn_arith $ac_count + 1 && ac_count=$as_val
13294    if test $ac_count -gt ${ac_path_SED_max-0}; then
13295      # Best one so far, save it but keep looking for a better one
13296      ac_cv_path_SED="$ac_path_SED"
13297      ac_path_SED_max=$ac_count
13298    fi
13299    # 10*(2^10) chars as input seems more than enough
13300    test $ac_count -gt 10 && break
13301  done
13302  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13303esac
13304
13305      $ac_path_SED_found && break 3
13306    done
13307  done
13308  done
13309IFS=$as_save_IFS
13310  if test -z "$ac_cv_path_SED"; then
13311    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13312  fi
13313else
13314  ac_cv_path_SED=$SED
13315fi
13316
13317fi
13318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13319$as_echo "$ac_cv_path_SED" >&6; }
13320 SED="$ac_cv_path_SED"
13321  rm -f conftest.sed
13322
13323  else
13324    # The variable is set, but is it from the command line or the environment?
13325
13326    # Try to remove the string !SED! from our list.
13327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13329      # If it failed, the variable was not from the command line. Ignore it,
13330      # but warn the user (except for BASH, which is always set by the calling BASH).
13331      if test "xSED" != xBASH; then
13332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13333$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13334      fi
13335      # Try to locate tool using the code snippet
13336      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13337$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13338if ${ac_cv_path_SED+:} false; then :
13339  $as_echo_n "(cached) " >&6
13340else
13341            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13342     for ac_i in 1 2 3 4 5 6 7; do
13343       ac_script="$ac_script$as_nl$ac_script"
13344     done
13345     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13346     { ac_script=; unset ac_script;}
13347     if test -z "$SED"; then
13348  ac_path_SED_found=false
13349  # Loop through the user's path and test for each of PROGNAME-LIST
13350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13351for as_dir in $PATH
13352do
13353  IFS=$as_save_IFS
13354  test -z "$as_dir" && as_dir=.
13355    for ac_prog in sed gsed; do
13356    for ac_exec_ext in '' $ac_executable_extensions; do
13357      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13358      as_fn_executable_p "$ac_path_SED" || continue
13359# Check for GNU ac_path_SED and select it if it is found.
13360  # Check for GNU $ac_path_SED
13361case `"$ac_path_SED" --version 2>&1` in
13362*GNU*)
13363  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13364*)
13365  ac_count=0
13366  $as_echo_n 0123456789 >"conftest.in"
13367  while :
13368  do
13369    cat "conftest.in" "conftest.in" >"conftest.tmp"
13370    mv "conftest.tmp" "conftest.in"
13371    cp "conftest.in" "conftest.nl"
13372    $as_echo '' >> "conftest.nl"
13373    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13374    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13375    as_fn_arith $ac_count + 1 && ac_count=$as_val
13376    if test $ac_count -gt ${ac_path_SED_max-0}; then
13377      # Best one so far, save it but keep looking for a better one
13378      ac_cv_path_SED="$ac_path_SED"
13379      ac_path_SED_max=$ac_count
13380    fi
13381    # 10*(2^10) chars as input seems more than enough
13382    test $ac_count -gt 10 && break
13383  done
13384  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13385esac
13386
13387      $ac_path_SED_found && break 3
13388    done
13389  done
13390  done
13391IFS=$as_save_IFS
13392  if test -z "$ac_cv_path_SED"; then
13393    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13394  fi
13395else
13396  ac_cv_path_SED=$SED
13397fi
13398
13399fi
13400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13401$as_echo "$ac_cv_path_SED" >&6; }
13402 SED="$ac_cv_path_SED"
13403  rm -f conftest.sed
13404
13405    else
13406      # If it succeeded, then it was overridden by the user. We will use it
13407      # for the tool.
13408
13409      # First remove it from the list of overridden variables, so we can test
13410      # for unknown variables in the end.
13411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13412
13413      # Check if we try to supply an empty value
13414      if test "x$SED" = x; then
13415        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13416$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13418$as_echo_n "checking for SED... " >&6; }
13419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13420$as_echo "disabled" >&6; }
13421      else
13422        # Check if the provided tool contains a complete path.
13423        tool_specified="$SED"
13424        tool_basename="${tool_specified##*/}"
13425        if test "x$tool_basename" = "x$tool_specified"; then
13426          # A command without a complete path is provided, search $PATH.
13427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13428$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13429          # Extract the first word of "$tool_basename", so it can be a program name with args.
13430set dummy $tool_basename; ac_word=$2
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13432$as_echo_n "checking for $ac_word... " >&6; }
13433if ${ac_cv_path_SED+:} false; then :
13434  $as_echo_n "(cached) " >&6
13435else
13436  case $SED in
13437  [\\/]* | ?:[\\/]*)
13438  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13439  ;;
13440  *)
13441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13442for as_dir in $PATH
13443do
13444  IFS=$as_save_IFS
13445  test -z "$as_dir" && as_dir=.
13446    for ac_exec_ext in '' $ac_executable_extensions; do
13447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13448    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13450    break 2
13451  fi
13452done
13453  done
13454IFS=$as_save_IFS
13455
13456  ;;
13457esac
13458fi
13459SED=$ac_cv_path_SED
13460if test -n "$SED"; then
13461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13462$as_echo "$SED" >&6; }
13463else
13464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13465$as_echo "no" >&6; }
13466fi
13467
13468
13469          if test "x$SED" = x; then
13470            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13471          fi
13472        else
13473          # Otherwise we believe it is a complete path. Use it as it is.
13474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13475$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13476          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13477$as_echo_n "checking for SED... " >&6; }
13478          if test ! -x "$tool_specified"; then
13479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13480$as_echo "not found" >&6; }
13481            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13482          fi
13483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13484$as_echo "$tool_specified" >&6; }
13485        fi
13486      fi
13487    fi
13488
13489  fi
13490
13491
13492  if test "x$SED" = x; then
13493    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13494  fi
13495
13496
13497
13498  # Always force rm.
13499  RM="$RM -f"
13500
13501  # pwd behaves differently on various platforms and some don't support the -L flag.
13502  # Always use the bash builtin pwd to get uniform behavior.
13503  THEPWDCMD=pwd
13504
13505  # These are not required on all platforms
13506
13507
13508  # Publish this variable in the help.
13509
13510
13511  if [ -z "${CYGPATH+x}" ]; then
13512    # The variable is not set by user, try to locate tool using the code snippet
13513    for ac_prog in cygpath
13514do
13515  # Extract the first word of "$ac_prog", so it can be a program name with args.
13516set dummy $ac_prog; ac_word=$2
13517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13518$as_echo_n "checking for $ac_word... " >&6; }
13519if ${ac_cv_path_CYGPATH+:} false; then :
13520  $as_echo_n "(cached) " >&6
13521else
13522  case $CYGPATH in
13523  [\\/]* | ?:[\\/]*)
13524  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13525  ;;
13526  *)
13527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13528for as_dir in $PATH
13529do
13530  IFS=$as_save_IFS
13531  test -z "$as_dir" && as_dir=.
13532    for ac_exec_ext in '' $ac_executable_extensions; do
13533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13534    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13536    break 2
13537  fi
13538done
13539  done
13540IFS=$as_save_IFS
13541
13542  ;;
13543esac
13544fi
13545CYGPATH=$ac_cv_path_CYGPATH
13546if test -n "$CYGPATH"; then
13547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13548$as_echo "$CYGPATH" >&6; }
13549else
13550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13551$as_echo "no" >&6; }
13552fi
13553
13554
13555  test -n "$CYGPATH" && break
13556done
13557
13558  else
13559    # The variable is set, but is it from the command line or the environment?
13560
13561    # Try to remove the string !CYGPATH! from our list.
13562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13564      # If it failed, the variable was not from the command line. Ignore it,
13565      # but warn the user (except for BASH, which is always set by the calling BASH).
13566      if test "xCYGPATH" != xBASH; then
13567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13568$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13569      fi
13570      # Try to locate tool using the code snippet
13571      for ac_prog in cygpath
13572do
13573  # Extract the first word of "$ac_prog", so it can be a program name with args.
13574set dummy $ac_prog; ac_word=$2
13575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13576$as_echo_n "checking for $ac_word... " >&6; }
13577if ${ac_cv_path_CYGPATH+:} false; then :
13578  $as_echo_n "(cached) " >&6
13579else
13580  case $CYGPATH in
13581  [\\/]* | ?:[\\/]*)
13582  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13583  ;;
13584  *)
13585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13586for as_dir in $PATH
13587do
13588  IFS=$as_save_IFS
13589  test -z "$as_dir" && as_dir=.
13590    for ac_exec_ext in '' $ac_executable_extensions; do
13591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13592    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13594    break 2
13595  fi
13596done
13597  done
13598IFS=$as_save_IFS
13599
13600  ;;
13601esac
13602fi
13603CYGPATH=$ac_cv_path_CYGPATH
13604if test -n "$CYGPATH"; then
13605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13606$as_echo "$CYGPATH" >&6; }
13607else
13608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13609$as_echo "no" >&6; }
13610fi
13611
13612
13613  test -n "$CYGPATH" && break
13614done
13615
13616    else
13617      # If it succeeded, then it was overridden by the user. We will use it
13618      # for the tool.
13619
13620      # First remove it from the list of overridden variables, so we can test
13621      # for unknown variables in the end.
13622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13623
13624      # Check if we try to supply an empty value
13625      if test "x$CYGPATH" = x; then
13626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13627$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13629$as_echo_n "checking for CYGPATH... " >&6; }
13630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13631$as_echo "disabled" >&6; }
13632      else
13633        # Check if the provided tool contains a complete path.
13634        tool_specified="$CYGPATH"
13635        tool_basename="${tool_specified##*/}"
13636        if test "x$tool_basename" = "x$tool_specified"; then
13637          # A command without a complete path is provided, search $PATH.
13638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13639$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
13640          # Extract the first word of "$tool_basename", so it can be a program name with args.
13641set dummy $tool_basename; ac_word=$2
13642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13643$as_echo_n "checking for $ac_word... " >&6; }
13644if ${ac_cv_path_CYGPATH+:} false; then :
13645  $as_echo_n "(cached) " >&6
13646else
13647  case $CYGPATH in
13648  [\\/]* | ?:[\\/]*)
13649  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13650  ;;
13651  *)
13652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13653for as_dir in $PATH
13654do
13655  IFS=$as_save_IFS
13656  test -z "$as_dir" && as_dir=.
13657    for ac_exec_ext in '' $ac_executable_extensions; do
13658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13659    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13661    break 2
13662  fi
13663done
13664  done
13665IFS=$as_save_IFS
13666
13667  ;;
13668esac
13669fi
13670CYGPATH=$ac_cv_path_CYGPATH
13671if test -n "$CYGPATH"; then
13672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13673$as_echo "$CYGPATH" >&6; }
13674else
13675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13676$as_echo "no" >&6; }
13677fi
13678
13679
13680          if test "x$CYGPATH" = x; then
13681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13682          fi
13683        else
13684          # Otherwise we believe it is a complete path. Use it as it is.
13685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
13686$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
13687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13688$as_echo_n "checking for CYGPATH... " >&6; }
13689          if test ! -x "$tool_specified"; then
13690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13691$as_echo "not found" >&6; }
13692            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
13693          fi
13694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13695$as_echo "$tool_specified" >&6; }
13696        fi
13697      fi
13698    fi
13699
13700  fi
13701
13702
13703
13704
13705  # Publish this variable in the help.
13706
13707
13708  if [ -z "${READLINK+x}" ]; then
13709    # The variable is not set by user, try to locate tool using the code snippet
13710    for ac_prog in greadlink readlink
13711do
13712  # Extract the first word of "$ac_prog", so it can be a program name with args.
13713set dummy $ac_prog; ac_word=$2
13714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13715$as_echo_n "checking for $ac_word... " >&6; }
13716if ${ac_cv_path_READLINK+:} false; then :
13717  $as_echo_n "(cached) " >&6
13718else
13719  case $READLINK in
13720  [\\/]* | ?:[\\/]*)
13721  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13722  ;;
13723  *)
13724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13725for as_dir in $PATH
13726do
13727  IFS=$as_save_IFS
13728  test -z "$as_dir" && as_dir=.
13729    for ac_exec_ext in '' $ac_executable_extensions; do
13730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13731    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13733    break 2
13734  fi
13735done
13736  done
13737IFS=$as_save_IFS
13738
13739  ;;
13740esac
13741fi
13742READLINK=$ac_cv_path_READLINK
13743if test -n "$READLINK"; then
13744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13745$as_echo "$READLINK" >&6; }
13746else
13747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13748$as_echo "no" >&6; }
13749fi
13750
13751
13752  test -n "$READLINK" && break
13753done
13754
13755  else
13756    # The variable is set, but is it from the command line or the environment?
13757
13758    # Try to remove the string !READLINK! from our list.
13759    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
13760    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13761      # If it failed, the variable was not from the command line. Ignore it,
13762      # but warn the user (except for BASH, which is always set by the calling BASH).
13763      if test "xREADLINK" != xBASH; then
13764        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
13765$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
13766      fi
13767      # Try to locate tool using the code snippet
13768      for ac_prog in greadlink readlink
13769do
13770  # Extract the first word of "$ac_prog", so it can be a program name with args.
13771set dummy $ac_prog; ac_word=$2
13772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13773$as_echo_n "checking for $ac_word... " >&6; }
13774if ${ac_cv_path_READLINK+:} false; then :
13775  $as_echo_n "(cached) " >&6
13776else
13777  case $READLINK in
13778  [\\/]* | ?:[\\/]*)
13779  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13780  ;;
13781  *)
13782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13783for as_dir in $PATH
13784do
13785  IFS=$as_save_IFS
13786  test -z "$as_dir" && as_dir=.
13787    for ac_exec_ext in '' $ac_executable_extensions; do
13788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13789    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13791    break 2
13792  fi
13793done
13794  done
13795IFS=$as_save_IFS
13796
13797  ;;
13798esac
13799fi
13800READLINK=$ac_cv_path_READLINK
13801if test -n "$READLINK"; then
13802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13803$as_echo "$READLINK" >&6; }
13804else
13805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13806$as_echo "no" >&6; }
13807fi
13808
13809
13810  test -n "$READLINK" && break
13811done
13812
13813    else
13814      # If it succeeded, then it was overridden by the user. We will use it
13815      # for the tool.
13816
13817      # First remove it from the list of overridden variables, so we can test
13818      # for unknown variables in the end.
13819      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13820
13821      # Check if we try to supply an empty value
13822      if test "x$READLINK" = x; then
13823        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
13824$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
13825        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13826$as_echo_n "checking for READLINK... " >&6; }
13827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13828$as_echo "disabled" >&6; }
13829      else
13830        # Check if the provided tool contains a complete path.
13831        tool_specified="$READLINK"
13832        tool_basename="${tool_specified##*/}"
13833        if test "x$tool_basename" = "x$tool_specified"; then
13834          # A command without a complete path is provided, search $PATH.
13835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
13836$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
13837          # Extract the first word of "$tool_basename", so it can be a program name with args.
13838set dummy $tool_basename; ac_word=$2
13839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13840$as_echo_n "checking for $ac_word... " >&6; }
13841if ${ac_cv_path_READLINK+:} false; then :
13842  $as_echo_n "(cached) " >&6
13843else
13844  case $READLINK in
13845  [\\/]* | ?:[\\/]*)
13846  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
13847  ;;
13848  *)
13849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13850for as_dir in $PATH
13851do
13852  IFS=$as_save_IFS
13853  test -z "$as_dir" && as_dir=.
13854    for ac_exec_ext in '' $ac_executable_extensions; do
13855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13856    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
13857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13858    break 2
13859  fi
13860done
13861  done
13862IFS=$as_save_IFS
13863
13864  ;;
13865esac
13866fi
13867READLINK=$ac_cv_path_READLINK
13868if test -n "$READLINK"; then
13869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
13870$as_echo "$READLINK" >&6; }
13871else
13872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13873$as_echo "no" >&6; }
13874fi
13875
13876
13877          if test "x$READLINK" = x; then
13878            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13879          fi
13880        else
13881          # Otherwise we believe it is a complete path. Use it as it is.
13882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
13883$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
13884          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
13885$as_echo_n "checking for READLINK... " >&6; }
13886          if test ! -x "$tool_specified"; then
13887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13888$as_echo "not found" >&6; }
13889            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
13890          fi
13891          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13892$as_echo "$tool_specified" >&6; }
13893        fi
13894      fi
13895    fi
13896
13897  fi
13898
13899
13900
13901
13902  # Publish this variable in the help.
13903
13904
13905  if [ -z "${DF+x}" ]; then
13906    # The variable is not set by user, try to locate tool using the code snippet
13907    for ac_prog in df
13908do
13909  # Extract the first word of "$ac_prog", so it can be a program name with args.
13910set dummy $ac_prog; ac_word=$2
13911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13912$as_echo_n "checking for $ac_word... " >&6; }
13913if ${ac_cv_path_DF+:} false; then :
13914  $as_echo_n "(cached) " >&6
13915else
13916  case $DF in
13917  [\\/]* | ?:[\\/]*)
13918  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13919  ;;
13920  *)
13921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13922for as_dir in $PATH
13923do
13924  IFS=$as_save_IFS
13925  test -z "$as_dir" && as_dir=.
13926    for ac_exec_ext in '' $ac_executable_extensions; do
13927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13928    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13930    break 2
13931  fi
13932done
13933  done
13934IFS=$as_save_IFS
13935
13936  ;;
13937esac
13938fi
13939DF=$ac_cv_path_DF
13940if test -n "$DF"; then
13941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13942$as_echo "$DF" >&6; }
13943else
13944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13945$as_echo "no" >&6; }
13946fi
13947
13948
13949  test -n "$DF" && break
13950done
13951
13952  else
13953    # The variable is set, but is it from the command line or the environment?
13954
13955    # Try to remove the string !DF! from our list.
13956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13958      # If it failed, the variable was not from the command line. Ignore it,
13959      # but warn the user (except for BASH, which is always set by the calling BASH).
13960      if test "xDF" != xBASH; then
13961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13962$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13963      fi
13964      # Try to locate tool using the code snippet
13965      for ac_prog in df
13966do
13967  # Extract the first word of "$ac_prog", so it can be a program name with args.
13968set dummy $ac_prog; ac_word=$2
13969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13970$as_echo_n "checking for $ac_word... " >&6; }
13971if ${ac_cv_path_DF+:} false; then :
13972  $as_echo_n "(cached) " >&6
13973else
13974  case $DF in
13975  [\\/]* | ?:[\\/]*)
13976  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13977  ;;
13978  *)
13979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13980for as_dir in $PATH
13981do
13982  IFS=$as_save_IFS
13983  test -z "$as_dir" && as_dir=.
13984    for ac_exec_ext in '' $ac_executable_extensions; do
13985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13986    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13988    break 2
13989  fi
13990done
13991  done
13992IFS=$as_save_IFS
13993
13994  ;;
13995esac
13996fi
13997DF=$ac_cv_path_DF
13998if test -n "$DF"; then
13999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14000$as_echo "$DF" >&6; }
14001else
14002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14003$as_echo "no" >&6; }
14004fi
14005
14006
14007  test -n "$DF" && break
14008done
14009
14010    else
14011      # If it succeeded, then it was overridden by the user. We will use it
14012      # for the tool.
14013
14014      # First remove it from the list of overridden variables, so we can test
14015      # for unknown variables in the end.
14016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14017
14018      # Check if we try to supply an empty value
14019      if test "x$DF" = x; then
14020        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14021$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14023$as_echo_n "checking for DF... " >&6; }
14024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14025$as_echo "disabled" >&6; }
14026      else
14027        # Check if the provided tool contains a complete path.
14028        tool_specified="$DF"
14029        tool_basename="${tool_specified##*/}"
14030        if test "x$tool_basename" = "x$tool_specified"; then
14031          # A command without a complete path is provided, search $PATH.
14032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14033$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14034          # Extract the first word of "$tool_basename", so it can be a program name with args.
14035set dummy $tool_basename; ac_word=$2
14036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14037$as_echo_n "checking for $ac_word... " >&6; }
14038if ${ac_cv_path_DF+:} false; then :
14039  $as_echo_n "(cached) " >&6
14040else
14041  case $DF in
14042  [\\/]* | ?:[\\/]*)
14043  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14044  ;;
14045  *)
14046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14047for as_dir in $PATH
14048do
14049  IFS=$as_save_IFS
14050  test -z "$as_dir" && as_dir=.
14051    for ac_exec_ext in '' $ac_executable_extensions; do
14052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14053    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14055    break 2
14056  fi
14057done
14058  done
14059IFS=$as_save_IFS
14060
14061  ;;
14062esac
14063fi
14064DF=$ac_cv_path_DF
14065if test -n "$DF"; then
14066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14067$as_echo "$DF" >&6; }
14068else
14069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14070$as_echo "no" >&6; }
14071fi
14072
14073
14074          if test "x$DF" = x; then
14075            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14076          fi
14077        else
14078          # Otherwise we believe it is a complete path. Use it as it is.
14079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14080$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14081          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14082$as_echo_n "checking for DF... " >&6; }
14083          if test ! -x "$tool_specified"; then
14084            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14085$as_echo "not found" >&6; }
14086            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14087          fi
14088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14089$as_echo "$tool_specified" >&6; }
14090        fi
14091      fi
14092    fi
14093
14094  fi
14095
14096
14097
14098
14099  # Publish this variable in the help.
14100
14101
14102  if [ -z "${CPIO+x}" ]; then
14103    # The variable is not set by user, try to locate tool using the code snippet
14104    for ac_prog in cpio bsdcpio
14105do
14106  # Extract the first word of "$ac_prog", so it can be a program name with args.
14107set dummy $ac_prog; ac_word=$2
14108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14109$as_echo_n "checking for $ac_word... " >&6; }
14110if ${ac_cv_path_CPIO+:} false; then :
14111  $as_echo_n "(cached) " >&6
14112else
14113  case $CPIO in
14114  [\\/]* | ?:[\\/]*)
14115  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14116  ;;
14117  *)
14118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14119for as_dir in $PATH
14120do
14121  IFS=$as_save_IFS
14122  test -z "$as_dir" && as_dir=.
14123    for ac_exec_ext in '' $ac_executable_extensions; do
14124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14125    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14127    break 2
14128  fi
14129done
14130  done
14131IFS=$as_save_IFS
14132
14133  ;;
14134esac
14135fi
14136CPIO=$ac_cv_path_CPIO
14137if test -n "$CPIO"; then
14138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14139$as_echo "$CPIO" >&6; }
14140else
14141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14142$as_echo "no" >&6; }
14143fi
14144
14145
14146  test -n "$CPIO" && break
14147done
14148
14149  else
14150    # The variable is set, but is it from the command line or the environment?
14151
14152    # Try to remove the string !CPIO! from our list.
14153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14155      # If it failed, the variable was not from the command line. Ignore it,
14156      # but warn the user (except for BASH, which is always set by the calling BASH).
14157      if test "xCPIO" != xBASH; then
14158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14159$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14160      fi
14161      # Try to locate tool using the code snippet
14162      for ac_prog in cpio bsdcpio
14163do
14164  # Extract the first word of "$ac_prog", so it can be a program name with args.
14165set dummy $ac_prog; ac_word=$2
14166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14167$as_echo_n "checking for $ac_word... " >&6; }
14168if ${ac_cv_path_CPIO+:} false; then :
14169  $as_echo_n "(cached) " >&6
14170else
14171  case $CPIO in
14172  [\\/]* | ?:[\\/]*)
14173  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14174  ;;
14175  *)
14176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14177for as_dir in $PATH
14178do
14179  IFS=$as_save_IFS
14180  test -z "$as_dir" && as_dir=.
14181    for ac_exec_ext in '' $ac_executable_extensions; do
14182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14183    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14185    break 2
14186  fi
14187done
14188  done
14189IFS=$as_save_IFS
14190
14191  ;;
14192esac
14193fi
14194CPIO=$ac_cv_path_CPIO
14195if test -n "$CPIO"; then
14196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14197$as_echo "$CPIO" >&6; }
14198else
14199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14200$as_echo "no" >&6; }
14201fi
14202
14203
14204  test -n "$CPIO" && break
14205done
14206
14207    else
14208      # If it succeeded, then it was overridden by the user. We will use it
14209      # for the tool.
14210
14211      # First remove it from the list of overridden variables, so we can test
14212      # for unknown variables in the end.
14213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14214
14215      # Check if we try to supply an empty value
14216      if test "x$CPIO" = x; then
14217        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14218$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14220$as_echo_n "checking for CPIO... " >&6; }
14221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14222$as_echo "disabled" >&6; }
14223      else
14224        # Check if the provided tool contains a complete path.
14225        tool_specified="$CPIO"
14226        tool_basename="${tool_specified##*/}"
14227        if test "x$tool_basename" = "x$tool_specified"; then
14228          # A command without a complete path is provided, search $PATH.
14229          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14230$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14231          # Extract the first word of "$tool_basename", so it can be a program name with args.
14232set dummy $tool_basename; ac_word=$2
14233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14234$as_echo_n "checking for $ac_word... " >&6; }
14235if ${ac_cv_path_CPIO+:} false; then :
14236  $as_echo_n "(cached) " >&6
14237else
14238  case $CPIO in
14239  [\\/]* | ?:[\\/]*)
14240  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14241  ;;
14242  *)
14243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14244for as_dir in $PATH
14245do
14246  IFS=$as_save_IFS
14247  test -z "$as_dir" && as_dir=.
14248    for ac_exec_ext in '' $ac_executable_extensions; do
14249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14250    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14252    break 2
14253  fi
14254done
14255  done
14256IFS=$as_save_IFS
14257
14258  ;;
14259esac
14260fi
14261CPIO=$ac_cv_path_CPIO
14262if test -n "$CPIO"; then
14263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14264$as_echo "$CPIO" >&6; }
14265else
14266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14267$as_echo "no" >&6; }
14268fi
14269
14270
14271          if test "x$CPIO" = x; then
14272            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14273          fi
14274        else
14275          # Otherwise we believe it is a complete path. Use it as it is.
14276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14277$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14278          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14279$as_echo_n "checking for CPIO... " >&6; }
14280          if test ! -x "$tool_specified"; then
14281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14282$as_echo "not found" >&6; }
14283            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14284          fi
14285          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14286$as_echo "$tool_specified" >&6; }
14287        fi
14288      fi
14289    fi
14290
14291  fi
14292
14293
14294
14295
14296  # Publish this variable in the help.
14297
14298
14299  if [ -z "${NICE+x}" ]; then
14300    # The variable is not set by user, try to locate tool using the code snippet
14301    for ac_prog in nice
14302do
14303  # Extract the first word of "$ac_prog", so it can be a program name with args.
14304set dummy $ac_prog; ac_word=$2
14305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14306$as_echo_n "checking for $ac_word... " >&6; }
14307if ${ac_cv_path_NICE+:} false; then :
14308  $as_echo_n "(cached) " >&6
14309else
14310  case $NICE in
14311  [\\/]* | ?:[\\/]*)
14312  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14313  ;;
14314  *)
14315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14316for as_dir in $PATH
14317do
14318  IFS=$as_save_IFS
14319  test -z "$as_dir" && as_dir=.
14320    for ac_exec_ext in '' $ac_executable_extensions; do
14321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14322    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14324    break 2
14325  fi
14326done
14327  done
14328IFS=$as_save_IFS
14329
14330  ;;
14331esac
14332fi
14333NICE=$ac_cv_path_NICE
14334if test -n "$NICE"; then
14335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14336$as_echo "$NICE" >&6; }
14337else
14338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14339$as_echo "no" >&6; }
14340fi
14341
14342
14343  test -n "$NICE" && break
14344done
14345
14346  else
14347    # The variable is set, but is it from the command line or the environment?
14348
14349    # Try to remove the string !NICE! from our list.
14350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14352      # If it failed, the variable was not from the command line. Ignore it,
14353      # but warn the user (except for BASH, which is always set by the calling BASH).
14354      if test "xNICE" != xBASH; then
14355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14356$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14357      fi
14358      # Try to locate tool using the code snippet
14359      for ac_prog in nice
14360do
14361  # Extract the first word of "$ac_prog", so it can be a program name with args.
14362set dummy $ac_prog; ac_word=$2
14363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14364$as_echo_n "checking for $ac_word... " >&6; }
14365if ${ac_cv_path_NICE+:} false; then :
14366  $as_echo_n "(cached) " >&6
14367else
14368  case $NICE in
14369  [\\/]* | ?:[\\/]*)
14370  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14371  ;;
14372  *)
14373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14374for as_dir in $PATH
14375do
14376  IFS=$as_save_IFS
14377  test -z "$as_dir" && as_dir=.
14378    for ac_exec_ext in '' $ac_executable_extensions; do
14379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14380    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14382    break 2
14383  fi
14384done
14385  done
14386IFS=$as_save_IFS
14387
14388  ;;
14389esac
14390fi
14391NICE=$ac_cv_path_NICE
14392if test -n "$NICE"; then
14393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14394$as_echo "$NICE" >&6; }
14395else
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14397$as_echo "no" >&6; }
14398fi
14399
14400
14401  test -n "$NICE" && break
14402done
14403
14404    else
14405      # If it succeeded, then it was overridden by the user. We will use it
14406      # for the tool.
14407
14408      # First remove it from the list of overridden variables, so we can test
14409      # for unknown variables in the end.
14410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14411
14412      # Check if we try to supply an empty value
14413      if test "x$NICE" = x; then
14414        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14415$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14416        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14417$as_echo_n "checking for NICE... " >&6; }
14418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14419$as_echo "disabled" >&6; }
14420      else
14421        # Check if the provided tool contains a complete path.
14422        tool_specified="$NICE"
14423        tool_basename="${tool_specified##*/}"
14424        if test "x$tool_basename" = "x$tool_specified"; then
14425          # A command without a complete path is provided, search $PATH.
14426          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14427$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14428          # Extract the first word of "$tool_basename", so it can be a program name with args.
14429set dummy $tool_basename; ac_word=$2
14430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14431$as_echo_n "checking for $ac_word... " >&6; }
14432if ${ac_cv_path_NICE+:} false; then :
14433  $as_echo_n "(cached) " >&6
14434else
14435  case $NICE in
14436  [\\/]* | ?:[\\/]*)
14437  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14438  ;;
14439  *)
14440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14441for as_dir in $PATH
14442do
14443  IFS=$as_save_IFS
14444  test -z "$as_dir" && as_dir=.
14445    for ac_exec_ext in '' $ac_executable_extensions; do
14446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14447    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14449    break 2
14450  fi
14451done
14452  done
14453IFS=$as_save_IFS
14454
14455  ;;
14456esac
14457fi
14458NICE=$ac_cv_path_NICE
14459if test -n "$NICE"; then
14460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14461$as_echo "$NICE" >&6; }
14462else
14463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14464$as_echo "no" >&6; }
14465fi
14466
14467
14468          if test "x$NICE" = x; then
14469            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14470          fi
14471        else
14472          # Otherwise we believe it is a complete path. Use it as it is.
14473          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14474$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14475          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14476$as_echo_n "checking for NICE... " >&6; }
14477          if test ! -x "$tool_specified"; then
14478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14479$as_echo "not found" >&6; }
14480            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14481          fi
14482          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14483$as_echo "$tool_specified" >&6; }
14484        fi
14485      fi
14486    fi
14487
14488  fi
14489
14490
14491
14492
14493# Now we can determine OpenJDK build and target platforms. This is required to
14494# have early on.
14495# Make sure we can run config.sub.
14496$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14497  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14498
14499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14500$as_echo_n "checking build system type... " >&6; }
14501if ${ac_cv_build+:} false; then :
14502  $as_echo_n "(cached) " >&6
14503else
14504  ac_build_alias=$build_alias
14505test "x$ac_build_alias" = x &&
14506  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14507test "x$ac_build_alias" = x &&
14508  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14509ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14510  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14511
14512fi
14513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14514$as_echo "$ac_cv_build" >&6; }
14515case $ac_cv_build in
14516*-*-*) ;;
14517*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14518esac
14519build=$ac_cv_build
14520ac_save_IFS=$IFS; IFS='-'
14521set x $ac_cv_build
14522shift
14523build_cpu=$1
14524build_vendor=$2
14525shift; shift
14526# Remember, the first character of IFS is used to create $*,
14527# except with old shells:
14528build_os=$*
14529IFS=$ac_save_IFS
14530case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14531
14532
14533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14534$as_echo_n "checking host system type... " >&6; }
14535if ${ac_cv_host+:} false; then :
14536  $as_echo_n "(cached) " >&6
14537else
14538  if test "x$host_alias" = x; then
14539  ac_cv_host=$ac_cv_build
14540else
14541  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14542    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14543fi
14544
14545fi
14546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14547$as_echo "$ac_cv_host" >&6; }
14548case $ac_cv_host in
14549*-*-*) ;;
14550*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14551esac
14552host=$ac_cv_host
14553ac_save_IFS=$IFS; IFS='-'
14554set x $ac_cv_host
14555shift
14556host_cpu=$1
14557host_vendor=$2
14558shift; shift
14559# Remember, the first character of IFS is used to create $*,
14560# except with old shells:
14561host_os=$*
14562IFS=$ac_save_IFS
14563case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14564
14565
14566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14567$as_echo_n "checking target system type... " >&6; }
14568if ${ac_cv_target+:} false; then :
14569  $as_echo_n "(cached) " >&6
14570else
14571  if test "x$target_alias" = x; then
14572  ac_cv_target=$ac_cv_host
14573else
14574  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14575    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14576fi
14577
14578fi
14579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14580$as_echo "$ac_cv_target" >&6; }
14581case $ac_cv_target in
14582*-*-*) ;;
14583*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14584esac
14585target=$ac_cv_target
14586ac_save_IFS=$IFS; IFS='-'
14587set x $ac_cv_target
14588shift
14589target_cpu=$1
14590target_vendor=$2
14591shift; shift
14592# Remember, the first character of IFS is used to create $*,
14593# except with old shells:
14594target_os=$*
14595IFS=$ac_save_IFS
14596case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14597
14598
14599# The aliases save the names the user supplied, while $host etc.
14600# will get canonicalized.
14601test -n "$target_alias" &&
14602  test "$program_prefix$program_suffix$program_transform_name" = \
14603    NONENONEs,x,x, &&
14604  program_prefix=${target_alias}-
14605
14606  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14607  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14608  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14609  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14610  # to use the configure naming style.
14611
14612
14613
14614
14615
14616  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14617  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14618  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14619  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14620  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14621  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14622
14623
14624
14625  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14626
14627  case "$build_os" in
14628    *linux*)
14629      VAR_OS=linux
14630      VAR_OS_TYPE=unix
14631      ;;
14632    *solaris*)
14633      VAR_OS=solaris
14634      VAR_OS_TYPE=unix
14635      ;;
14636    *darwin*)
14637      VAR_OS=macosx
14638      VAR_OS_TYPE=unix
14639      ;;
14640    *bsd*)
14641      VAR_OS=bsd
14642      VAR_OS_TYPE=unix
14643      ;;
14644    *cygwin*)
14645      VAR_OS=windows
14646      VAR_OS_ENV=windows.cygwin
14647      ;;
14648    *mingw*)
14649      VAR_OS=windows
14650      VAR_OS_ENV=windows.msys
14651      ;;
14652    *aix*)
14653      VAR_OS=aix
14654      VAR_OS_TYPE=unix
14655      ;;
14656    *)
14657      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
14658      ;;
14659  esac
14660
14661
14662  # First argument is the cpu name from the trip/quad
14663  case "$build_cpu" in
14664    x86_64)
14665      VAR_CPU=x86_64
14666      VAR_CPU_ARCH=x86
14667      VAR_CPU_BITS=64
14668      VAR_CPU_ENDIAN=little
14669      ;;
14670    i?86)
14671      VAR_CPU=x86
14672      VAR_CPU_ARCH=x86
14673      VAR_CPU_BITS=32
14674      VAR_CPU_ENDIAN=little
14675      ;;
14676    arm*)
14677      VAR_CPU=arm
14678      VAR_CPU_ARCH=arm
14679      VAR_CPU_BITS=32
14680      VAR_CPU_ENDIAN=little
14681      ;;
14682    aarch64)
14683      VAR_CPU=aarch64
14684      VAR_CPU_ARCH=aarch64
14685      VAR_CPU_BITS=64
14686      VAR_CPU_ENDIAN=little
14687      ;;
14688    powerpc)
14689      VAR_CPU=ppc
14690      VAR_CPU_ARCH=ppc
14691      VAR_CPU_BITS=32
14692      VAR_CPU_ENDIAN=big
14693      ;;
14694    powerpc64)
14695      VAR_CPU=ppc64
14696      VAR_CPU_ARCH=ppc
14697      VAR_CPU_BITS=64
14698      VAR_CPU_ENDIAN=big
14699      ;;
14700    powerpc64le)
14701      VAR_CPU=ppc64
14702      VAR_CPU_ARCH=ppc
14703      VAR_CPU_BITS=64
14704      VAR_CPU_ENDIAN=little
14705      ;;
14706    s390)
14707      VAR_CPU=s390
14708      VAR_CPU_ARCH=s390
14709      VAR_CPU_BITS=32
14710      VAR_CPU_ENDIAN=big
14711      ;;
14712    s390x)
14713      VAR_CPU=s390x
14714      VAR_CPU_ARCH=s390
14715      VAR_CPU_BITS=64
14716      VAR_CPU_ENDIAN=big
14717      ;;
14718    sparc)
14719      VAR_CPU=sparc
14720      VAR_CPU_ARCH=sparc
14721      VAR_CPU_BITS=32
14722      VAR_CPU_ENDIAN=big
14723      ;;
14724    sparcv9|sparc64)
14725      VAR_CPU=sparcv9
14726      VAR_CPU_ARCH=sparc
14727      VAR_CPU_BITS=64
14728      VAR_CPU_ENDIAN=big
14729      ;;
14730    *)
14731      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
14732      ;;
14733  esac
14734
14735  # ..and setup our own variables. (Do this explicitely to facilitate searching)
14736  OPENJDK_BUILD_OS="$VAR_OS"
14737  if test "x$VAR_OS_TYPE" != x; then
14738    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
14739  else
14740    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
14741  fi
14742  if test "x$VAR_OS_ENV" != x; then
14743    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
14744  else
14745    OPENJDK_BUILD_OS_ENV="$VAR_OS"
14746  fi
14747  OPENJDK_BUILD_CPU="$VAR_CPU"
14748  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
14749  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
14750  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14751
14752
14753
14754
14755
14756
14757
14758
14759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
14760$as_echo_n "checking openjdk-build os-cpu... " >&6; }
14761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
14762$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
14763
14764  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14765
14766  case "$host_os" in
14767    *linux*)
14768      VAR_OS=linux
14769      VAR_OS_TYPE=unix
14770      ;;
14771    *solaris*)
14772      VAR_OS=solaris
14773      VAR_OS_TYPE=unix
14774      ;;
14775    *darwin*)
14776      VAR_OS=macosx
14777      VAR_OS_TYPE=unix
14778      ;;
14779    *bsd*)
14780      VAR_OS=bsd
14781      VAR_OS_TYPE=unix
14782      ;;
14783    *cygwin*)
14784      VAR_OS=windows
14785      VAR_OS_ENV=windows.cygwin
14786      ;;
14787    *mingw*)
14788      VAR_OS=windows
14789      VAR_OS_ENV=windows.msys
14790      ;;
14791    *aix*)
14792      VAR_OS=aix
14793      VAR_OS_TYPE=unix
14794      ;;
14795    *)
14796      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
14797      ;;
14798  esac
14799
14800
14801  # First argument is the cpu name from the trip/quad
14802  case "$host_cpu" in
14803    x86_64)
14804      VAR_CPU=x86_64
14805      VAR_CPU_ARCH=x86
14806      VAR_CPU_BITS=64
14807      VAR_CPU_ENDIAN=little
14808      ;;
14809    i?86)
14810      VAR_CPU=x86
14811      VAR_CPU_ARCH=x86
14812      VAR_CPU_BITS=32
14813      VAR_CPU_ENDIAN=little
14814      ;;
14815    arm*)
14816      VAR_CPU=arm
14817      VAR_CPU_ARCH=arm
14818      VAR_CPU_BITS=32
14819      VAR_CPU_ENDIAN=little
14820      ;;
14821    aarch64)
14822      VAR_CPU=aarch64
14823      VAR_CPU_ARCH=aarch64
14824      VAR_CPU_BITS=64
14825      VAR_CPU_ENDIAN=little
14826      ;;
14827    powerpc)
14828      VAR_CPU=ppc
14829      VAR_CPU_ARCH=ppc
14830      VAR_CPU_BITS=32
14831      VAR_CPU_ENDIAN=big
14832      ;;
14833    powerpc64)
14834      VAR_CPU=ppc64
14835      VAR_CPU_ARCH=ppc
14836      VAR_CPU_BITS=64
14837      VAR_CPU_ENDIAN=big
14838      ;;
14839    powerpc64le)
14840      VAR_CPU=ppc64
14841      VAR_CPU_ARCH=ppc
14842      VAR_CPU_BITS=64
14843      VAR_CPU_ENDIAN=little
14844      ;;
14845    s390)
14846      VAR_CPU=s390
14847      VAR_CPU_ARCH=s390
14848      VAR_CPU_BITS=32
14849      VAR_CPU_ENDIAN=big
14850      ;;
14851    s390x)
14852      VAR_CPU=s390x
14853      VAR_CPU_ARCH=s390
14854      VAR_CPU_BITS=64
14855      VAR_CPU_ENDIAN=big
14856      ;;
14857    sparc)
14858      VAR_CPU=sparc
14859      VAR_CPU_ARCH=sparc
14860      VAR_CPU_BITS=32
14861      VAR_CPU_ENDIAN=big
14862      ;;
14863    sparcv9|sparc64)
14864      VAR_CPU=sparcv9
14865      VAR_CPU_ARCH=sparc
14866      VAR_CPU_BITS=64
14867      VAR_CPU_ENDIAN=big
14868      ;;
14869    *)
14870      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
14871      ;;
14872  esac
14873
14874  # ... and setup our own variables. (Do this explicitely to facilitate searching)
14875  OPENJDK_TARGET_OS="$VAR_OS"
14876  if test "x$VAR_OS_TYPE" != x; then
14877    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
14878  else
14879    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
14880  fi
14881  if test "x$VAR_OS_ENV" != x; then
14882    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
14883  else
14884    OPENJDK_TARGET_OS_ENV="$VAR_OS"
14885  fi
14886  OPENJDK_TARGET_CPU="$VAR_CPU"
14887  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
14888  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
14889  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
14890
14891
14892
14893
14894
14895
14896
14897
14898  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
14899$as_echo_n "checking openjdk-target os-cpu... " >&6; }
14900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
14901$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
14902
14903
14904
14905# Check whether --with-target-bits was given.
14906if test "${with_target_bits+set}" = set; then :
14907  withval=$with_target_bits;
14908fi
14909
14910
14911  # We have three types of compiles:
14912  # native  == normal compilation, target system == build system
14913  # cross   == traditional cross compilation, target system != build system; special toolchain needed
14914  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
14915  #
14916  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
14917    # We're doing a proper cross-compilation
14918    COMPILE_TYPE="cross"
14919  else
14920    COMPILE_TYPE="native"
14921  fi
14922
14923  if test "x$with_target_bits" != x; then
14924    if test "x$COMPILE_TYPE" = "xcross"; then
14925      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
14926    fi
14927
14928    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14929      # A reduced build is requested
14930      COMPILE_TYPE="reduced"
14931      OPENJDK_TARGET_CPU_BITS=32
14932      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
14933        OPENJDK_TARGET_CPU=x86
14934      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
14935        OPENJDK_TARGET_CPU=sparc
14936      else
14937        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
14938      fi
14939    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
14940      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
14941    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
14942      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
14943$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
14944    else
14945      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
14946    fi
14947  fi
14948
14949
14950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
14951$as_echo_n "checking compilation type... " >&6; }
14952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
14953$as_echo "$COMPILE_TYPE" >&6; }
14954
14955
14956  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
14957    REQUIRED_OS_NAME=SunOS
14958    REQUIRED_OS_VERSION=5.10
14959  fi
14960  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
14961    REQUIRED_OS_NAME=Linux
14962    REQUIRED_OS_VERSION=2.6
14963  fi
14964  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14965    REQUIRED_OS_NAME=Windows
14966    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
14967      REQUIRED_OS_VERSION=5.2
14968    else
14969      REQUIRED_OS_VERSION=5.1
14970    fi
14971  fi
14972  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14973    REQUIRED_OS_NAME=Darwin
14974    REQUIRED_OS_VERSION=11.2
14975  fi
14976
14977
14978
14979
14980
14981  # Also store the legacy naming of the cpu.
14982  # Ie i586 and amd64 instead of x86 and x86_64
14983  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
14984  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14985    OPENJDK_TARGET_CPU_LEGACY="i586"
14986  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14987    # On all platforms except MacOSX replace x86_64 with amd64.
14988    OPENJDK_TARGET_CPU_LEGACY="amd64"
14989  fi
14990
14991
14992  # And the second legacy naming of the cpu.
14993  # Ie i386 and amd64 instead of x86 and x86_64.
14994  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
14995  if test "x$OPENJDK_TARGET_CPU" = xx86; then
14996    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
14997  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
14998    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
14999  fi
15000
15001
15002  # This is the name of the cpu (but using i386 and amd64 instead of
15003  # x86 and x86_64, respectively), preceeded by a /, to be used when
15004  # locating libraries. On macosx, it's empty, though.
15005  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15006  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15007    OPENJDK_TARGET_CPU_LIBDIR=""
15008  fi
15009
15010
15011  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15012  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15013  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15014  OPENJDK_TARGET_CPU_ISADIR=""
15015  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15016    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15017      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15018    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15019      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15020    fi
15021  fi
15022
15023
15024  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15025  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15026  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15027    # On linux only, we replace x86 with i386.
15028    OPENJDK_TARGET_CPU_OSARCH="i386"
15029  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15030    # On all platforms except macosx, we replace x86_64 with amd64.
15031    OPENJDK_TARGET_CPU_OSARCH="amd64"
15032  fi
15033
15034
15035  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15036  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15037    OPENJDK_TARGET_CPU_JLI="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_JLI="amd64"
15041  fi
15042  # Now setup the -D flags for building libjli.
15043  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15044  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15045    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15046      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15047    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15048      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15049    fi
15050  fi
15051
15052
15053  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15054      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15055  else
15056      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15057  fi
15058
15059
15060  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15061    A_LP64="LP64:="
15062    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15063    # unpack200.exe
15064    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15065      ADD_LP64="-D_LP64=1"
15066    fi
15067  fi
15068  LP64=$A_LP64
15069
15070
15071  if test "x$COMPILE_TYPE" = "xcross"; then
15072    # FIXME: ... or should this include reduced builds..?
15073    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15074  else
15075    DEFINE_CROSS_COMPILE_ARCH=""
15076  fi
15077
15078
15079  # ZERO_ARCHDEF is used to enable architecture-specific code
15080  case "${OPENJDK_TARGET_CPU}" in
15081    ppc)     ZERO_ARCHDEF=PPC32 ;;
15082    ppc64)   ZERO_ARCHDEF=PPC64 ;;
15083    s390*)   ZERO_ARCHDEF=S390  ;;
15084    sparc*)  ZERO_ARCHDEF=SPARC ;;
15085    x86_64*) ZERO_ARCHDEF=AMD64 ;;
15086    x86)     ZERO_ARCHDEF=IA32  ;;
15087    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
15088  esac
15089
15090
15091
15092
15093# Continue setting up basic stuff. Most remaining code require fundamental tools.
15094
15095  # Save the current directory this script was started from
15096  CURDIR="$PWD"
15097
15098  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15099  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15100  # was not available at that time.
15101  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15102  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15103    ORIGINAL_PATH="$REWRITTEN_PATH"
15104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15105$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15106  fi
15107
15108  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15109    PATH_SEP=";"
15110
15111  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15112  if test $SRC_ROOT_LENGTH -gt 100; then
15113    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15114  fi
15115
15116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15118$as_echo_n "checking cygwin release... " >&6; }
15119    CYGWIN_VERSION=`$UNAME -r`
15120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15121$as_echo "$CYGWIN_VERSION" >&6; }
15122    WINDOWS_ENV_VENDOR='cygwin'
15123    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15124
15125    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15126    if test "x$CYGWIN_VERSION_OLD" != x; then
15127      { $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
15128$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;}
15129      as_fn_error $? "Cannot continue" "$LINENO" 5
15130    fi
15131    if test "x$CYGPATH" = x; then
15132      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15133    fi
15134    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15135$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15136    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15137    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15138    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15139    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15141$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15142    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15143    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15144    if test "x$test_cygdrive_prefix" = x; then
15145      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15146    fi
15147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15149$as_echo_n "checking msys release... " >&6; }
15150    MSYS_VERSION=`$UNAME -r`
15151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15152$as_echo "$MSYS_VERSION" >&6; }
15153
15154    WINDOWS_ENV_VENDOR='msys'
15155    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15156
15157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15158$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15159    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15160    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15161
15162  windows_path="$MSYS_ROOT_PATH"
15163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15164    unix_path=`$CYGPATH -u "$windows_path"`
15165    MSYS_ROOT_PATH="$unix_path"
15166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15168    MSYS_ROOT_PATH="$unix_path"
15169  fi
15170
15171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15172$as_echo "$MSYS_ROOT_PATH" >&6; }
15173    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15174  else
15175    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15176  fi
15177
15178  # Test if windows or unix (cygwin/msys) find is first in path.
15179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15180$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15181  FIND_BINARY_OUTPUT=`find --version 2>&1`
15182  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15184$as_echo "unix style" >&6; }
15185  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15187$as_echo "Windows" >&6; }
15188    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15189$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15190    { $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
15191$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15192    as_fn_error $? "Cannot continue" "$LINENO" 5
15193  else
15194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15195$as_echo "unknown" >&6; }
15196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15197$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15198  fi
15199
15200  else
15201    PATH_SEP=":"
15202  fi
15203
15204
15205  # We get the top-level directory from the supporting wrappers.
15206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15207$as_echo_n "checking for top-level directory... " >&6; }
15208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15209$as_echo "$TOPDIR" >&6; }
15210
15211
15212  # Save the original version of TOPDIR for string comparisons
15213  ORIGINAL_TOPDIR="$TOPDIR"
15214
15215
15216  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15217
15218  # Only process if variable expands to non-empty
15219
15220  if test "x$CURDIR" != x; then
15221    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15222
15223  # Input might be given as Windows format, start by converting to
15224  # unix format.
15225  path="$CURDIR"
15226  new_path=`$CYGPATH -u "$path"`
15227
15228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15231  # "foo.exe" is OK but "foo" is an error.
15232  #
15233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15234  # It is also a way to make sure we got the proper file name for the real test later on.
15235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15236  if test "x$test_shortpath" = x; then
15237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15238$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15239    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15240  fi
15241
15242  # Call helper function which possibly converts this using DOS-style short mode.
15243  # If so, the updated path is stored in $new_path.
15244
15245  input_path="$new_path"
15246  # Check if we need to convert this using DOS-style short mode. If the path
15247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15248  # take no chances and rewrite it.
15249  # Note: m4 eats our [], so we need to use [ and ] instead.
15250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15251  if test "x$has_forbidden_chars" != x; then
15252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15256      # Going to short mode and back again did indeed matter. Since short mode is
15257      # case insensitive, let's make it lowercase to improve readability.
15258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15259      # Now convert it back to Unix-style (cygpath)
15260      input_path=`$CYGPATH -u "$shortmode_path"`
15261      new_path="$input_path"
15262    fi
15263  fi
15264
15265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15266  if test "x$test_cygdrive_prefix" = x; then
15267    # As a simple fix, exclude /usr/bin since it's not a real path.
15268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15270      # a path prefixed by /cygdrive for fixpath to work.
15271      new_path="$CYGWIN_ROOT_PATH$input_path"
15272    fi
15273  fi
15274
15275
15276  if test "x$path" != "x$new_path"; then
15277    CURDIR="$new_path"
15278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15279$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15280  fi
15281
15282    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15283
15284  path="$CURDIR"
15285  has_colon=`$ECHO $path | $GREP ^.:`
15286  new_path="$path"
15287  if test "x$has_colon" = x; then
15288    # Not in mixed or Windows style, start by that.
15289    new_path=`cmd //c echo $path`
15290  fi
15291
15292
15293  input_path="$new_path"
15294  # Check if we need to convert this using DOS-style short mode. If the path
15295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15296  # take no chances and rewrite it.
15297  # Note: m4 eats our [], so we need to use [ and ] instead.
15298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15299  if test "x$has_forbidden_chars" != x; then
15300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15302  fi
15303
15304
15305  windows_path="$new_path"
15306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15307    unix_path=`$CYGPATH -u "$windows_path"`
15308    new_path="$unix_path"
15309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15311    new_path="$unix_path"
15312  fi
15313
15314  if test "x$path" != "x$new_path"; then
15315    CURDIR="$new_path"
15316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15317$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15318  fi
15319
15320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15322
15323    else
15324      # We're on a unix platform. Hooray! :)
15325      path="$CURDIR"
15326      has_space=`$ECHO "$path" | $GREP " "`
15327      if test "x$has_space" != x; then
15328        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15329$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15330        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15331      fi
15332
15333      # Use eval to expand a potential ~
15334      eval path="$path"
15335      if test ! -f "$path" && test ! -d "$path"; then
15336        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15337      fi
15338
15339      if test -d "$path"; then
15340        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15341      else
15342        dir="`$DIRNAME "$path"`"
15343        base="`$BASENAME "$path"`"
15344        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15345      fi
15346    fi
15347  fi
15348
15349
15350  # Only process if variable expands to non-empty
15351
15352  if test "x$TOPDIR" != x; then
15353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15354
15355  # Input might be given as Windows format, start by converting to
15356  # unix format.
15357  path="$TOPDIR"
15358  new_path=`$CYGPATH -u "$path"`
15359
15360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15363  # "foo.exe" is OK but "foo" is an error.
15364  #
15365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15366  # It is also a way to make sure we got the proper file name for the real test later on.
15367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15368  if test "x$test_shortpath" = x; then
15369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15370$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15371    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15372  fi
15373
15374  # Call helper function which possibly converts this using DOS-style short mode.
15375  # If so, the updated path is stored in $new_path.
15376
15377  input_path="$new_path"
15378  # Check if we need to convert this using DOS-style short mode. If the path
15379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15380  # take no chances and rewrite it.
15381  # Note: m4 eats our [], so we need to use [ and ] instead.
15382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15383  if test "x$has_forbidden_chars" != x; then
15384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15388      # Going to short mode and back again did indeed matter. Since short mode is
15389      # case insensitive, let's make it lowercase to improve readability.
15390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15391      # Now convert it back to Unix-style (cygpath)
15392      input_path=`$CYGPATH -u "$shortmode_path"`
15393      new_path="$input_path"
15394    fi
15395  fi
15396
15397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15398  if test "x$test_cygdrive_prefix" = x; then
15399    # As a simple fix, exclude /usr/bin since it's not a real path.
15400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15402      # a path prefixed by /cygdrive for fixpath to work.
15403      new_path="$CYGWIN_ROOT_PATH$input_path"
15404    fi
15405  fi
15406
15407
15408  if test "x$path" != "x$new_path"; then
15409    TOPDIR="$new_path"
15410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15411$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15412  fi
15413
15414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15415
15416  path="$TOPDIR"
15417  has_colon=`$ECHO $path | $GREP ^.:`
15418  new_path="$path"
15419  if test "x$has_colon" = x; then
15420    # Not in mixed or Windows style, start by that.
15421    new_path=`cmd //c echo $path`
15422  fi
15423
15424
15425  input_path="$new_path"
15426  # Check if we need to convert this using DOS-style short mode. If the path
15427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15428  # take no chances and rewrite it.
15429  # Note: m4 eats our [], so we need to use [ and ] instead.
15430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15431  if test "x$has_forbidden_chars" != x; then
15432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15434  fi
15435
15436
15437  windows_path="$new_path"
15438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15439    unix_path=`$CYGPATH -u "$windows_path"`
15440    new_path="$unix_path"
15441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15443    new_path="$unix_path"
15444  fi
15445
15446  if test "x$path" != "x$new_path"; then
15447    TOPDIR="$new_path"
15448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15449$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15450  fi
15451
15452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15454
15455    else
15456      # We're on a unix platform. Hooray! :)
15457      path="$TOPDIR"
15458      has_space=`$ECHO "$path" | $GREP " "`
15459      if test "x$has_space" != x; then
15460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15461$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15463      fi
15464
15465      # Use eval to expand a potential ~
15466      eval path="$path"
15467      if test ! -f "$path" && test ! -d "$path"; then
15468        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15469      fi
15470
15471      if test -d "$path"; then
15472        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
15473      else
15474        dir="`$DIRNAME "$path"`"
15475        base="`$BASENAME "$path"`"
15476        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15477      fi
15478    fi
15479  fi
15480
15481  # SRC_ROOT is a traditional alias for TOPDIR.
15482  SRC_ROOT=$TOPDIR
15483
15484  # Calculate a canonical version of TOPDIR for string comparisons
15485  CANONICAL_TOPDIR=$TOPDIR
15486
15487  if test "x$OPENJDK_BUILD_OS" != xwindows; then
15488    # Follow a chain of symbolic links. Use readlink
15489    # where it exists, else fall back to horribly
15490    # complicated shell code.
15491    if test "x$READLINK_TESTED" != yes; then
15492      # On MacOSX there is a readlink tool with a different
15493      # purpose than the GNU readlink tool. Check the found readlink.
15494      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
15495      if test "x$ISGNU" = x; then
15496        # A readlink that we do not know how to use.
15497        # Are there other non-GNU readlinks out there?
15498        READLINK_TESTED=yes
15499        READLINK=
15500      fi
15501    fi
15502
15503    if test "x$READLINK" != x; then
15504      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
15505    else
15506      # Save the current directory for restoring afterwards
15507      STARTDIR=$PWD
15508      COUNTER=0
15509      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
15510      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
15511      cd $sym_link_dir
15512      # Use -P flag to resolve symlinks in directories.
15513      cd `$THEPWDCMD -P`
15514      sym_link_dir=`$THEPWDCMD -P`
15515      # Resolve file symlinks
15516      while test $COUNTER -lt 20; do
15517        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
15518        if test "x$ISLINK" == x; then
15519          # This is not a symbolic link! We are done!
15520          break
15521        fi
15522        # Again resolve directory symlinks since the target of the just found
15523        # link could be in a different directory
15524        cd `$DIRNAME $ISLINK`
15525        sym_link_dir=`$THEPWDCMD -P`
15526        sym_link_file=`$BASENAME $ISLINK`
15527        let COUNTER=COUNTER+1
15528      done
15529      cd $STARTDIR
15530      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
15531    fi
15532  fi
15533
15534
15535
15536  # Locate the directory of this script.
15537  AUTOCONF_DIR=$TOPDIR/common/autoconf
15538
15539
15540# Check if it's a pure open build or if custom sources are to be used.
15541
15542  # Check whether --enable-openjdk-only was given.
15543if test "${enable_openjdk_only+set}" = set; then :
15544  enableval=$enable_openjdk_only;
15545else
15546  enable_openjdk_only="no"
15547fi
15548
15549
15550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
15551$as_echo_n "checking for presence of closed sources... " >&6; }
15552  if test -d "$SRC_ROOT/jdk/src/closed"; then
15553    CLOSED_SOURCE_PRESENT=yes
15554  else
15555    CLOSED_SOURCE_PRESENT=no
15556  fi
15557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
15558$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
15559
15560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
15561$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
15562  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
15563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
15564$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
15565
15566  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
15567    OPENJDK=true
15568    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15569      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
15570$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
15571    fi
15572  else
15573    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
15574      OPENJDK=true
15575    else
15576      OPENJDK=false
15577    fi
15578  fi
15579
15580  if test "x$OPENJDK" = "xtrue"; then
15581    SET_OPENJDK="OPENJDK=true"
15582  fi
15583
15584
15585
15586  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
15587  # the IncludeCustomExtension macro.
15588
15589
15590# Check whether --with-custom-make-dir was given.
15591if test "${with_custom_make_dir+set}" = set; then :
15592  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
15593$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
15594fi
15595
15596
15597
15598
15599# These are needed to be able to create a configuration name (and thus the output directory)
15600
15601  ###############################################################################
15602  #
15603  # Check which variant of the JDK that we want to build.
15604  # Currently we have:
15605  #    normal:   standard edition
15606  # but the custom make system may add other variants
15607  #
15608  # Effectively the JDK variant gives a name to a specific set of
15609  # modules to compile into the JDK. In the future, these modules
15610  # might even be Jigsaw modules.
15611  #
15612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
15613$as_echo_n "checking which variant of the JDK to build... " >&6; }
15614
15615# Check whether --with-jdk-variant was given.
15616if test "${with_jdk_variant+set}" = set; then :
15617  withval=$with_jdk_variant;
15618fi
15619
15620
15621  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
15622    JDK_VARIANT="normal"
15623  else
15624    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
15625  fi
15626
15627
15628
15629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
15630$as_echo "$JDK_VARIANT" >&6; }
15631
15632
15633###############################################################################
15634#
15635# Check which interpreter of the JVM we want to build.
15636# Currently we have:
15637#    template: Template interpreter (the default)
15638#    cpp     : C++ interpreter
15639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
15640$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
15641
15642# Check whether --with-jvm-interpreter was given.
15643if test "${with_jvm_interpreter+set}" = set; then :
15644  withval=$with_jvm_interpreter;
15645fi
15646
15647
15648if test "x$with_jvm_interpreter" = x; then
15649     with_jvm_interpreter="template"
15650fi
15651
15652JVM_INTERPRETER="$with_jvm_interpreter"
15653
15654if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
15655   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
15656fi
15657
15658
15659
15660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
15661$as_echo "$with_jvm_interpreter" >&6; }
15662
15663
15664
15665  ###############################################################################
15666  #
15667  # Check which variants of the JVM that we want to build.
15668  # Currently we have:
15669  #    server: normal interpreter and a tiered C1/C2 compiler
15670  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
15671  #    minimal1: reduced form of client with optional VM services and features stripped out
15672  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
15673  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
15674  #    zero: no machine code interpreter, no compiler
15675  #    zeroshark: zero interpreter and shark/llvm compiler backend
15676#    core: interpreter only, no compiler (only works on some platforms)
15677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
15678$as_echo_n "checking which variants of the JVM to build... " >&6; }
15679
15680# Check whether --with-jvm-variants was given.
15681if test "${with_jvm_variants+set}" = set; then :
15682  withval=$with_jvm_variants;
15683fi
15684
15685
15686  if test "x$with_jvm_variants" = x; then
15687    with_jvm_variants="server"
15688  fi
15689
15690  JVM_VARIANTS=",$with_jvm_variants,"
15691  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,//'`
15692
15693  if test "x$TEST_VARIANTS" != "x,"; then
15694     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
15695  fi
15696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
15697$as_echo "$with_jvm_variants" >&6; }
15698
15699  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
15700  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
15701  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
15702  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
15703  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
15704  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
15705  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
15706
15707  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15708    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15709      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
15710    fi
15711  fi
15712  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15713    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15714      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
15715    fi
15716  fi
15717  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15718    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15719      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
15720    fi
15721  fi
15722
15723  # Replace the commas with AND for use in the build directory name.
15724  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
15725  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/'`
15726  if test "x$COUNT_VARIANTS" != "x,1"; then
15727    BUILDING_MULTIPLE_JVM_VARIANTS=yes
15728  else
15729    BUILDING_MULTIPLE_JVM_VARIANTS=no
15730  fi
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741  INCLUDE_SA=true
15742  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
15743    INCLUDE_SA=false
15744  fi
15745  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
15746    INCLUDE_SA=false
15747  fi
15748  if test "x$OPENJDK_TARGET_OS" = xaix ; then
15749    INCLUDE_SA=false
15750  fi
15751  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15752    INCLUDE_SA=false
15753  fi
15754
15755
15756  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15757    MACOSX_UNIVERSAL="true"
15758  fi
15759
15760
15761
15762
15763  ###############################################################################
15764  #
15765  # Set the debug level
15766  #    release: no debug information, all optimizations, no asserts.
15767  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
15768  #    fastdebug: debug information (-g), all optimizations, all asserts
15769  #    slowdebug: debug information (-g), no optimizations, all asserts
15770  #
15771  DEBUG_LEVEL="release"
15772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
15773$as_echo_n "checking which debug level to use... " >&6; }
15774  # Check whether --enable-debug was given.
15775if test "${enable_debug+set}" = set; then :
15776  enableval=$enable_debug;
15777        ENABLE_DEBUG="${enableval}"
15778        DEBUG_LEVEL="fastdebug"
15779
15780else
15781  ENABLE_DEBUG="no"
15782fi
15783
15784
15785
15786# Check whether --with-debug-level was given.
15787if test "${with_debug_level+set}" = set; then :
15788  withval=$with_debug_level;
15789        DEBUG_LEVEL="${withval}"
15790        if test "x$ENABLE_DEBUG" = xyes; then
15791          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
15792        fi
15793
15794fi
15795
15796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
15797$as_echo "$DEBUG_LEVEL" >&6; }
15798
15799  if test "x$DEBUG_LEVEL" != xrelease && \
15800      test "x$DEBUG_LEVEL" != xoptimized && \
15801      test "x$DEBUG_LEVEL" != xfastdebug && \
15802      test "x$DEBUG_LEVEL" != xslowdebug; then
15803    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
15804  fi
15805
15806
15807  ###############################################################################
15808  #
15809  # Setup legacy vars/targets and new vars to deal with different debug levels.
15810  #
15811
15812  case $DEBUG_LEVEL in
15813    release )
15814      VARIANT="OPT"
15815      FASTDEBUG="false"
15816      DEBUG_CLASSFILES="false"
15817      BUILD_VARIANT_RELEASE=""
15818      HOTSPOT_DEBUG_LEVEL="product"
15819      HOTSPOT_EXPORT="product"
15820      ;;
15821    fastdebug )
15822      VARIANT="DBG"
15823      FASTDEBUG="true"
15824      DEBUG_CLASSFILES="true"
15825      BUILD_VARIANT_RELEASE="-fastdebug"
15826      HOTSPOT_DEBUG_LEVEL="fastdebug"
15827      HOTSPOT_EXPORT="fastdebug"
15828      ;;
15829    slowdebug )
15830      VARIANT="DBG"
15831      FASTDEBUG="false"
15832      DEBUG_CLASSFILES="true"
15833      BUILD_VARIANT_RELEASE="-debug"
15834      HOTSPOT_DEBUG_LEVEL="debug"
15835      HOTSPOT_EXPORT="debug"
15836      ;;
15837    optimized )
15838      VARIANT="OPT"
15839      FASTDEBUG="false"
15840      DEBUG_CLASSFILES="false"
15841      BUILD_VARIANT_RELEASE="-optimized"
15842      HOTSPOT_DEBUG_LEVEL="optimized"
15843      HOTSPOT_EXPORT="optimized"
15844      ;;
15845  esac
15846
15847  # The debug level 'optimized' is a little special because it is currently only
15848  # applicable to the HotSpot build where it means to build a completely
15849  # optimized version of the VM without any debugging code (like for the
15850  # 'release' debug level which is called 'product' in the HotSpot build) but
15851  # with the exception that it can contain additional code which is otherwise
15852  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
15853  # test new and/or experimental features which are not intended for customer
15854  # shipment. Because these new features need to be tested and benchmarked in
15855  # real world scenarios, we want to build the containing JDK at the 'release'
15856  # debug level.
15857  if test "x$DEBUG_LEVEL" = xoptimized; then
15858    DEBUG_LEVEL="release"
15859  fi
15860
15861  #####
15862  # Generate the legacy makefile targets for hotspot.
15863  # The hotspot api for selecting the build artifacts, really, needs to be improved.
15864  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
15865  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
15866  # But until then ...
15867  HOTSPOT_TARGET=""
15868
15869  if test "x$JVM_VARIANT_SERVER" = xtrue; then
15870    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
15871  fi
15872
15873  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
15874    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
15875  fi
15876
15877  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
15878    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
15879  fi
15880
15881  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
15882    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
15883  fi
15884
15885  if test "x$JVM_VARIANT_ZERO" = xtrue; then
15886    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
15887  fi
15888
15889  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
15890    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
15891  fi
15892
15893  if test "x$JVM_VARIANT_CORE" = xtrue; then
15894    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
15895  fi
15896
15897  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
15898
15899  # On Macosx universal binaries are produced, but they only contain
15900  # 64 bit intel. This invalidates control of which jvms are built
15901  # from configure, but only server is valid anyway. Fix this
15902  # when hotspot makefiles are rewritten.
15903  if test "x$MACOSX_UNIVERSAL" = xtrue; then
15904    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
15905  fi
15906
15907  #####
15908
15909
15910
15911
15912
15913
15914
15915
15916# With basic setup done, call the custom early hook.
15917
15918
15919# Check if we have devkits, extra paths or sysroot set.
15920
15921
15922# Check whether --with-devkit was given.
15923if test "${with_devkit+set}" = set; then :
15924  withval=$with_devkit;
15925
15926  # Only process if variable expands to non-empty
15927
15928  if test "x$with_devkit" != x; then
15929    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15930
15931  # Input might be given as Windows format, start by converting to
15932  # unix format.
15933  path="$with_devkit"
15934  new_path=`$CYGPATH -u "$path"`
15935
15936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15939  # "foo.exe" is OK but "foo" is an error.
15940  #
15941  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15942  # It is also a way to make sure we got the proper file name for the real test later on.
15943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15944  if test "x$test_shortpath" = x; then
15945    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
15946$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
15947    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
15948  fi
15949
15950  # Call helper function which possibly converts this using DOS-style short mode.
15951  # If so, the updated path is stored in $new_path.
15952
15953  input_path="$new_path"
15954  # Check if we need to convert this using DOS-style short mode. If the path
15955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15956  # take no chances and rewrite it.
15957  # Note: m4 eats our [], so we need to use [ and ] instead.
15958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15959  if test "x$has_forbidden_chars" != x; then
15960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15964      # Going to short mode and back again did indeed matter. Since short mode is
15965      # case insensitive, let's make it lowercase to improve readability.
15966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15967      # Now convert it back to Unix-style (cygpath)
15968      input_path=`$CYGPATH -u "$shortmode_path"`
15969      new_path="$input_path"
15970    fi
15971  fi
15972
15973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15974  if test "x$test_cygdrive_prefix" = x; then
15975    # As a simple fix, exclude /usr/bin since it's not a real path.
15976    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15978      # a path prefixed by /cygdrive for fixpath to work.
15979      new_path="$CYGWIN_ROOT_PATH$input_path"
15980    fi
15981  fi
15982
15983
15984  if test "x$path" != "x$new_path"; then
15985    with_devkit="$new_path"
15986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
15987$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
15988  fi
15989
15990    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15991
15992  path="$with_devkit"
15993  has_colon=`$ECHO $path | $GREP ^.:`
15994  new_path="$path"
15995  if test "x$has_colon" = x; then
15996    # Not in mixed or Windows style, start by that.
15997    new_path=`cmd //c echo $path`
15998  fi
15999
16000
16001  input_path="$new_path"
16002  # Check if we need to convert this using DOS-style short mode. If the path
16003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16004  # take no chances and rewrite it.
16005  # Note: m4 eats our [], so we need to use [ and ] instead.
16006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16007  if test "x$has_forbidden_chars" != x; then
16008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16010  fi
16011
16012
16013  windows_path="$new_path"
16014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16015    unix_path=`$CYGPATH -u "$windows_path"`
16016    new_path="$unix_path"
16017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16019    new_path="$unix_path"
16020  fi
16021
16022  if test "x$path" != "x$new_path"; then
16023    with_devkit="$new_path"
16024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16025$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16026  fi
16027
16028  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16029  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16030
16031    else
16032      # We're on a unix platform. Hooray! :)
16033      path="$with_devkit"
16034      has_space=`$ECHO "$path" | $GREP " "`
16035      if test "x$has_space" != x; then
16036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16037$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16038        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16039      fi
16040
16041      # Use eval to expand a potential ~
16042      eval path="$path"
16043      if test ! -f "$path" && test ! -d "$path"; then
16044        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16045      fi
16046
16047      if test -d "$path"; then
16048        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16049      else
16050        dir="`$DIRNAME "$path"`"
16051        base="`$BASENAME "$path"`"
16052        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16053      fi
16054    fi
16055  fi
16056
16057        DEVKIT_ROOT="$with_devkit"
16058        # Check for a meta data info file in the root of the devkit
16059        if test -f "$DEVKIT_ROOT/devkit.info"; then
16060          . $DEVKIT_ROOT/devkit.info
16061          # This potentially sets the following:
16062          # A descriptive name of the devkit
16063
16064  if test "x$DEVKIT_NAME" = x; then
16065    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16066  fi
16067
16068          # Corresponds to --with-extra-path
16069
16070  if test "x$DEVKIT_EXTRA_PATH" = x; then
16071    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16072  fi
16073
16074          # Corresponds to --with-toolchain-path
16075
16076  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16077    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16078  fi
16079
16080          # Corresponds to --with-sysroot
16081
16082  if test "x$DEVKIT_SYSROOT" = x; then
16083    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16084  fi
16085
16086
16087          # Identifies the Visual Studio version in the devkit
16088
16089  if test "x$DEVKIT_VS_VERSION" = x; then
16090    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16091  fi
16092
16093          # The Visual Studio include environment variable
16094
16095  if test "x$DEVKIT_VS_INCLUDE" = x; then
16096    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16097  fi
16098
16099          # The Visual Studio lib environment variable
16100
16101  if test "x$DEVKIT_VS_LIB" = x; then
16102    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16103  fi
16104
16105          # Corresponds to --with-msvcr-dll
16106
16107  if test "x$DEVKIT_MSVCR_DLL" = x; then
16108    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16109  fi
16110
16111          # Corresponds to --with-msvcp-dll
16112
16113  if test "x$DEVKIT_MSVCP_DLL" = x; then
16114    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16115  fi
16116
16117        fi
16118
16119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16120$as_echo_n "checking for devkit... " >&6; }
16121        if test "x$DEVKIT_NAME" != x; then
16122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16123$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16124        else
16125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16126$as_echo "$DEVKIT_ROOT" >&6; }
16127        fi
16128
16129
16130  if test "x$DEVKIT_EXTRA_PATH" != x; then
16131    if test "x$EXTRA_PATH" = x; then
16132      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16133    else
16134      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16135    fi
16136  fi
16137
16138
16139        # Fallback default of just /bin if DEVKIT_PATH is not defined
16140        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16141          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16142        fi
16143
16144  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16145    if test "x$TOOLCHAIN_PATH" = x; then
16146      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16147    else
16148      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16149    fi
16150  fi
16151
16152
16153        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16154        # places for backwards compatiblity.
16155        if test "x$DEVKIT_SYSROOT" != x; then
16156          SYSROOT="$DEVKIT_SYSROOT"
16157        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16158          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16159        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16160          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16161        fi
16162
16163
16164fi
16165
16166
16167  # You can force the sysroot if the sysroot encoded into the compiler tools
16168  # is not correct.
16169
16170# Check whether --with-sys-root was given.
16171if test "${with_sys_root+set}" = set; then :
16172  withval=$with_sys_root; SYSROOT=$with_sys_root
16173
16174fi
16175
16176
16177
16178# Check whether --with-sysroot was given.
16179if test "${with_sysroot+set}" = set; then :
16180  withval=$with_sysroot; SYSROOT=$with_sysroot
16181
16182fi
16183
16184
16185
16186# Check whether --with-tools-dir was given.
16187if test "${with_tools_dir+set}" = set; then :
16188  withval=$with_tools_dir;
16189  if test "x$with_tools_dir" != x; then
16190    if test "x$TOOLCHAIN_PATH" = x; then
16191      TOOLCHAIN_PATH="$with_tools_dir"
16192    else
16193      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16194    fi
16195  fi
16196
16197
16198fi
16199
16200
16201
16202# Check whether --with-toolchain-path was given.
16203if test "${with_toolchain_path+set}" = set; then :
16204  withval=$with_toolchain_path;
16205  if test "x$with_toolchain_path" != x; then
16206    if test "x$TOOLCHAIN_PATH" = x; then
16207      TOOLCHAIN_PATH="$with_toolchain_path"
16208    else
16209      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16210    fi
16211  fi
16212
16213
16214fi
16215
16216
16217
16218# Check whether --with-extra-path was given.
16219if test "${with_extra_path+set}" = set; then :
16220  withval=$with_extra_path;
16221  if test "x$with_extra_path" != x; then
16222    if test "x$EXTRA_PATH" = x; then
16223      EXTRA_PATH="$with_extra_path"
16224    else
16225      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16226    fi
16227  fi
16228
16229
16230fi
16231
16232
16233  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16234    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16235    # If not, detect if Xcode is installed by running xcodebuild -version
16236    # if no Xcode installed, xcodebuild exits with 1
16237    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16238    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16239      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16240      # fall back on the stub binary in /usr/bin/xcodebuild
16241      # Extract the first word of "xcodebuild", so it can be a program name with args.
16242set dummy xcodebuild; ac_word=$2
16243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16244$as_echo_n "checking for $ac_word... " >&6; }
16245if ${ac_cv_path_XCODEBUILD+:} false; then :
16246  $as_echo_n "(cached) " >&6
16247else
16248  case $XCODEBUILD in
16249  [\\/]* | ?:[\\/]*)
16250  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16251  ;;
16252  *)
16253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16254for as_dir in $TOOLCHAIN_PATH
16255do
16256  IFS=$as_save_IFS
16257  test -z "$as_dir" && as_dir=.
16258    for ac_exec_ext in '' $ac_executable_extensions; do
16259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16260    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16262    break 2
16263  fi
16264done
16265  done
16266IFS=$as_save_IFS
16267
16268  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16269  ;;
16270esac
16271fi
16272XCODEBUILD=$ac_cv_path_XCODEBUILD
16273if test -n "$XCODEBUILD"; then
16274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16275$as_echo "$XCODEBUILD" >&6; }
16276else
16277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16278$as_echo "no" >&6; }
16279fi
16280
16281
16282    else
16283      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16284      # when only the command line tools are installed there are no SDKs, so headers
16285      # are copied into the system frameworks
16286      XCODEBUILD=
16287
16288    fi
16289
16290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16291$as_echo_n "checking for sdk name... " >&6; }
16292
16293# Check whether --with-sdk-name was given.
16294if test "${with_sdk_name+set}" = set; then :
16295  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16296
16297fi
16298
16299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16300$as_echo "$SDKNAME" >&6; }
16301
16302    # if toolchain path is specified then don't rely on system headers, they may not compile
16303    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16304    test -z "$TOOLCHAIN_PATH" && \
16305      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16306
16307    if test -z "$SYSROOT"; then
16308      if test -n "$XCODEBUILD"; then
16309        # if we don't have system headers, use default SDK name (last resort)
16310        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16311          SDKNAME=${SDKNAME:-macosx}
16312        fi
16313
16314        if test -n "$SDKNAME"; then
16315          # Call xcodebuild to determine SYSROOT
16316          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16317        fi
16318      else
16319        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16320          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
16321        fi
16322      fi
16323    else
16324      # warn user if --with-sdk-name was also set
16325      if test -n "$with_sdk_name"; then
16326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16327$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16328      fi
16329    fi
16330
16331    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16332      # If no system framework headers, then SYSROOT must be set, or we won't build
16333      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
16334    fi
16335
16336    # Perform a basic sanity test
16337    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16338      if test -z "$SYSROOT"; then
16339        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
16340      else
16341        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16342      fi
16343    fi
16344
16345    # set SDKROOT too, Xcode tools will pick it up
16346    SDKROOT=$SYSROOT
16347
16348  fi
16349
16350  # Prepend the extra path to the global path
16351
16352  if test "x$EXTRA_PATH" != x; then
16353    if test "x$PATH" = x; then
16354      PATH="$EXTRA_PATH"
16355    else
16356      PATH="$EXTRA_PATH:$PATH"
16357    fi
16358  fi
16359
16360
16361  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16362    # Add extra search paths on solaris for utilities like ar and as etc...
16363    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
16364  fi
16365
16366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16367$as_echo_n "checking for sysroot... " >&6; }
16368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16369$as_echo "$SYSROOT" >&6; }
16370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16371$as_echo_n "checking for toolchain path... " >&6; }
16372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16373$as_echo "$TOOLCHAIN_PATH" >&6; }
16374  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16375$as_echo_n "checking for extra path... " >&6; }
16376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16377$as_echo "$EXTRA_PATH" >&6; }
16378
16379
16380# To properly create a configuration name, we need to have the OpenJDK target
16381# and options (variants and debug level) parsed.
16382
16383
16384
16385# Check whether --with-conf-name was given.
16386if test "${with_conf_name+set}" = set; then :
16387  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16388fi
16389
16390
16391  # Test from where we are running configure, in or outside of src root.
16392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16393$as_echo_n "checking where to store configuration... " >&6; }
16394  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16395      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16396      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16397    # We are running configure from the src root.
16398    # Create a default ./build/target-variant-debuglevel output root.
16399    if test "x${CONF_NAME}" = x; then
16400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16401$as_echo "in default location" >&6; }
16402      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
16403    else
16404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16405$as_echo "in build directory with custom name" >&6; }
16406    fi
16407    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16408    $MKDIR -p "$OUTPUT_ROOT"
16409    if test ! -d "$OUTPUT_ROOT"; then
16410      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16411    fi
16412  else
16413    # We are running configure from outside of the src dir.
16414    # Then use the current directory as output dir!
16415    # If configuration is situated in normal build directory, just use the build
16416    # directory name as configuration name, otherwise use the complete path.
16417    if test "x${CONF_NAME}" = x; then
16418      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16419    fi
16420    OUTPUT_ROOT="$CURDIR"
16421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16422$as_echo "in current directory" >&6; }
16423
16424    # WARNING: This might be a bad thing to do. You need to be sure you want to
16425    # have a configuration in this directory. Do some sanity checks!
16426
16427    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16428      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16429      # other files
16430      files_present=`$LS $OUTPUT_ROOT`
16431      # Configure has already touched config.log and confdefs.h in the current dir when this check
16432      # is performed.
16433      filtered_files=`$ECHO "$files_present" \
16434          | $SED -e 's/config.log//g' \
16435              -e 's/configure.log//g' \
16436              -e 's/confdefs.h//g' \
16437              -e 's/ //g' \
16438          | $TR -d '\n'`
16439      if test "x$filtered_files" != x; then
16440        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16441$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16442        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16443$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16444        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16445$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16446        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16447$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16448        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16449$as_echo "$as_me: seriously mess up just about everything." >&6;}
16450        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16451$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16452        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16453$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16454        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16455      fi
16456    fi
16457  fi
16458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16459$as_echo_n "checking what configuration name to use... " >&6; }
16460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16461$as_echo "$CONF_NAME" >&6; }
16462
16463
16464  # Only process if variable expands to non-empty
16465
16466  if test "x$OUTPUT_ROOT" != x; then
16467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16468
16469  # Input might be given as Windows format, start by converting to
16470  # unix format.
16471  path="$OUTPUT_ROOT"
16472  new_path=`$CYGPATH -u "$path"`
16473
16474  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16475  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16476  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16477  # "foo.exe" is OK but "foo" is an error.
16478  #
16479  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16480  # It is also a way to make sure we got the proper file name for the real test later on.
16481  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16482  if test "x$test_shortpath" = x; then
16483    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16484$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16485    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16486  fi
16487
16488  # Call helper function which possibly converts this using DOS-style short mode.
16489  # If so, the updated path is stored in $new_path.
16490
16491  input_path="$new_path"
16492  # Check if we need to convert this using DOS-style short mode. If the path
16493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16494  # take no chances and rewrite it.
16495  # Note: m4 eats our [], so we need to use [ and ] instead.
16496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16497  if test "x$has_forbidden_chars" != x; then
16498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16502      # Going to short mode and back again did indeed matter. Since short mode is
16503      # case insensitive, let's make it lowercase to improve readability.
16504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16505      # Now convert it back to Unix-style (cygpath)
16506      input_path=`$CYGPATH -u "$shortmode_path"`
16507      new_path="$input_path"
16508    fi
16509  fi
16510
16511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16512  if test "x$test_cygdrive_prefix" = x; then
16513    # As a simple fix, exclude /usr/bin since it's not a real path.
16514    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16516      # a path prefixed by /cygdrive for fixpath to work.
16517      new_path="$CYGWIN_ROOT_PATH$input_path"
16518    fi
16519  fi
16520
16521
16522  if test "x$path" != "x$new_path"; then
16523    OUTPUT_ROOT="$new_path"
16524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16525$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16526  fi
16527
16528    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16529
16530  path="$OUTPUT_ROOT"
16531  has_colon=`$ECHO $path | $GREP ^.:`
16532  new_path="$path"
16533  if test "x$has_colon" = x; then
16534    # Not in mixed or Windows style, start by that.
16535    new_path=`cmd //c echo $path`
16536  fi
16537
16538
16539  input_path="$new_path"
16540  # Check if we need to convert this using DOS-style short mode. If the path
16541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16542  # take no chances and rewrite it.
16543  # Note: m4 eats our [], so we need to use [ and ] instead.
16544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16545  if test "x$has_forbidden_chars" != x; then
16546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16548  fi
16549
16550
16551  windows_path="$new_path"
16552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16553    unix_path=`$CYGPATH -u "$windows_path"`
16554    new_path="$unix_path"
16555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16557    new_path="$unix_path"
16558  fi
16559
16560  if test "x$path" != "x$new_path"; then
16561    OUTPUT_ROOT="$new_path"
16562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16563$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16564  fi
16565
16566  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16567  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16568
16569    else
16570      # We're on a unix platform. Hooray! :)
16571      path="$OUTPUT_ROOT"
16572      has_space=`$ECHO "$path" | $GREP " "`
16573      if test "x$has_space" != x; then
16574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16575$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16576        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16577      fi
16578
16579      # Use eval to expand a potential ~
16580      eval path="$path"
16581      if test ! -f "$path" && test ! -d "$path"; then
16582        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16583      fi
16584
16585      if test -d "$path"; then
16586        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16587      else
16588        dir="`$DIRNAME "$path"`"
16589        base="`$BASENAME "$path"`"
16590        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16591      fi
16592    fi
16593  fi
16594
16595
16596  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
16597  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
16598
16599  SPEC=$OUTPUT_ROOT/spec.gmk
16600
16601  CONF_NAME=$CONF_NAME
16602
16603  OUTPUT_ROOT=$OUTPUT_ROOT
16604
16605
16606
16607  # The spec.gmk file contains all variables for the make system.
16608  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
16609
16610  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
16611  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
16612
16613  # The bootcycle-spec.gmk file contains support for boot cycle builds.
16614  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
16615
16616  # The compare.sh is used to compare the build output to other builds.
16617  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
16618
16619  # The generated Makefile knows where the spec.gmk is and where the source is.
16620  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
16621  # which will look for generated configurations
16622  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
16623
16624
16625
16626# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
16627
16628  for ac_prog in apt-get yum port pkgutil pkgadd
16629do
16630  # Extract the first word of "$ac_prog", so it can be a program name with args.
16631set dummy $ac_prog; ac_word=$2
16632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16633$as_echo_n "checking for $ac_word... " >&6; }
16634if ${ac_cv_prog_PKGHANDLER+:} false; then :
16635  $as_echo_n "(cached) " >&6
16636else
16637  if test -n "$PKGHANDLER"; then
16638  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
16639else
16640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16641for as_dir in $PATH
16642do
16643  IFS=$as_save_IFS
16644  test -z "$as_dir" && as_dir=.
16645    for ac_exec_ext in '' $ac_executable_extensions; do
16646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16647    ac_cv_prog_PKGHANDLER="$ac_prog"
16648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16649    break 2
16650  fi
16651done
16652  done
16653IFS=$as_save_IFS
16654
16655fi
16656fi
16657PKGHANDLER=$ac_cv_prog_PKGHANDLER
16658if test -n "$PKGHANDLER"; then
16659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
16660$as_echo "$PKGHANDLER" >&6; }
16661else
16662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16663$as_echo "no" >&6; }
16664fi
16665
16666
16667  test -n "$PKGHANDLER" && break
16668done
16669
16670
16671
16672# Setup tools that requires more complex handling, or that is not needed by the configure script.
16673
16674
16675
16676  # Publish this variable in the help.
16677
16678
16679  if [ -z "${MAKE+x}" ]; then
16680    # The variable is not set by user, try to locate tool using the code snippet
16681
16682    # Try our hardest to locate a correct version of GNU make
16683    for ac_prog in gmake
16684do
16685  # Extract the first word of "$ac_prog", so it can be a program name with args.
16686set dummy $ac_prog; ac_word=$2
16687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16688$as_echo_n "checking for $ac_word... " >&6; }
16689if ${ac_cv_path_CHECK_GMAKE+:} false; then :
16690  $as_echo_n "(cached) " >&6
16691else
16692  case $CHECK_GMAKE in
16693  [\\/]* | ?:[\\/]*)
16694  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
16695  ;;
16696  *)
16697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16698for as_dir in $PATH
16699do
16700  IFS=$as_save_IFS
16701  test -z "$as_dir" && as_dir=.
16702    for ac_exec_ext in '' $ac_executable_extensions; do
16703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16704    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16706    break 2
16707  fi
16708done
16709  done
16710IFS=$as_save_IFS
16711
16712  ;;
16713esac
16714fi
16715CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
16716if test -n "$CHECK_GMAKE"; then
16717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
16718$as_echo "$CHECK_GMAKE" >&6; }
16719else
16720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16721$as_echo "no" >&6; }
16722fi
16723
16724
16725  test -n "$CHECK_GMAKE" && break
16726done
16727
16728
16729  MAKE_CANDIDATE=""$CHECK_GMAKE""
16730  DESCRIPTION="gmake in PATH"
16731
16732  # On Cygwin, we require a newer version of make than on other platforms
16733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16734    MAKE_VERSION_EXPR="-e 4\."
16735    MAKE_REQUIRED_VERSION="4.0"
16736   else
16737    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16738    MAKE_REQUIRED_VERSION="3.81"
16739  fi
16740
16741  if test "x$MAKE_CANDIDATE" != x; then
16742    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16743$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16744    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16745    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16746    if test "x$IS_GNU_MAKE" = x; then
16747      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16748$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16749    else
16750      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16751      if test "x$IS_MODERN_MAKE" = x; then
16752        { $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
16753$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;}
16754      else
16755        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16756          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16757            MAKE_EXPECTED_ENV='cygwin'
16758          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16759            MAKE_EXPECTED_ENV='msys'
16760          else
16761            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16762          fi
16763          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16764          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16765        else
16766          # Not relevant for non-Windows
16767          IS_MAKE_CORRECT_ENV=true
16768        fi
16769        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16770          { $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
16771$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;}
16772        else
16773          FOUND_MAKE=$MAKE_CANDIDATE
16774
16775  # Only process if variable expands to non-empty
16776
16777  if test "x$FOUND_MAKE" != x; then
16778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16779
16780  # First separate the path from the arguments. This will split at the first
16781  # space.
16782  complete="$FOUND_MAKE"
16783  path="${complete%% *}"
16784  tmp="$complete EOL"
16785  arguments="${tmp#* }"
16786
16787  # Input might be given as Windows format, start by converting to
16788  # unix format.
16789  new_path=`$CYGPATH -u "$path"`
16790
16791  # Now try to locate executable using which
16792  new_path=`$WHICH "$new_path" 2> /dev/null`
16793  # bat and cmd files are not always considered executable in cygwin causing which
16794  # to not find them
16795  if test "x$new_path" = x \
16796      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16797      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16798    new_path=`$CYGPATH -u "$path"`
16799  fi
16800  if test "x$new_path" = x; then
16801    # Oops. Which didn't find the executable.
16802    # The splitting of arguments from the executable at a space might have been incorrect,
16803    # since paths with space are more likely in Windows. Give it another try with the whole
16804    # argument.
16805    path="$complete"
16806    arguments="EOL"
16807    new_path=`$CYGPATH -u "$path"`
16808    new_path=`$WHICH "$new_path" 2> /dev/null`
16809    # bat and cmd files are not always considered executable in cygwin causing which
16810    # to not find them
16811    if test "x$new_path" = x \
16812        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16813        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16814      new_path=`$CYGPATH -u "$path"`
16815    fi
16816    if test "x$new_path" = x; then
16817      # It's still not found. Now this is an unrecoverable error.
16818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16819$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16820      has_space=`$ECHO "$complete" | $GREP " "`
16821      if test "x$has_space" != x; then
16822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16824      fi
16825      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16826    fi
16827  fi
16828
16829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16832  # "foo.exe" is OK but "foo" is an error.
16833  #
16834  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16835  # It is also a way to make sure we got the proper file name for the real test later on.
16836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16837  if test "x$test_shortpath" = x; then
16838    # Short path failed, file does not exist as specified.
16839    # Try adding .exe or .cmd
16840    if test -f "${new_path}.exe"; then
16841      input_to_shortpath="${new_path}.exe"
16842    elif test -f "${new_path}.cmd"; then
16843      input_to_shortpath="${new_path}.cmd"
16844    else
16845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16846$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16847      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16848$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16849      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16850    fi
16851  else
16852    input_to_shortpath="$new_path"
16853  fi
16854
16855  # Call helper function which possibly converts this using DOS-style short mode.
16856  # If so, the updated path is stored in $new_path.
16857  new_path="$input_to_shortpath"
16858
16859  input_path="$input_to_shortpath"
16860  # Check if we need to convert this using DOS-style short mode. If the path
16861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16862  # take no chances and rewrite it.
16863  # Note: m4 eats our [], so we need to use [ and ] instead.
16864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16865  if test "x$has_forbidden_chars" != x; then
16866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16870      # Going to short mode and back again did indeed matter. Since short mode is
16871      # case insensitive, let's make it lowercase to improve readability.
16872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16873      # Now convert it back to Unix-style (cygpath)
16874      input_path=`$CYGPATH -u "$shortmode_path"`
16875      new_path="$input_path"
16876    fi
16877  fi
16878
16879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16880  if test "x$test_cygdrive_prefix" = x; then
16881    # As a simple fix, exclude /usr/bin since it's not a real path.
16882    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16884      # a path prefixed by /cygdrive for fixpath to work.
16885      new_path="$CYGWIN_ROOT_PATH$input_path"
16886    fi
16887  fi
16888
16889  # remove trailing .exe if any
16890  new_path="${new_path/%.exe/}"
16891
16892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16893
16894  # First separate the path from the arguments. This will split at the first
16895  # space.
16896  complete="$FOUND_MAKE"
16897  path="${complete%% *}"
16898  tmp="$complete EOL"
16899  arguments="${tmp#* }"
16900
16901  # Input might be given as Windows format, start by converting to
16902  # unix format.
16903  new_path="$path"
16904
16905  windows_path="$new_path"
16906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16907    unix_path=`$CYGPATH -u "$windows_path"`
16908    new_path="$unix_path"
16909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16911    new_path="$unix_path"
16912  fi
16913
16914
16915  # Now try to locate executable using which
16916  new_path=`$WHICH "$new_path" 2> /dev/null`
16917
16918  if test "x$new_path" = x; then
16919    # Oops. Which didn't find the executable.
16920    # The splitting of arguments from the executable at a space might have been incorrect,
16921    # since paths with space are more likely in Windows. Give it another try with the whole
16922    # argument.
16923    path="$complete"
16924    arguments="EOL"
16925    new_path="$path"
16926
16927  windows_path="$new_path"
16928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16929    unix_path=`$CYGPATH -u "$windows_path"`
16930    new_path="$unix_path"
16931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16933    new_path="$unix_path"
16934  fi
16935
16936
16937    new_path=`$WHICH "$new_path" 2> /dev/null`
16938    # bat and cmd files are not always considered executable in MSYS causing which
16939    # to not find them
16940    if test "x$new_path" = x \
16941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16943      new_path="$path"
16944
16945  windows_path="$new_path"
16946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16947    unix_path=`$CYGPATH -u "$windows_path"`
16948    new_path="$unix_path"
16949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16951    new_path="$unix_path"
16952  fi
16953
16954    fi
16955
16956    if test "x$new_path" = x; then
16957      # It's still not found. Now this is an unrecoverable error.
16958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16959$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16960      has_space=`$ECHO "$complete" | $GREP " "`
16961      if test "x$has_space" != x; then
16962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16964      fi
16965      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16966    fi
16967  fi
16968
16969  # Now new_path has a complete unix path to the binary
16970  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16971    # Keep paths in /bin as-is, but remove trailing .exe if any
16972    new_path="${new_path/%.exe/}"
16973    # Do not save /bin paths to all_fixpath_prefixes!
16974  else
16975    # Not in mixed or Windows style, start by that.
16976    new_path=`cmd //c echo $new_path`
16977
16978  input_path="$new_path"
16979  # Check if we need to convert this using DOS-style short mode. If the path
16980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16981  # take no chances and rewrite it.
16982  # Note: m4 eats our [], so we need to use [ and ] instead.
16983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16984  if test "x$has_forbidden_chars" != x; then
16985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16987  fi
16988
16989    # Output is in $new_path
16990
16991  windows_path="$new_path"
16992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16993    unix_path=`$CYGPATH -u "$windows_path"`
16994    new_path="$unix_path"
16995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16997    new_path="$unix_path"
16998  fi
16999
17000    # remove trailing .exe if any
17001    new_path="${new_path/%.exe/}"
17002
17003    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17004    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17005  fi
17006
17007    else
17008      # We're on a unix platform. Hooray! :)
17009      # First separate the path from the arguments. This will split at the first
17010      # space.
17011      complete="$FOUND_MAKE"
17012      path="${complete%% *}"
17013      tmp="$complete EOL"
17014      arguments="${tmp#* }"
17015
17016      # Cannot rely on the command "which" here since it doesn't always work.
17017      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17018      if test -z "$is_absolute_path"; then
17019        # Path to executable is not absolute. Find it.
17020        IFS_save="$IFS"
17021        IFS=:
17022        for p in $PATH; do
17023          if test -f "$p/$path" && test -x "$p/$path"; then
17024            new_path="$p/$path"
17025            break
17026          fi
17027        done
17028        IFS="$IFS_save"
17029      else
17030        # This is an absolute path, we can use it without further modifications.
17031        new_path="$path"
17032      fi
17033
17034      if test "x$new_path" = x; then
17035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17036$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17037        has_space=`$ECHO "$complete" | $GREP " "`
17038        if test "x$has_space" != x; then
17039          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17041        fi
17042        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17043      fi
17044    fi
17045
17046    # Now join together the path and the arguments once again
17047    if test "x$arguments" != xEOL; then
17048      new_complete="$new_path ${arguments% *}"
17049    else
17050      new_complete="$new_path"
17051    fi
17052
17053    if test "x$complete" != "x$new_complete"; then
17054      FOUND_MAKE="$new_complete"
17055      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17056$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17057    fi
17058  fi
17059
17060        fi
17061      fi
17062    fi
17063  fi
17064
17065
17066    if test "x$FOUND_MAKE" = x; then
17067      for ac_prog in make
17068do
17069  # Extract the first word of "$ac_prog", so it can be a program name with args.
17070set dummy $ac_prog; ac_word=$2
17071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17072$as_echo_n "checking for $ac_word... " >&6; }
17073if ${ac_cv_path_CHECK_MAKE+:} false; then :
17074  $as_echo_n "(cached) " >&6
17075else
17076  case $CHECK_MAKE in
17077  [\\/]* | ?:[\\/]*)
17078  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17079  ;;
17080  *)
17081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17082for as_dir in $PATH
17083do
17084  IFS=$as_save_IFS
17085  test -z "$as_dir" && as_dir=.
17086    for ac_exec_ext in '' $ac_executable_extensions; do
17087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17088    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17090    break 2
17091  fi
17092done
17093  done
17094IFS=$as_save_IFS
17095
17096  ;;
17097esac
17098fi
17099CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17100if test -n "$CHECK_MAKE"; then
17101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17102$as_echo "$CHECK_MAKE" >&6; }
17103else
17104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17105$as_echo "no" >&6; }
17106fi
17107
17108
17109  test -n "$CHECK_MAKE" && break
17110done
17111
17112
17113  MAKE_CANDIDATE=""$CHECK_MAKE""
17114  DESCRIPTION="make in PATH"
17115
17116  # On Cygwin, we require a newer version of make than on other platforms
17117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17118    MAKE_VERSION_EXPR="-e 4\."
17119    MAKE_REQUIRED_VERSION="4.0"
17120   else
17121    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17122    MAKE_REQUIRED_VERSION="3.81"
17123  fi
17124
17125  if test "x$MAKE_CANDIDATE" != x; then
17126    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17127$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17128    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17129    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17130    if test "x$IS_GNU_MAKE" = x; then
17131      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17132$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17133    else
17134      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17135      if test "x$IS_MODERN_MAKE" = x; then
17136        { $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
17137$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;}
17138      else
17139        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17140          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17141            MAKE_EXPECTED_ENV='cygwin'
17142          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17143            MAKE_EXPECTED_ENV='msys'
17144          else
17145            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17146          fi
17147          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17148          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17149        else
17150          # Not relevant for non-Windows
17151          IS_MAKE_CORRECT_ENV=true
17152        fi
17153        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17154          { $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
17155$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;}
17156        else
17157          FOUND_MAKE=$MAKE_CANDIDATE
17158
17159  # Only process if variable expands to non-empty
17160
17161  if test "x$FOUND_MAKE" != x; then
17162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17163
17164  # First separate the path from the arguments. This will split at the first
17165  # space.
17166  complete="$FOUND_MAKE"
17167  path="${complete%% *}"
17168  tmp="$complete EOL"
17169  arguments="${tmp#* }"
17170
17171  # Input might be given as Windows format, start by converting to
17172  # unix format.
17173  new_path=`$CYGPATH -u "$path"`
17174
17175  # Now try to locate executable using which
17176  new_path=`$WHICH "$new_path" 2> /dev/null`
17177  # bat and cmd files are not always considered executable in cygwin causing which
17178  # to not find them
17179  if test "x$new_path" = x \
17180      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17181      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17182    new_path=`$CYGPATH -u "$path"`
17183  fi
17184  if test "x$new_path" = x; then
17185    # Oops. Which didn't find the executable.
17186    # The splitting of arguments from the executable at a space might have been incorrect,
17187    # since paths with space are more likely in Windows. Give it another try with the whole
17188    # argument.
17189    path="$complete"
17190    arguments="EOL"
17191    new_path=`$CYGPATH -u "$path"`
17192    new_path=`$WHICH "$new_path" 2> /dev/null`
17193    # bat and cmd files are not always considered executable in cygwin causing which
17194    # to not find them
17195    if test "x$new_path" = x \
17196        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17197        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17198      new_path=`$CYGPATH -u "$path"`
17199    fi
17200    if test "x$new_path" = x; then
17201      # It's still not found. Now this is an unrecoverable error.
17202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17203$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17204      has_space=`$ECHO "$complete" | $GREP " "`
17205      if test "x$has_space" != x; then
17206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17208      fi
17209      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17210    fi
17211  fi
17212
17213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17216  # "foo.exe" is OK but "foo" is an error.
17217  #
17218  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17219  # It is also a way to make sure we got the proper file name for the real test later on.
17220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17221  if test "x$test_shortpath" = x; then
17222    # Short path failed, file does not exist as specified.
17223    # Try adding .exe or .cmd
17224    if test -f "${new_path}.exe"; then
17225      input_to_shortpath="${new_path}.exe"
17226    elif test -f "${new_path}.cmd"; then
17227      input_to_shortpath="${new_path}.cmd"
17228    else
17229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17230$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17231      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17232$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17233      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17234    fi
17235  else
17236    input_to_shortpath="$new_path"
17237  fi
17238
17239  # Call helper function which possibly converts this using DOS-style short mode.
17240  # If so, the updated path is stored in $new_path.
17241  new_path="$input_to_shortpath"
17242
17243  input_path="$input_to_shortpath"
17244  # Check if we need to convert this using DOS-style short mode. If the path
17245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17246  # take no chances and rewrite it.
17247  # Note: m4 eats our [], so we need to use [ and ] instead.
17248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17249  if test "x$has_forbidden_chars" != x; then
17250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17254      # Going to short mode and back again did indeed matter. Since short mode is
17255      # case insensitive, let's make it lowercase to improve readability.
17256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17257      # Now convert it back to Unix-style (cygpath)
17258      input_path=`$CYGPATH -u "$shortmode_path"`
17259      new_path="$input_path"
17260    fi
17261  fi
17262
17263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17264  if test "x$test_cygdrive_prefix" = x; then
17265    # As a simple fix, exclude /usr/bin since it's not a real path.
17266    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17268      # a path prefixed by /cygdrive for fixpath to work.
17269      new_path="$CYGWIN_ROOT_PATH$input_path"
17270    fi
17271  fi
17272
17273  # remove trailing .exe if any
17274  new_path="${new_path/%.exe/}"
17275
17276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17277
17278  # First separate the path from the arguments. This will split at the first
17279  # space.
17280  complete="$FOUND_MAKE"
17281  path="${complete%% *}"
17282  tmp="$complete EOL"
17283  arguments="${tmp#* }"
17284
17285  # Input might be given as Windows format, start by converting to
17286  # unix format.
17287  new_path="$path"
17288
17289  windows_path="$new_path"
17290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17291    unix_path=`$CYGPATH -u "$windows_path"`
17292    new_path="$unix_path"
17293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17295    new_path="$unix_path"
17296  fi
17297
17298
17299  # Now try to locate executable using which
17300  new_path=`$WHICH "$new_path" 2> /dev/null`
17301
17302  if test "x$new_path" = x; then
17303    # Oops. Which didn't find the executable.
17304    # The splitting of arguments from the executable at a space might have been incorrect,
17305    # since paths with space are more likely in Windows. Give it another try with the whole
17306    # argument.
17307    path="$complete"
17308    arguments="EOL"
17309    new_path="$path"
17310
17311  windows_path="$new_path"
17312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17313    unix_path=`$CYGPATH -u "$windows_path"`
17314    new_path="$unix_path"
17315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17317    new_path="$unix_path"
17318  fi
17319
17320
17321    new_path=`$WHICH "$new_path" 2> /dev/null`
17322    # bat and cmd files are not always considered executable in MSYS causing which
17323    # to not find them
17324    if test "x$new_path" = x \
17325        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17326        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17327      new_path="$path"
17328
17329  windows_path="$new_path"
17330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17331    unix_path=`$CYGPATH -u "$windows_path"`
17332    new_path="$unix_path"
17333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17335    new_path="$unix_path"
17336  fi
17337
17338    fi
17339
17340    if test "x$new_path" = x; then
17341      # It's still not found. Now this is an unrecoverable error.
17342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17343$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17344      has_space=`$ECHO "$complete" | $GREP " "`
17345      if test "x$has_space" != x; then
17346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17348      fi
17349      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17350    fi
17351  fi
17352
17353  # Now new_path has a complete unix path to the binary
17354  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17355    # Keep paths in /bin as-is, but remove trailing .exe if any
17356    new_path="${new_path/%.exe/}"
17357    # Do not save /bin paths to all_fixpath_prefixes!
17358  else
17359    # Not in mixed or Windows style, start by that.
17360    new_path=`cmd //c echo $new_path`
17361
17362  input_path="$new_path"
17363  # Check if we need to convert this using DOS-style short mode. If the path
17364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17365  # take no chances and rewrite it.
17366  # Note: m4 eats our [], so we need to use [ and ] instead.
17367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17368  if test "x$has_forbidden_chars" != x; then
17369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17370    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17371  fi
17372
17373    # Output is in $new_path
17374
17375  windows_path="$new_path"
17376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17377    unix_path=`$CYGPATH -u "$windows_path"`
17378    new_path="$unix_path"
17379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17381    new_path="$unix_path"
17382  fi
17383
17384    # remove trailing .exe if any
17385    new_path="${new_path/%.exe/}"
17386
17387    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17388    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17389  fi
17390
17391    else
17392      # We're on a unix platform. Hooray! :)
17393      # First separate the path from the arguments. This will split at the first
17394      # space.
17395      complete="$FOUND_MAKE"
17396      path="${complete%% *}"
17397      tmp="$complete EOL"
17398      arguments="${tmp#* }"
17399
17400      # Cannot rely on the command "which" here since it doesn't always work.
17401      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17402      if test -z "$is_absolute_path"; then
17403        # Path to executable is not absolute. Find it.
17404        IFS_save="$IFS"
17405        IFS=:
17406        for p in $PATH; do
17407          if test -f "$p/$path" && test -x "$p/$path"; then
17408            new_path="$p/$path"
17409            break
17410          fi
17411        done
17412        IFS="$IFS_save"
17413      else
17414        # This is an absolute path, we can use it without further modifications.
17415        new_path="$path"
17416      fi
17417
17418      if test "x$new_path" = x; then
17419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17420$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17421        has_space=`$ECHO "$complete" | $GREP " "`
17422        if test "x$has_space" != x; then
17423          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17424$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17425        fi
17426        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17427      fi
17428    fi
17429
17430    # Now join together the path and the arguments once again
17431    if test "x$arguments" != xEOL; then
17432      new_complete="$new_path ${arguments% *}"
17433    else
17434      new_complete="$new_path"
17435    fi
17436
17437    if test "x$complete" != "x$new_complete"; then
17438      FOUND_MAKE="$new_complete"
17439      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17440$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17441    fi
17442  fi
17443
17444        fi
17445      fi
17446    fi
17447  fi
17448
17449    fi
17450
17451    if test "x$FOUND_MAKE" = x; then
17452      if test "x$TOOLCHAIN_PATH" != x; then
17453        # We have a toolchain path, check that as well before giving up.
17454        OLD_PATH=$PATH
17455        PATH=$TOOLCHAIN_PATH:$PATH
17456        for ac_prog in gmake
17457do
17458  # Extract the first word of "$ac_prog", so it can be a program name with args.
17459set dummy $ac_prog; ac_word=$2
17460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17461$as_echo_n "checking for $ac_word... " >&6; }
17462if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17463  $as_echo_n "(cached) " >&6
17464else
17465  case $CHECK_TOOLSDIR_GMAKE in
17466  [\\/]* | ?:[\\/]*)
17467  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17468  ;;
17469  *)
17470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17471for as_dir in $PATH
17472do
17473  IFS=$as_save_IFS
17474  test -z "$as_dir" && as_dir=.
17475    for ac_exec_ext in '' $ac_executable_extensions; do
17476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17477    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17479    break 2
17480  fi
17481done
17482  done
17483IFS=$as_save_IFS
17484
17485  ;;
17486esac
17487fi
17488CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17489if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17491$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17492else
17493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17494$as_echo "no" >&6; }
17495fi
17496
17497
17498  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17499done
17500
17501
17502  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17503  DESCRIPTION="gmake in tools-dir"
17504
17505  # On Cygwin, we require a newer version of make than on other platforms
17506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17507    MAKE_VERSION_EXPR="-e 4\."
17508    MAKE_REQUIRED_VERSION="4.0"
17509   else
17510    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17511    MAKE_REQUIRED_VERSION="3.81"
17512  fi
17513
17514  if test "x$MAKE_CANDIDATE" != x; then
17515    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17516$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17517    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17518    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17519    if test "x$IS_GNU_MAKE" = x; then
17520      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17521$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17522    else
17523      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17524      if test "x$IS_MODERN_MAKE" = x; then
17525        { $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
17526$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;}
17527      else
17528        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17529          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17530            MAKE_EXPECTED_ENV='cygwin'
17531          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17532            MAKE_EXPECTED_ENV='msys'
17533          else
17534            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17535          fi
17536          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17537          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17538        else
17539          # Not relevant for non-Windows
17540          IS_MAKE_CORRECT_ENV=true
17541        fi
17542        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17543          { $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
17544$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;}
17545        else
17546          FOUND_MAKE=$MAKE_CANDIDATE
17547
17548  # Only process if variable expands to non-empty
17549
17550  if test "x$FOUND_MAKE" != x; then
17551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17552
17553  # First separate the path from the arguments. This will split at the first
17554  # space.
17555  complete="$FOUND_MAKE"
17556  path="${complete%% *}"
17557  tmp="$complete EOL"
17558  arguments="${tmp#* }"
17559
17560  # Input might be given as Windows format, start by converting to
17561  # unix format.
17562  new_path=`$CYGPATH -u "$path"`
17563
17564  # Now try to locate executable using which
17565  new_path=`$WHICH "$new_path" 2> /dev/null`
17566  # bat and cmd files are not always considered executable in cygwin causing which
17567  # to not find them
17568  if test "x$new_path" = x \
17569      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17570      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17571    new_path=`$CYGPATH -u "$path"`
17572  fi
17573  if test "x$new_path" = x; then
17574    # Oops. Which didn't find the executable.
17575    # The splitting of arguments from the executable at a space might have been incorrect,
17576    # since paths with space are more likely in Windows. Give it another try with the whole
17577    # argument.
17578    path="$complete"
17579    arguments="EOL"
17580    new_path=`$CYGPATH -u "$path"`
17581    new_path=`$WHICH "$new_path" 2> /dev/null`
17582    # bat and cmd files are not always considered executable in cygwin causing which
17583    # to not find them
17584    if test "x$new_path" = x \
17585        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17586        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17587      new_path=`$CYGPATH -u "$path"`
17588    fi
17589    if test "x$new_path" = x; then
17590      # It's still not found. Now this is an unrecoverable error.
17591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17592$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17593      has_space=`$ECHO "$complete" | $GREP " "`
17594      if test "x$has_space" != x; then
17595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17597      fi
17598      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17599    fi
17600  fi
17601
17602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17605  # "foo.exe" is OK but "foo" is an error.
17606  #
17607  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17608  # It is also a way to make sure we got the proper file name for the real test later on.
17609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17610  if test "x$test_shortpath" = x; then
17611    # Short path failed, file does not exist as specified.
17612    # Try adding .exe or .cmd
17613    if test -f "${new_path}.exe"; then
17614      input_to_shortpath="${new_path}.exe"
17615    elif test -f "${new_path}.cmd"; then
17616      input_to_shortpath="${new_path}.cmd"
17617    else
17618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17619$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17620      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17621$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17622      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17623    fi
17624  else
17625    input_to_shortpath="$new_path"
17626  fi
17627
17628  # Call helper function which possibly converts this using DOS-style short mode.
17629  # If so, the updated path is stored in $new_path.
17630  new_path="$input_to_shortpath"
17631
17632  input_path="$input_to_shortpath"
17633  # Check if we need to convert this using DOS-style short mode. If the path
17634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17635  # take no chances and rewrite it.
17636  # Note: m4 eats our [], so we need to use [ and ] instead.
17637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17638  if test "x$has_forbidden_chars" != x; then
17639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17643      # Going to short mode and back again did indeed matter. Since short mode is
17644      # case insensitive, let's make it lowercase to improve readability.
17645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17646      # Now convert it back to Unix-style (cygpath)
17647      input_path=`$CYGPATH -u "$shortmode_path"`
17648      new_path="$input_path"
17649    fi
17650  fi
17651
17652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17653  if test "x$test_cygdrive_prefix" = x; then
17654    # As a simple fix, exclude /usr/bin since it's not a real path.
17655    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17657      # a path prefixed by /cygdrive for fixpath to work.
17658      new_path="$CYGWIN_ROOT_PATH$input_path"
17659    fi
17660  fi
17661
17662  # remove trailing .exe if any
17663  new_path="${new_path/%.exe/}"
17664
17665    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17666
17667  # First separate the path from the arguments. This will split at the first
17668  # space.
17669  complete="$FOUND_MAKE"
17670  path="${complete%% *}"
17671  tmp="$complete EOL"
17672  arguments="${tmp#* }"
17673
17674  # Input might be given as Windows format, start by converting to
17675  # unix format.
17676  new_path="$path"
17677
17678  windows_path="$new_path"
17679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17680    unix_path=`$CYGPATH -u "$windows_path"`
17681    new_path="$unix_path"
17682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17684    new_path="$unix_path"
17685  fi
17686
17687
17688  # Now try to locate executable using which
17689  new_path=`$WHICH "$new_path" 2> /dev/null`
17690
17691  if test "x$new_path" = x; then
17692    # Oops. Which didn't find the executable.
17693    # The splitting of arguments from the executable at a space might have been incorrect,
17694    # since paths with space are more likely in Windows. Give it another try with the whole
17695    # argument.
17696    path="$complete"
17697    arguments="EOL"
17698    new_path="$path"
17699
17700  windows_path="$new_path"
17701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17702    unix_path=`$CYGPATH -u "$windows_path"`
17703    new_path="$unix_path"
17704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17706    new_path="$unix_path"
17707  fi
17708
17709
17710    new_path=`$WHICH "$new_path" 2> /dev/null`
17711    # bat and cmd files are not always considered executable in MSYS causing which
17712    # to not find them
17713    if test "x$new_path" = x \
17714        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17715        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17716      new_path="$path"
17717
17718  windows_path="$new_path"
17719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17720    unix_path=`$CYGPATH -u "$windows_path"`
17721    new_path="$unix_path"
17722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17724    new_path="$unix_path"
17725  fi
17726
17727    fi
17728
17729    if test "x$new_path" = x; then
17730      # It's still not found. Now this is an unrecoverable error.
17731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17732$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17733      has_space=`$ECHO "$complete" | $GREP " "`
17734      if test "x$has_space" != x; then
17735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17737      fi
17738      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17739    fi
17740  fi
17741
17742  # Now new_path has a complete unix path to the binary
17743  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17744    # Keep paths in /bin as-is, but remove trailing .exe if any
17745    new_path="${new_path/%.exe/}"
17746    # Do not save /bin paths to all_fixpath_prefixes!
17747  else
17748    # Not in mixed or Windows style, start by that.
17749    new_path=`cmd //c echo $new_path`
17750
17751  input_path="$new_path"
17752  # Check if we need to convert this using DOS-style short mode. If the path
17753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17754  # take no chances and rewrite it.
17755  # Note: m4 eats our [], so we need to use [ and ] instead.
17756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17757  if test "x$has_forbidden_chars" != x; then
17758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17760  fi
17761
17762    # Output is in $new_path
17763
17764  windows_path="$new_path"
17765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17766    unix_path=`$CYGPATH -u "$windows_path"`
17767    new_path="$unix_path"
17768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17770    new_path="$unix_path"
17771  fi
17772
17773    # remove trailing .exe if any
17774    new_path="${new_path/%.exe/}"
17775
17776    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17777    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17778  fi
17779
17780    else
17781      # We're on a unix platform. Hooray! :)
17782      # First separate the path from the arguments. This will split at the first
17783      # space.
17784      complete="$FOUND_MAKE"
17785      path="${complete%% *}"
17786      tmp="$complete EOL"
17787      arguments="${tmp#* }"
17788
17789      # Cannot rely on the command "which" here since it doesn't always work.
17790      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17791      if test -z "$is_absolute_path"; then
17792        # Path to executable is not absolute. Find it.
17793        IFS_save="$IFS"
17794        IFS=:
17795        for p in $PATH; do
17796          if test -f "$p/$path" && test -x "$p/$path"; then
17797            new_path="$p/$path"
17798            break
17799          fi
17800        done
17801        IFS="$IFS_save"
17802      else
17803        # This is an absolute path, we can use it without further modifications.
17804        new_path="$path"
17805      fi
17806
17807      if test "x$new_path" = x; then
17808        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17809$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17810        has_space=`$ECHO "$complete" | $GREP " "`
17811        if test "x$has_space" != x; then
17812          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17813$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17814        fi
17815        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17816      fi
17817    fi
17818
17819    # Now join together the path and the arguments once again
17820    if test "x$arguments" != xEOL; then
17821      new_complete="$new_path ${arguments% *}"
17822    else
17823      new_complete="$new_path"
17824    fi
17825
17826    if test "x$complete" != "x$new_complete"; then
17827      FOUND_MAKE="$new_complete"
17828      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17829$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17830    fi
17831  fi
17832
17833        fi
17834      fi
17835    fi
17836  fi
17837
17838        if test "x$FOUND_MAKE" = x; then
17839          for ac_prog in make
17840do
17841  # Extract the first word of "$ac_prog", so it can be a program name with args.
17842set dummy $ac_prog; ac_word=$2
17843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17844$as_echo_n "checking for $ac_word... " >&6; }
17845if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17846  $as_echo_n "(cached) " >&6
17847else
17848  case $CHECK_TOOLSDIR_MAKE in
17849  [\\/]* | ?:[\\/]*)
17850  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17851  ;;
17852  *)
17853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17854for as_dir in $PATH
17855do
17856  IFS=$as_save_IFS
17857  test -z "$as_dir" && as_dir=.
17858    for ac_exec_ext in '' $ac_executable_extensions; do
17859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17860    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17862    break 2
17863  fi
17864done
17865  done
17866IFS=$as_save_IFS
17867
17868  ;;
17869esac
17870fi
17871CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17872if test -n "$CHECK_TOOLSDIR_MAKE"; then
17873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17874$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17875else
17876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17877$as_echo "no" >&6; }
17878fi
17879
17880
17881  test -n "$CHECK_TOOLSDIR_MAKE" && break
17882done
17883
17884
17885  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17886  DESCRIPTION="make in tools-dir"
17887
17888  # On Cygwin, we require a newer version of make than on other platforms
17889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17890    MAKE_VERSION_EXPR="-e 4\."
17891    MAKE_REQUIRED_VERSION="4.0"
17892   else
17893    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17894    MAKE_REQUIRED_VERSION="3.81"
17895  fi
17896
17897  if test "x$MAKE_CANDIDATE" != x; then
17898    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17899$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17900    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17901    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17902    if test "x$IS_GNU_MAKE" = x; then
17903      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17904$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17905    else
17906      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17907      if test "x$IS_MODERN_MAKE" = x; then
17908        { $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
17909$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;}
17910      else
17911        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17912          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17913            MAKE_EXPECTED_ENV='cygwin'
17914          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17915            MAKE_EXPECTED_ENV='msys'
17916          else
17917            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17918          fi
17919          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17920          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17921        else
17922          # Not relevant for non-Windows
17923          IS_MAKE_CORRECT_ENV=true
17924        fi
17925        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17926          { $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
17927$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;}
17928        else
17929          FOUND_MAKE=$MAKE_CANDIDATE
17930
17931  # Only process if variable expands to non-empty
17932
17933  if test "x$FOUND_MAKE" != x; then
17934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17935
17936  # First separate the path from the arguments. This will split at the first
17937  # space.
17938  complete="$FOUND_MAKE"
17939  path="${complete%% *}"
17940  tmp="$complete EOL"
17941  arguments="${tmp#* }"
17942
17943  # Input might be given as Windows format, start by converting to
17944  # unix format.
17945  new_path=`$CYGPATH -u "$path"`
17946
17947  # Now try to locate executable using which
17948  new_path=`$WHICH "$new_path" 2> /dev/null`
17949  # bat and cmd files are not always considered executable in cygwin causing which
17950  # to not find them
17951  if test "x$new_path" = x \
17952      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17953      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17954    new_path=`$CYGPATH -u "$path"`
17955  fi
17956  if test "x$new_path" = x; then
17957    # Oops. Which didn't find the executable.
17958    # The splitting of arguments from the executable at a space might have been incorrect,
17959    # since paths with space are more likely in Windows. Give it another try with the whole
17960    # argument.
17961    path="$complete"
17962    arguments="EOL"
17963    new_path=`$CYGPATH -u "$path"`
17964    new_path=`$WHICH "$new_path" 2> /dev/null`
17965    # bat and cmd files are not always considered executable in cygwin causing which
17966    # to not find them
17967    if test "x$new_path" = x \
17968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17970      new_path=`$CYGPATH -u "$path"`
17971    fi
17972    if test "x$new_path" = x; then
17973      # It's still not found. Now this is an unrecoverable error.
17974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17975$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17976      has_space=`$ECHO "$complete" | $GREP " "`
17977      if test "x$has_space" != x; then
17978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17980      fi
17981      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17982    fi
17983  fi
17984
17985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17988  # "foo.exe" is OK but "foo" is an error.
17989  #
17990  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17991  # It is also a way to make sure we got the proper file name for the real test later on.
17992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17993  if test "x$test_shortpath" = x; then
17994    # Short path failed, file does not exist as specified.
17995    # Try adding .exe or .cmd
17996    if test -f "${new_path}.exe"; then
17997      input_to_shortpath="${new_path}.exe"
17998    elif test -f "${new_path}.cmd"; then
17999      input_to_shortpath="${new_path}.cmd"
18000    else
18001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18002$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18003      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18004$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18005      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18006    fi
18007  else
18008    input_to_shortpath="$new_path"
18009  fi
18010
18011  # Call helper function which possibly converts this using DOS-style short mode.
18012  # If so, the updated path is stored in $new_path.
18013  new_path="$input_to_shortpath"
18014
18015  input_path="$input_to_shortpath"
18016  # Check if we need to convert this using DOS-style short mode. If the path
18017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18018  # take no chances and rewrite it.
18019  # Note: m4 eats our [], so we need to use [ and ] instead.
18020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18021  if test "x$has_forbidden_chars" != x; then
18022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18026      # Going to short mode and back again did indeed matter. Since short mode is
18027      # case insensitive, let's make it lowercase to improve readability.
18028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18029      # Now convert it back to Unix-style (cygpath)
18030      input_path=`$CYGPATH -u "$shortmode_path"`
18031      new_path="$input_path"
18032    fi
18033  fi
18034
18035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18036  if test "x$test_cygdrive_prefix" = x; then
18037    # As a simple fix, exclude /usr/bin since it's not a real path.
18038    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18040      # a path prefixed by /cygdrive for fixpath to work.
18041      new_path="$CYGWIN_ROOT_PATH$input_path"
18042    fi
18043  fi
18044
18045  # remove trailing .exe if any
18046  new_path="${new_path/%.exe/}"
18047
18048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18049
18050  # First separate the path from the arguments. This will split at the first
18051  # space.
18052  complete="$FOUND_MAKE"
18053  path="${complete%% *}"
18054  tmp="$complete EOL"
18055  arguments="${tmp#* }"
18056
18057  # Input might be given as Windows format, start by converting to
18058  # unix format.
18059  new_path="$path"
18060
18061  windows_path="$new_path"
18062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18063    unix_path=`$CYGPATH -u "$windows_path"`
18064    new_path="$unix_path"
18065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18067    new_path="$unix_path"
18068  fi
18069
18070
18071  # Now try to locate executable using which
18072  new_path=`$WHICH "$new_path" 2> /dev/null`
18073
18074  if test "x$new_path" = x; then
18075    # Oops. Which didn't find the executable.
18076    # The splitting of arguments from the executable at a space might have been incorrect,
18077    # since paths with space are more likely in Windows. Give it another try with the whole
18078    # argument.
18079    path="$complete"
18080    arguments="EOL"
18081    new_path="$path"
18082
18083  windows_path="$new_path"
18084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18085    unix_path=`$CYGPATH -u "$windows_path"`
18086    new_path="$unix_path"
18087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18089    new_path="$unix_path"
18090  fi
18091
18092
18093    new_path=`$WHICH "$new_path" 2> /dev/null`
18094    # bat and cmd files are not always considered executable in MSYS causing which
18095    # to not find them
18096    if test "x$new_path" = x \
18097        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18098        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18099      new_path="$path"
18100
18101  windows_path="$new_path"
18102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18103    unix_path=`$CYGPATH -u "$windows_path"`
18104    new_path="$unix_path"
18105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18107    new_path="$unix_path"
18108  fi
18109
18110    fi
18111
18112    if test "x$new_path" = x; then
18113      # It's still not found. Now this is an unrecoverable error.
18114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18115$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18116      has_space=`$ECHO "$complete" | $GREP " "`
18117      if test "x$has_space" != x; then
18118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18120      fi
18121      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18122    fi
18123  fi
18124
18125  # Now new_path has a complete unix path to the binary
18126  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18127    # Keep paths in /bin as-is, but remove trailing .exe if any
18128    new_path="${new_path/%.exe/}"
18129    # Do not save /bin paths to all_fixpath_prefixes!
18130  else
18131    # Not in mixed or Windows style, start by that.
18132    new_path=`cmd //c echo $new_path`
18133
18134  input_path="$new_path"
18135  # Check if we need to convert this using DOS-style short mode. If the path
18136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18137  # take no chances and rewrite it.
18138  # Note: m4 eats our [], so we need to use [ and ] instead.
18139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18140  if test "x$has_forbidden_chars" != x; then
18141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18143  fi
18144
18145    # Output is in $new_path
18146
18147  windows_path="$new_path"
18148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18149    unix_path=`$CYGPATH -u "$windows_path"`
18150    new_path="$unix_path"
18151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18153    new_path="$unix_path"
18154  fi
18155
18156    # remove trailing .exe if any
18157    new_path="${new_path/%.exe/}"
18158
18159    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18160    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18161  fi
18162
18163    else
18164      # We're on a unix platform. Hooray! :)
18165      # First separate the path from the arguments. This will split at the first
18166      # space.
18167      complete="$FOUND_MAKE"
18168      path="${complete%% *}"
18169      tmp="$complete EOL"
18170      arguments="${tmp#* }"
18171
18172      # Cannot rely on the command "which" here since it doesn't always work.
18173      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18174      if test -z "$is_absolute_path"; then
18175        # Path to executable is not absolute. Find it.
18176        IFS_save="$IFS"
18177        IFS=:
18178        for p in $PATH; do
18179          if test -f "$p/$path" && test -x "$p/$path"; then
18180            new_path="$p/$path"
18181            break
18182          fi
18183        done
18184        IFS="$IFS_save"
18185      else
18186        # This is an absolute path, we can use it without further modifications.
18187        new_path="$path"
18188      fi
18189
18190      if test "x$new_path" = x; then
18191        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18192$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18193        has_space=`$ECHO "$complete" | $GREP " "`
18194        if test "x$has_space" != x; then
18195          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18196$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18197        fi
18198        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18199      fi
18200    fi
18201
18202    # Now join together the path and the arguments once again
18203    if test "x$arguments" != xEOL; then
18204      new_complete="$new_path ${arguments% *}"
18205    else
18206      new_complete="$new_path"
18207    fi
18208
18209    if test "x$complete" != "x$new_complete"; then
18210      FOUND_MAKE="$new_complete"
18211      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18212$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18213    fi
18214  fi
18215
18216        fi
18217      fi
18218    fi
18219  fi
18220
18221        fi
18222        PATH=$OLD_PATH
18223      fi
18224    fi
18225
18226    if test "x$FOUND_MAKE" = x; then
18227      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
18228    fi
18229
18230  else
18231    # The variable is set, but is it from the command line or the environment?
18232
18233    # Try to remove the string !MAKE! from our list.
18234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18236      # If it failed, the variable was not from the command line. Ignore it,
18237      # but warn the user (except for BASH, which is always set by the calling BASH).
18238      if test "xMAKE" != xBASH; then
18239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18240$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18241      fi
18242      # Try to locate tool using the code snippet
18243
18244    # Try our hardest to locate a correct version of GNU make
18245    for ac_prog in gmake
18246do
18247  # Extract the first word of "$ac_prog", so it can be a program name with args.
18248set dummy $ac_prog; ac_word=$2
18249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18250$as_echo_n "checking for $ac_word... " >&6; }
18251if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18252  $as_echo_n "(cached) " >&6
18253else
18254  case $CHECK_GMAKE in
18255  [\\/]* | ?:[\\/]*)
18256  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18257  ;;
18258  *)
18259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18260for as_dir in $PATH
18261do
18262  IFS=$as_save_IFS
18263  test -z "$as_dir" && as_dir=.
18264    for ac_exec_ext in '' $ac_executable_extensions; do
18265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18266    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18268    break 2
18269  fi
18270done
18271  done
18272IFS=$as_save_IFS
18273
18274  ;;
18275esac
18276fi
18277CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18278if test -n "$CHECK_GMAKE"; then
18279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18280$as_echo "$CHECK_GMAKE" >&6; }
18281else
18282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18283$as_echo "no" >&6; }
18284fi
18285
18286
18287  test -n "$CHECK_GMAKE" && break
18288done
18289
18290
18291  MAKE_CANDIDATE=""$CHECK_GMAKE""
18292  DESCRIPTION="gmake in PATH"
18293
18294  # On Cygwin, we require a newer version of make than on other platforms
18295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18296    MAKE_VERSION_EXPR="-e 4\."
18297    MAKE_REQUIRED_VERSION="4.0"
18298   else
18299    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18300    MAKE_REQUIRED_VERSION="3.81"
18301  fi
18302
18303  if test "x$MAKE_CANDIDATE" != x; then
18304    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18305$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18306    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18307    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18308    if test "x$IS_GNU_MAKE" = x; then
18309      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18310$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18311    else
18312      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18313      if test "x$IS_MODERN_MAKE" = x; then
18314        { $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
18315$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;}
18316      else
18317        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18318          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18319            MAKE_EXPECTED_ENV='cygwin'
18320          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18321            MAKE_EXPECTED_ENV='msys'
18322          else
18323            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18324          fi
18325          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18326          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18327        else
18328          # Not relevant for non-Windows
18329          IS_MAKE_CORRECT_ENV=true
18330        fi
18331        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18332          { $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
18333$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;}
18334        else
18335          FOUND_MAKE=$MAKE_CANDIDATE
18336
18337  # Only process if variable expands to non-empty
18338
18339  if test "x$FOUND_MAKE" != x; then
18340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18341
18342  # First separate the path from the arguments. This will split at the first
18343  # space.
18344  complete="$FOUND_MAKE"
18345  path="${complete%% *}"
18346  tmp="$complete EOL"
18347  arguments="${tmp#* }"
18348
18349  # Input might be given as Windows format, start by converting to
18350  # unix format.
18351  new_path=`$CYGPATH -u "$path"`
18352
18353  # Now try to locate executable using which
18354  new_path=`$WHICH "$new_path" 2> /dev/null`
18355  # bat and cmd files are not always considered executable in cygwin causing which
18356  # to not find them
18357  if test "x$new_path" = x \
18358      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18359      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18360    new_path=`$CYGPATH -u "$path"`
18361  fi
18362  if test "x$new_path" = x; then
18363    # Oops. Which didn't find the executable.
18364    # The splitting of arguments from the executable at a space might have been incorrect,
18365    # since paths with space are more likely in Windows. Give it another try with the whole
18366    # argument.
18367    path="$complete"
18368    arguments="EOL"
18369    new_path=`$CYGPATH -u "$path"`
18370    new_path=`$WHICH "$new_path" 2> /dev/null`
18371    # bat and cmd files are not always considered executable in cygwin causing which
18372    # to not find them
18373    if test "x$new_path" = x \
18374        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18375        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18376      new_path=`$CYGPATH -u "$path"`
18377    fi
18378    if test "x$new_path" = x; then
18379      # It's still not found. Now this is an unrecoverable error.
18380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18381$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18382      has_space=`$ECHO "$complete" | $GREP " "`
18383      if test "x$has_space" != x; then
18384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18386      fi
18387      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18388    fi
18389  fi
18390
18391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18394  # "foo.exe" is OK but "foo" is an error.
18395  #
18396  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18397  # It is also a way to make sure we got the proper file name for the real test later on.
18398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18399  if test "x$test_shortpath" = x; then
18400    # Short path failed, file does not exist as specified.
18401    # Try adding .exe or .cmd
18402    if test -f "${new_path}.exe"; then
18403      input_to_shortpath="${new_path}.exe"
18404    elif test -f "${new_path}.cmd"; then
18405      input_to_shortpath="${new_path}.cmd"
18406    else
18407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18408$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18409      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18410$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18411      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18412    fi
18413  else
18414    input_to_shortpath="$new_path"
18415  fi
18416
18417  # Call helper function which possibly converts this using DOS-style short mode.
18418  # If so, the updated path is stored in $new_path.
18419  new_path="$input_to_shortpath"
18420
18421  input_path="$input_to_shortpath"
18422  # Check if we need to convert this using DOS-style short mode. If the path
18423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18424  # take no chances and rewrite it.
18425  # Note: m4 eats our [], so we need to use [ and ] instead.
18426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18427  if test "x$has_forbidden_chars" != x; then
18428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18432      # Going to short mode and back again did indeed matter. Since short mode is
18433      # case insensitive, let's make it lowercase to improve readability.
18434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18435      # Now convert it back to Unix-style (cygpath)
18436      input_path=`$CYGPATH -u "$shortmode_path"`
18437      new_path="$input_path"
18438    fi
18439  fi
18440
18441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18442  if test "x$test_cygdrive_prefix" = x; then
18443    # As a simple fix, exclude /usr/bin since it's not a real path.
18444    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18446      # a path prefixed by /cygdrive for fixpath to work.
18447      new_path="$CYGWIN_ROOT_PATH$input_path"
18448    fi
18449  fi
18450
18451  # remove trailing .exe if any
18452  new_path="${new_path/%.exe/}"
18453
18454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18455
18456  # First separate the path from the arguments. This will split at the first
18457  # space.
18458  complete="$FOUND_MAKE"
18459  path="${complete%% *}"
18460  tmp="$complete EOL"
18461  arguments="${tmp#* }"
18462
18463  # Input might be given as Windows format, start by converting to
18464  # unix format.
18465  new_path="$path"
18466
18467  windows_path="$new_path"
18468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18469    unix_path=`$CYGPATH -u "$windows_path"`
18470    new_path="$unix_path"
18471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18473    new_path="$unix_path"
18474  fi
18475
18476
18477  # Now try to locate executable using which
18478  new_path=`$WHICH "$new_path" 2> /dev/null`
18479
18480  if test "x$new_path" = x; then
18481    # Oops. Which didn't find the executable.
18482    # The splitting of arguments from the executable at a space might have been incorrect,
18483    # since paths with space are more likely in Windows. Give it another try with the whole
18484    # argument.
18485    path="$complete"
18486    arguments="EOL"
18487    new_path="$path"
18488
18489  windows_path="$new_path"
18490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18491    unix_path=`$CYGPATH -u "$windows_path"`
18492    new_path="$unix_path"
18493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18495    new_path="$unix_path"
18496  fi
18497
18498
18499    new_path=`$WHICH "$new_path" 2> /dev/null`
18500    # bat and cmd files are not always considered executable in MSYS causing which
18501    # to not find them
18502    if test "x$new_path" = x \
18503        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18504        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18505      new_path="$path"
18506
18507  windows_path="$new_path"
18508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18509    unix_path=`$CYGPATH -u "$windows_path"`
18510    new_path="$unix_path"
18511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18513    new_path="$unix_path"
18514  fi
18515
18516    fi
18517
18518    if test "x$new_path" = x; then
18519      # It's still not found. Now this is an unrecoverable error.
18520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18521$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18522      has_space=`$ECHO "$complete" | $GREP " "`
18523      if test "x$has_space" != x; then
18524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18526      fi
18527      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18528    fi
18529  fi
18530
18531  # Now new_path has a complete unix path to the binary
18532  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18533    # Keep paths in /bin as-is, but remove trailing .exe if any
18534    new_path="${new_path/%.exe/}"
18535    # Do not save /bin paths to all_fixpath_prefixes!
18536  else
18537    # Not in mixed or Windows style, start by that.
18538    new_path=`cmd //c echo $new_path`
18539
18540  input_path="$new_path"
18541  # Check if we need to convert this using DOS-style short mode. If the path
18542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18543  # take no chances and rewrite it.
18544  # Note: m4 eats our [], so we need to use [ and ] instead.
18545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18546  if test "x$has_forbidden_chars" != x; then
18547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18549  fi
18550
18551    # Output is in $new_path
18552
18553  windows_path="$new_path"
18554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18555    unix_path=`$CYGPATH -u "$windows_path"`
18556    new_path="$unix_path"
18557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18559    new_path="$unix_path"
18560  fi
18561
18562    # remove trailing .exe if any
18563    new_path="${new_path/%.exe/}"
18564
18565    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18566    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18567  fi
18568
18569    else
18570      # We're on a unix platform. Hooray! :)
18571      # First separate the path from the arguments. This will split at the first
18572      # space.
18573      complete="$FOUND_MAKE"
18574      path="${complete%% *}"
18575      tmp="$complete EOL"
18576      arguments="${tmp#* }"
18577
18578      # Cannot rely on the command "which" here since it doesn't always work.
18579      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18580      if test -z "$is_absolute_path"; then
18581        # Path to executable is not absolute. Find it.
18582        IFS_save="$IFS"
18583        IFS=:
18584        for p in $PATH; do
18585          if test -f "$p/$path" && test -x "$p/$path"; then
18586            new_path="$p/$path"
18587            break
18588          fi
18589        done
18590        IFS="$IFS_save"
18591      else
18592        # This is an absolute path, we can use it without further modifications.
18593        new_path="$path"
18594      fi
18595
18596      if test "x$new_path" = x; then
18597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18598$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18599        has_space=`$ECHO "$complete" | $GREP " "`
18600        if test "x$has_space" != x; then
18601          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18602$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18603        fi
18604        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18605      fi
18606    fi
18607
18608    # Now join together the path and the arguments once again
18609    if test "x$arguments" != xEOL; then
18610      new_complete="$new_path ${arguments% *}"
18611    else
18612      new_complete="$new_path"
18613    fi
18614
18615    if test "x$complete" != "x$new_complete"; then
18616      FOUND_MAKE="$new_complete"
18617      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18618$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18619    fi
18620  fi
18621
18622        fi
18623      fi
18624    fi
18625  fi
18626
18627
18628    if test "x$FOUND_MAKE" = x; then
18629      for ac_prog in make
18630do
18631  # Extract the first word of "$ac_prog", so it can be a program name with args.
18632set dummy $ac_prog; ac_word=$2
18633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18634$as_echo_n "checking for $ac_word... " >&6; }
18635if ${ac_cv_path_CHECK_MAKE+:} false; then :
18636  $as_echo_n "(cached) " >&6
18637else
18638  case $CHECK_MAKE in
18639  [\\/]* | ?:[\\/]*)
18640  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18641  ;;
18642  *)
18643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18644for as_dir in $PATH
18645do
18646  IFS=$as_save_IFS
18647  test -z "$as_dir" && as_dir=.
18648    for ac_exec_ext in '' $ac_executable_extensions; do
18649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18650    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18652    break 2
18653  fi
18654done
18655  done
18656IFS=$as_save_IFS
18657
18658  ;;
18659esac
18660fi
18661CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18662if test -n "$CHECK_MAKE"; then
18663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18664$as_echo "$CHECK_MAKE" >&6; }
18665else
18666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18667$as_echo "no" >&6; }
18668fi
18669
18670
18671  test -n "$CHECK_MAKE" && break
18672done
18673
18674
18675  MAKE_CANDIDATE=""$CHECK_MAKE""
18676  DESCRIPTION="make in PATH"
18677
18678  # On Cygwin, we require a newer version of make than on other platforms
18679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18680    MAKE_VERSION_EXPR="-e 4\."
18681    MAKE_REQUIRED_VERSION="4.0"
18682   else
18683    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18684    MAKE_REQUIRED_VERSION="3.81"
18685  fi
18686
18687  if test "x$MAKE_CANDIDATE" != x; then
18688    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18689$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18690    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18691    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18692    if test "x$IS_GNU_MAKE" = x; then
18693      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18694$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18695    else
18696      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18697      if test "x$IS_MODERN_MAKE" = x; then
18698        { $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
18699$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;}
18700      else
18701        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18702          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18703            MAKE_EXPECTED_ENV='cygwin'
18704          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18705            MAKE_EXPECTED_ENV='msys'
18706          else
18707            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18708          fi
18709          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18710          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18711        else
18712          # Not relevant for non-Windows
18713          IS_MAKE_CORRECT_ENV=true
18714        fi
18715        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18716          { $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
18717$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;}
18718        else
18719          FOUND_MAKE=$MAKE_CANDIDATE
18720
18721  # Only process if variable expands to non-empty
18722
18723  if test "x$FOUND_MAKE" != x; then
18724    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18725
18726  # First separate the path from the arguments. This will split at the first
18727  # space.
18728  complete="$FOUND_MAKE"
18729  path="${complete%% *}"
18730  tmp="$complete EOL"
18731  arguments="${tmp#* }"
18732
18733  # Input might be given as Windows format, start by converting to
18734  # unix format.
18735  new_path=`$CYGPATH -u "$path"`
18736
18737  # Now try to locate executable using which
18738  new_path=`$WHICH "$new_path" 2> /dev/null`
18739  # bat and cmd files are not always considered executable in cygwin causing which
18740  # to not find them
18741  if test "x$new_path" = x \
18742      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18743      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18744    new_path=`$CYGPATH -u "$path"`
18745  fi
18746  if test "x$new_path" = x; then
18747    # Oops. Which didn't find the executable.
18748    # The splitting of arguments from the executable at a space might have been incorrect,
18749    # since paths with space are more likely in Windows. Give it another try with the whole
18750    # argument.
18751    path="$complete"
18752    arguments="EOL"
18753    new_path=`$CYGPATH -u "$path"`
18754    new_path=`$WHICH "$new_path" 2> /dev/null`
18755    # bat and cmd files are not always considered executable in cygwin causing which
18756    # to not find them
18757    if test "x$new_path" = x \
18758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18760      new_path=`$CYGPATH -u "$path"`
18761    fi
18762    if test "x$new_path" = x; then
18763      # It's still not found. Now this is an unrecoverable error.
18764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18765$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18766      has_space=`$ECHO "$complete" | $GREP " "`
18767      if test "x$has_space" != x; then
18768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18770      fi
18771      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18772    fi
18773  fi
18774
18775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18778  # "foo.exe" is OK but "foo" is an error.
18779  #
18780  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18781  # It is also a way to make sure we got the proper file name for the real test later on.
18782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18783  if test "x$test_shortpath" = x; then
18784    # Short path failed, file does not exist as specified.
18785    # Try adding .exe or .cmd
18786    if test -f "${new_path}.exe"; then
18787      input_to_shortpath="${new_path}.exe"
18788    elif test -f "${new_path}.cmd"; then
18789      input_to_shortpath="${new_path}.cmd"
18790    else
18791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18792$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18795      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18796    fi
18797  else
18798    input_to_shortpath="$new_path"
18799  fi
18800
18801  # Call helper function which possibly converts this using DOS-style short mode.
18802  # If so, the updated path is stored in $new_path.
18803  new_path="$input_to_shortpath"
18804
18805  input_path="$input_to_shortpath"
18806  # Check if we need to convert this using DOS-style short mode. If the path
18807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18808  # take no chances and rewrite it.
18809  # Note: m4 eats our [], so we need to use [ and ] instead.
18810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18811  if test "x$has_forbidden_chars" != x; then
18812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18816      # Going to short mode and back again did indeed matter. Since short mode is
18817      # case insensitive, let's make it lowercase to improve readability.
18818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18819      # Now convert it back to Unix-style (cygpath)
18820      input_path=`$CYGPATH -u "$shortmode_path"`
18821      new_path="$input_path"
18822    fi
18823  fi
18824
18825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18826  if test "x$test_cygdrive_prefix" = x; then
18827    # As a simple fix, exclude /usr/bin since it's not a real path.
18828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18830      # a path prefixed by /cygdrive for fixpath to work.
18831      new_path="$CYGWIN_ROOT_PATH$input_path"
18832    fi
18833  fi
18834
18835  # remove trailing .exe if any
18836  new_path="${new_path/%.exe/}"
18837
18838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18839
18840  # First separate the path from the arguments. This will split at the first
18841  # space.
18842  complete="$FOUND_MAKE"
18843  path="${complete%% *}"
18844  tmp="$complete EOL"
18845  arguments="${tmp#* }"
18846
18847  # Input might be given as Windows format, start by converting to
18848  # unix format.
18849  new_path="$path"
18850
18851  windows_path="$new_path"
18852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18853    unix_path=`$CYGPATH -u "$windows_path"`
18854    new_path="$unix_path"
18855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18857    new_path="$unix_path"
18858  fi
18859
18860
18861  # Now try to locate executable using which
18862  new_path=`$WHICH "$new_path" 2> /dev/null`
18863
18864  if test "x$new_path" = x; then
18865    # Oops. Which didn't find the executable.
18866    # The splitting of arguments from the executable at a space might have been incorrect,
18867    # since paths with space are more likely in Windows. Give it another try with the whole
18868    # argument.
18869    path="$complete"
18870    arguments="EOL"
18871    new_path="$path"
18872
18873  windows_path="$new_path"
18874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18875    unix_path=`$CYGPATH -u "$windows_path"`
18876    new_path="$unix_path"
18877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18879    new_path="$unix_path"
18880  fi
18881
18882
18883    new_path=`$WHICH "$new_path" 2> /dev/null`
18884    # bat and cmd files are not always considered executable in MSYS causing which
18885    # to not find them
18886    if test "x$new_path" = x \
18887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18889      new_path="$path"
18890
18891  windows_path="$new_path"
18892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18893    unix_path=`$CYGPATH -u "$windows_path"`
18894    new_path="$unix_path"
18895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18897    new_path="$unix_path"
18898  fi
18899
18900    fi
18901
18902    if test "x$new_path" = x; then
18903      # It's still not found. Now this is an unrecoverable error.
18904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18905$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18906      has_space=`$ECHO "$complete" | $GREP " "`
18907      if test "x$has_space" != x; then
18908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18910      fi
18911      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18912    fi
18913  fi
18914
18915  # Now new_path has a complete unix path to the binary
18916  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18917    # Keep paths in /bin as-is, but remove trailing .exe if any
18918    new_path="${new_path/%.exe/}"
18919    # Do not save /bin paths to all_fixpath_prefixes!
18920  else
18921    # Not in mixed or Windows style, start by that.
18922    new_path=`cmd //c echo $new_path`
18923
18924  input_path="$new_path"
18925  # Check if we need to convert this using DOS-style short mode. If the path
18926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18927  # take no chances and rewrite it.
18928  # Note: m4 eats our [], so we need to use [ and ] instead.
18929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18930  if test "x$has_forbidden_chars" != x; then
18931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18933  fi
18934
18935    # Output is in $new_path
18936
18937  windows_path="$new_path"
18938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18939    unix_path=`$CYGPATH -u "$windows_path"`
18940    new_path="$unix_path"
18941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18943    new_path="$unix_path"
18944  fi
18945
18946    # remove trailing .exe if any
18947    new_path="${new_path/%.exe/}"
18948
18949    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18950    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18951  fi
18952
18953    else
18954      # We're on a unix platform. Hooray! :)
18955      # First separate the path from the arguments. This will split at the first
18956      # space.
18957      complete="$FOUND_MAKE"
18958      path="${complete%% *}"
18959      tmp="$complete EOL"
18960      arguments="${tmp#* }"
18961
18962      # Cannot rely on the command "which" here since it doesn't always work.
18963      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18964      if test -z "$is_absolute_path"; then
18965        # Path to executable is not absolute. Find it.
18966        IFS_save="$IFS"
18967        IFS=:
18968        for p in $PATH; do
18969          if test -f "$p/$path" && test -x "$p/$path"; then
18970            new_path="$p/$path"
18971            break
18972          fi
18973        done
18974        IFS="$IFS_save"
18975      else
18976        # This is an absolute path, we can use it without further modifications.
18977        new_path="$path"
18978      fi
18979
18980      if test "x$new_path" = x; then
18981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18982$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18983        has_space=`$ECHO "$complete" | $GREP " "`
18984        if test "x$has_space" != x; then
18985          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18986$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18987        fi
18988        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18989      fi
18990    fi
18991
18992    # Now join together the path and the arguments once again
18993    if test "x$arguments" != xEOL; then
18994      new_complete="$new_path ${arguments% *}"
18995    else
18996      new_complete="$new_path"
18997    fi
18998
18999    if test "x$complete" != "x$new_complete"; then
19000      FOUND_MAKE="$new_complete"
19001      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19002$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19003    fi
19004  fi
19005
19006        fi
19007      fi
19008    fi
19009  fi
19010
19011    fi
19012
19013    if test "x$FOUND_MAKE" = x; then
19014      if test "x$TOOLCHAIN_PATH" != x; then
19015        # We have a toolchain path, check that as well before giving up.
19016        OLD_PATH=$PATH
19017        PATH=$TOOLCHAIN_PATH:$PATH
19018        for ac_prog in gmake
19019do
19020  # Extract the first word of "$ac_prog", so it can be a program name with args.
19021set dummy $ac_prog; ac_word=$2
19022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19023$as_echo_n "checking for $ac_word... " >&6; }
19024if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19025  $as_echo_n "(cached) " >&6
19026else
19027  case $CHECK_TOOLSDIR_GMAKE in
19028  [\\/]* | ?:[\\/]*)
19029  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19030  ;;
19031  *)
19032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19033for as_dir in $PATH
19034do
19035  IFS=$as_save_IFS
19036  test -z "$as_dir" && as_dir=.
19037    for ac_exec_ext in '' $ac_executable_extensions; do
19038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19039    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19041    break 2
19042  fi
19043done
19044  done
19045IFS=$as_save_IFS
19046
19047  ;;
19048esac
19049fi
19050CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19051if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19053$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19054else
19055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19056$as_echo "no" >&6; }
19057fi
19058
19059
19060  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19061done
19062
19063
19064  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19065  DESCRIPTION="gmake in tools-dir"
19066
19067  # On Cygwin, we require a newer version of make than on other platforms
19068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19069    MAKE_VERSION_EXPR="-e 4\."
19070    MAKE_REQUIRED_VERSION="4.0"
19071   else
19072    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19073    MAKE_REQUIRED_VERSION="3.81"
19074  fi
19075
19076  if test "x$MAKE_CANDIDATE" != x; then
19077    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19078$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19079    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19080    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19081    if test "x$IS_GNU_MAKE" = x; then
19082      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19083$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19084    else
19085      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19086      if test "x$IS_MODERN_MAKE" = x; then
19087        { $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
19088$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;}
19089      else
19090        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19091          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19092            MAKE_EXPECTED_ENV='cygwin'
19093          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19094            MAKE_EXPECTED_ENV='msys'
19095          else
19096            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19097          fi
19098          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19099          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19100        else
19101          # Not relevant for non-Windows
19102          IS_MAKE_CORRECT_ENV=true
19103        fi
19104        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19105          { $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
19106$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;}
19107        else
19108          FOUND_MAKE=$MAKE_CANDIDATE
19109
19110  # Only process if variable expands to non-empty
19111
19112  if test "x$FOUND_MAKE" != x; then
19113    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19114
19115  # First separate the path from the arguments. This will split at the first
19116  # space.
19117  complete="$FOUND_MAKE"
19118  path="${complete%% *}"
19119  tmp="$complete EOL"
19120  arguments="${tmp#* }"
19121
19122  # Input might be given as Windows format, start by converting to
19123  # unix format.
19124  new_path=`$CYGPATH -u "$path"`
19125
19126  # Now try to locate executable using which
19127  new_path=`$WHICH "$new_path" 2> /dev/null`
19128  # bat and cmd files are not always considered executable in cygwin causing which
19129  # to not find them
19130  if test "x$new_path" = x \
19131      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19132      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19133    new_path=`$CYGPATH -u "$path"`
19134  fi
19135  if test "x$new_path" = x; then
19136    # Oops. Which didn't find the executable.
19137    # The splitting of arguments from the executable at a space might have been incorrect,
19138    # since paths with space are more likely in Windows. Give it another try with the whole
19139    # argument.
19140    path="$complete"
19141    arguments="EOL"
19142    new_path=`$CYGPATH -u "$path"`
19143    new_path=`$WHICH "$new_path" 2> /dev/null`
19144    # bat and cmd files are not always considered executable in cygwin causing which
19145    # to not find them
19146    if test "x$new_path" = x \
19147        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19148        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19149      new_path=`$CYGPATH -u "$path"`
19150    fi
19151    if test "x$new_path" = x; then
19152      # It's still not found. Now this is an unrecoverable error.
19153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19154$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19155      has_space=`$ECHO "$complete" | $GREP " "`
19156      if test "x$has_space" != x; then
19157        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19158$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19159      fi
19160      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19161    fi
19162  fi
19163
19164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19167  # "foo.exe" is OK but "foo" is an error.
19168  #
19169  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19170  # It is also a way to make sure we got the proper file name for the real test later on.
19171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19172  if test "x$test_shortpath" = x; then
19173    # Short path failed, file does not exist as specified.
19174    # Try adding .exe or .cmd
19175    if test -f "${new_path}.exe"; then
19176      input_to_shortpath="${new_path}.exe"
19177    elif test -f "${new_path}.cmd"; then
19178      input_to_shortpath="${new_path}.cmd"
19179    else
19180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19181$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19182      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19183$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19184      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19185    fi
19186  else
19187    input_to_shortpath="$new_path"
19188  fi
19189
19190  # Call helper function which possibly converts this using DOS-style short mode.
19191  # If so, the updated path is stored in $new_path.
19192  new_path="$input_to_shortpath"
19193
19194  input_path="$input_to_shortpath"
19195  # Check if we need to convert this using DOS-style short mode. If the path
19196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19197  # take no chances and rewrite it.
19198  # Note: m4 eats our [], so we need to use [ and ] instead.
19199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19200  if test "x$has_forbidden_chars" != x; then
19201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19205      # Going to short mode and back again did indeed matter. Since short mode is
19206      # case insensitive, let's make it lowercase to improve readability.
19207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19208      # Now convert it back to Unix-style (cygpath)
19209      input_path=`$CYGPATH -u "$shortmode_path"`
19210      new_path="$input_path"
19211    fi
19212  fi
19213
19214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19215  if test "x$test_cygdrive_prefix" = x; then
19216    # As a simple fix, exclude /usr/bin since it's not a real path.
19217    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19219      # a path prefixed by /cygdrive for fixpath to work.
19220      new_path="$CYGWIN_ROOT_PATH$input_path"
19221    fi
19222  fi
19223
19224  # remove trailing .exe if any
19225  new_path="${new_path/%.exe/}"
19226
19227    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19228
19229  # First separate the path from the arguments. This will split at the first
19230  # space.
19231  complete="$FOUND_MAKE"
19232  path="${complete%% *}"
19233  tmp="$complete EOL"
19234  arguments="${tmp#* }"
19235
19236  # Input might be given as Windows format, start by converting to
19237  # unix format.
19238  new_path="$path"
19239
19240  windows_path="$new_path"
19241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19242    unix_path=`$CYGPATH -u "$windows_path"`
19243    new_path="$unix_path"
19244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19246    new_path="$unix_path"
19247  fi
19248
19249
19250  # Now try to locate executable using which
19251  new_path=`$WHICH "$new_path" 2> /dev/null`
19252
19253  if test "x$new_path" = x; then
19254    # Oops. Which didn't find the executable.
19255    # The splitting of arguments from the executable at a space might have been incorrect,
19256    # since paths with space are more likely in Windows. Give it another try with the whole
19257    # argument.
19258    path="$complete"
19259    arguments="EOL"
19260    new_path="$path"
19261
19262  windows_path="$new_path"
19263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19264    unix_path=`$CYGPATH -u "$windows_path"`
19265    new_path="$unix_path"
19266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19268    new_path="$unix_path"
19269  fi
19270
19271
19272    new_path=`$WHICH "$new_path" 2> /dev/null`
19273    # bat and cmd files are not always considered executable in MSYS causing which
19274    # to not find them
19275    if test "x$new_path" = x \
19276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19278      new_path="$path"
19279
19280  windows_path="$new_path"
19281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19282    unix_path=`$CYGPATH -u "$windows_path"`
19283    new_path="$unix_path"
19284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19286    new_path="$unix_path"
19287  fi
19288
19289    fi
19290
19291    if test "x$new_path" = x; then
19292      # It's still not found. Now this is an unrecoverable error.
19293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19294$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19295      has_space=`$ECHO "$complete" | $GREP " "`
19296      if test "x$has_space" != x; then
19297        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19298$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19299      fi
19300      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19301    fi
19302  fi
19303
19304  # Now new_path has a complete unix path to the binary
19305  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19306    # Keep paths in /bin as-is, but remove trailing .exe if any
19307    new_path="${new_path/%.exe/}"
19308    # Do not save /bin paths to all_fixpath_prefixes!
19309  else
19310    # Not in mixed or Windows style, start by that.
19311    new_path=`cmd //c echo $new_path`
19312
19313  input_path="$new_path"
19314  # Check if we need to convert this using DOS-style short mode. If the path
19315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19316  # take no chances and rewrite it.
19317  # Note: m4 eats our [], so we need to use [ and ] instead.
19318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19319  if test "x$has_forbidden_chars" != x; then
19320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19322  fi
19323
19324    # Output is in $new_path
19325
19326  windows_path="$new_path"
19327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19328    unix_path=`$CYGPATH -u "$windows_path"`
19329    new_path="$unix_path"
19330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19332    new_path="$unix_path"
19333  fi
19334
19335    # remove trailing .exe if any
19336    new_path="${new_path/%.exe/}"
19337
19338    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19339    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19340  fi
19341
19342    else
19343      # We're on a unix platform. Hooray! :)
19344      # First separate the path from the arguments. This will split at the first
19345      # space.
19346      complete="$FOUND_MAKE"
19347      path="${complete%% *}"
19348      tmp="$complete EOL"
19349      arguments="${tmp#* }"
19350
19351      # Cannot rely on the command "which" here since it doesn't always work.
19352      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19353      if test -z "$is_absolute_path"; then
19354        # Path to executable is not absolute. Find it.
19355        IFS_save="$IFS"
19356        IFS=:
19357        for p in $PATH; do
19358          if test -f "$p/$path" && test -x "$p/$path"; then
19359            new_path="$p/$path"
19360            break
19361          fi
19362        done
19363        IFS="$IFS_save"
19364      else
19365        # This is an absolute path, we can use it without further modifications.
19366        new_path="$path"
19367      fi
19368
19369      if test "x$new_path" = x; then
19370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19371$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19372        has_space=`$ECHO "$complete" | $GREP " "`
19373        if test "x$has_space" != x; then
19374          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19375$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19376        fi
19377        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19378      fi
19379    fi
19380
19381    # Now join together the path and the arguments once again
19382    if test "x$arguments" != xEOL; then
19383      new_complete="$new_path ${arguments% *}"
19384    else
19385      new_complete="$new_path"
19386    fi
19387
19388    if test "x$complete" != "x$new_complete"; then
19389      FOUND_MAKE="$new_complete"
19390      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19391$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19392    fi
19393  fi
19394
19395        fi
19396      fi
19397    fi
19398  fi
19399
19400        if test "x$FOUND_MAKE" = x; then
19401          for ac_prog in make
19402do
19403  # Extract the first word of "$ac_prog", so it can be a program name with args.
19404set dummy $ac_prog; ac_word=$2
19405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19406$as_echo_n "checking for $ac_word... " >&6; }
19407if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19408  $as_echo_n "(cached) " >&6
19409else
19410  case $CHECK_TOOLSDIR_MAKE in
19411  [\\/]* | ?:[\\/]*)
19412  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19413  ;;
19414  *)
19415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19416for as_dir in $PATH
19417do
19418  IFS=$as_save_IFS
19419  test -z "$as_dir" && as_dir=.
19420    for ac_exec_ext in '' $ac_executable_extensions; do
19421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19422    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19424    break 2
19425  fi
19426done
19427  done
19428IFS=$as_save_IFS
19429
19430  ;;
19431esac
19432fi
19433CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19434if test -n "$CHECK_TOOLSDIR_MAKE"; then
19435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19436$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19437else
19438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19439$as_echo "no" >&6; }
19440fi
19441
19442
19443  test -n "$CHECK_TOOLSDIR_MAKE" && break
19444done
19445
19446
19447  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19448  DESCRIPTION="make in tools-dir"
19449
19450  # On Cygwin, we require a newer version of make than on other platforms
19451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19452    MAKE_VERSION_EXPR="-e 4\."
19453    MAKE_REQUIRED_VERSION="4.0"
19454   else
19455    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19456    MAKE_REQUIRED_VERSION="3.81"
19457  fi
19458
19459  if test "x$MAKE_CANDIDATE" != x; then
19460    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19461$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19462    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19463    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19464    if test "x$IS_GNU_MAKE" = x; then
19465      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19466$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19467    else
19468      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19469      if test "x$IS_MODERN_MAKE" = x; then
19470        { $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
19471$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;}
19472      else
19473        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19474          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19475            MAKE_EXPECTED_ENV='cygwin'
19476          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19477            MAKE_EXPECTED_ENV='msys'
19478          else
19479            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19480          fi
19481          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19482          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19483        else
19484          # Not relevant for non-Windows
19485          IS_MAKE_CORRECT_ENV=true
19486        fi
19487        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19488          { $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
19489$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;}
19490        else
19491          FOUND_MAKE=$MAKE_CANDIDATE
19492
19493  # Only process if variable expands to non-empty
19494
19495  if test "x$FOUND_MAKE" != x; then
19496    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19497
19498  # First separate the path from the arguments. This will split at the first
19499  # space.
19500  complete="$FOUND_MAKE"
19501  path="${complete%% *}"
19502  tmp="$complete EOL"
19503  arguments="${tmp#* }"
19504
19505  # Input might be given as Windows format, start by converting to
19506  # unix format.
19507  new_path=`$CYGPATH -u "$path"`
19508
19509  # Now try to locate executable using which
19510  new_path=`$WHICH "$new_path" 2> /dev/null`
19511  # bat and cmd files are not always considered executable in cygwin causing which
19512  # to not find them
19513  if test "x$new_path" = x \
19514      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19515      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19516    new_path=`$CYGPATH -u "$path"`
19517  fi
19518  if test "x$new_path" = x; then
19519    # Oops. Which didn't find the executable.
19520    # The splitting of arguments from the executable at a space might have been incorrect,
19521    # since paths with space are more likely in Windows. Give it another try with the whole
19522    # argument.
19523    path="$complete"
19524    arguments="EOL"
19525    new_path=`$CYGPATH -u "$path"`
19526    new_path=`$WHICH "$new_path" 2> /dev/null`
19527    # bat and cmd files are not always considered executable in cygwin causing which
19528    # to not find them
19529    if test "x$new_path" = x \
19530        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19531        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19532      new_path=`$CYGPATH -u "$path"`
19533    fi
19534    if test "x$new_path" = x; then
19535      # It's still not found. Now this is an unrecoverable error.
19536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19537$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19538      has_space=`$ECHO "$complete" | $GREP " "`
19539      if test "x$has_space" != x; then
19540        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19541$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19542      fi
19543      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19544    fi
19545  fi
19546
19547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19550  # "foo.exe" is OK but "foo" is an error.
19551  #
19552  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19553  # It is also a way to make sure we got the proper file name for the real test later on.
19554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19555  if test "x$test_shortpath" = x; then
19556    # Short path failed, file does not exist as specified.
19557    # Try adding .exe or .cmd
19558    if test -f "${new_path}.exe"; then
19559      input_to_shortpath="${new_path}.exe"
19560    elif test -f "${new_path}.cmd"; then
19561      input_to_shortpath="${new_path}.cmd"
19562    else
19563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19564$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19565      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19566$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19567      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19568    fi
19569  else
19570    input_to_shortpath="$new_path"
19571  fi
19572
19573  # Call helper function which possibly converts this using DOS-style short mode.
19574  # If so, the updated path is stored in $new_path.
19575  new_path="$input_to_shortpath"
19576
19577  input_path="$input_to_shortpath"
19578  # Check if we need to convert this using DOS-style short mode. If the path
19579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19580  # take no chances and rewrite it.
19581  # Note: m4 eats our [], so we need to use [ and ] instead.
19582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19583  if test "x$has_forbidden_chars" != x; then
19584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19588      # Going to short mode and back again did indeed matter. Since short mode is
19589      # case insensitive, let's make it lowercase to improve readability.
19590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19591      # Now convert it back to Unix-style (cygpath)
19592      input_path=`$CYGPATH -u "$shortmode_path"`
19593      new_path="$input_path"
19594    fi
19595  fi
19596
19597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19598  if test "x$test_cygdrive_prefix" = x; then
19599    # As a simple fix, exclude /usr/bin since it's not a real path.
19600    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19602      # a path prefixed by /cygdrive for fixpath to work.
19603      new_path="$CYGWIN_ROOT_PATH$input_path"
19604    fi
19605  fi
19606
19607  # remove trailing .exe if any
19608  new_path="${new_path/%.exe/}"
19609
19610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19611
19612  # First separate the path from the arguments. This will split at the first
19613  # space.
19614  complete="$FOUND_MAKE"
19615  path="${complete%% *}"
19616  tmp="$complete EOL"
19617  arguments="${tmp#* }"
19618
19619  # Input might be given as Windows format, start by converting to
19620  # unix format.
19621  new_path="$path"
19622
19623  windows_path="$new_path"
19624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19625    unix_path=`$CYGPATH -u "$windows_path"`
19626    new_path="$unix_path"
19627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19629    new_path="$unix_path"
19630  fi
19631
19632
19633  # Now try to locate executable using which
19634  new_path=`$WHICH "$new_path" 2> /dev/null`
19635
19636  if test "x$new_path" = x; then
19637    # Oops. Which didn't find the executable.
19638    # The splitting of arguments from the executable at a space might have been incorrect,
19639    # since paths with space are more likely in Windows. Give it another try with the whole
19640    # argument.
19641    path="$complete"
19642    arguments="EOL"
19643    new_path="$path"
19644
19645  windows_path="$new_path"
19646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19647    unix_path=`$CYGPATH -u "$windows_path"`
19648    new_path="$unix_path"
19649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19651    new_path="$unix_path"
19652  fi
19653
19654
19655    new_path=`$WHICH "$new_path" 2> /dev/null`
19656    # bat and cmd files are not always considered executable in MSYS causing which
19657    # to not find them
19658    if test "x$new_path" = x \
19659        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19660        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19661      new_path="$path"
19662
19663  windows_path="$new_path"
19664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19665    unix_path=`$CYGPATH -u "$windows_path"`
19666    new_path="$unix_path"
19667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19669    new_path="$unix_path"
19670  fi
19671
19672    fi
19673
19674    if test "x$new_path" = x; then
19675      # It's still not found. Now this is an unrecoverable error.
19676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19677$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19678      has_space=`$ECHO "$complete" | $GREP " "`
19679      if test "x$has_space" != x; then
19680        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19682      fi
19683      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19684    fi
19685  fi
19686
19687  # Now new_path has a complete unix path to the binary
19688  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19689    # Keep paths in /bin as-is, but remove trailing .exe if any
19690    new_path="${new_path/%.exe/}"
19691    # Do not save /bin paths to all_fixpath_prefixes!
19692  else
19693    # Not in mixed or Windows style, start by that.
19694    new_path=`cmd //c echo $new_path`
19695
19696  input_path="$new_path"
19697  # Check if we need to convert this using DOS-style short mode. If the path
19698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19699  # take no chances and rewrite it.
19700  # Note: m4 eats our [], so we need to use [ and ] instead.
19701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19702  if test "x$has_forbidden_chars" != x; then
19703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19705  fi
19706
19707    # Output is in $new_path
19708
19709  windows_path="$new_path"
19710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19711    unix_path=`$CYGPATH -u "$windows_path"`
19712    new_path="$unix_path"
19713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19715    new_path="$unix_path"
19716  fi
19717
19718    # remove trailing .exe if any
19719    new_path="${new_path/%.exe/}"
19720
19721    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19722    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19723  fi
19724
19725    else
19726      # We're on a unix platform. Hooray! :)
19727      # First separate the path from the arguments. This will split at the first
19728      # space.
19729      complete="$FOUND_MAKE"
19730      path="${complete%% *}"
19731      tmp="$complete EOL"
19732      arguments="${tmp#* }"
19733
19734      # Cannot rely on the command "which" here since it doesn't always work.
19735      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19736      if test -z "$is_absolute_path"; then
19737        # Path to executable is not absolute. Find it.
19738        IFS_save="$IFS"
19739        IFS=:
19740        for p in $PATH; do
19741          if test -f "$p/$path" && test -x "$p/$path"; then
19742            new_path="$p/$path"
19743            break
19744          fi
19745        done
19746        IFS="$IFS_save"
19747      else
19748        # This is an absolute path, we can use it without further modifications.
19749        new_path="$path"
19750      fi
19751
19752      if test "x$new_path" = x; then
19753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19754$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19755        has_space=`$ECHO "$complete" | $GREP " "`
19756        if test "x$has_space" != x; then
19757          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19758$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19759        fi
19760        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19761      fi
19762    fi
19763
19764    # Now join together the path and the arguments once again
19765    if test "x$arguments" != xEOL; then
19766      new_complete="$new_path ${arguments% *}"
19767    else
19768      new_complete="$new_path"
19769    fi
19770
19771    if test "x$complete" != "x$new_complete"; then
19772      FOUND_MAKE="$new_complete"
19773      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19774$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19775    fi
19776  fi
19777
19778        fi
19779      fi
19780    fi
19781  fi
19782
19783        fi
19784        PATH=$OLD_PATH
19785      fi
19786    fi
19787
19788    if test "x$FOUND_MAKE" = x; then
19789      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
19790    fi
19791
19792    else
19793      # If it succeeded, then it was overridden by the user. We will use it
19794      # for the tool.
19795
19796      # First remove it from the list of overridden variables, so we can test
19797      # for unknown variables in the end.
19798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19799
19800      # Check if we try to supply an empty value
19801      if test "x$MAKE" = x; then
19802        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
19803$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
19804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19805$as_echo_n "checking for MAKE... " >&6; }
19806        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
19807$as_echo "disabled" >&6; }
19808      else
19809        # Check if the provided tool contains a complete path.
19810        tool_specified="$MAKE"
19811        tool_basename="${tool_specified##*/}"
19812        if test "x$tool_basename" = "x$tool_specified"; then
19813          # A command without a complete path is provided, search $PATH.
19814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
19815$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
19816          # Extract the first word of "$tool_basename", so it can be a program name with args.
19817set dummy $tool_basename; ac_word=$2
19818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19819$as_echo_n "checking for $ac_word... " >&6; }
19820if ${ac_cv_path_MAKE+:} false; then :
19821  $as_echo_n "(cached) " >&6
19822else
19823  case $MAKE in
19824  [\\/]* | ?:[\\/]*)
19825  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
19826  ;;
19827  *)
19828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19829for as_dir in $PATH
19830do
19831  IFS=$as_save_IFS
19832  test -z "$as_dir" && as_dir=.
19833    for ac_exec_ext in '' $ac_executable_extensions; do
19834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19835    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
19836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19837    break 2
19838  fi
19839done
19840  done
19841IFS=$as_save_IFS
19842
19843  ;;
19844esac
19845fi
19846MAKE=$ac_cv_path_MAKE
19847if test -n "$MAKE"; then
19848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
19849$as_echo "$MAKE" >&6; }
19850else
19851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19852$as_echo "no" >&6; }
19853fi
19854
19855
19856          if test "x$MAKE" = x; then
19857            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19858          fi
19859        else
19860          # Otherwise we believe it is a complete path. Use it as it is.
19861          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
19862$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
19863          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
19864$as_echo_n "checking for MAKE... " >&6; }
19865          if test ! -x "$tool_specified"; then
19866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19867$as_echo "not found" >&6; }
19868            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
19869          fi
19870          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19871$as_echo "$tool_specified" >&6; }
19872        fi
19873      fi
19874    fi
19875
19876    # If MAKE was set by user, verify the version
19877
19878  MAKE_CANDIDATE=""$MAKE""
19879  DESCRIPTION="user supplied MAKE=$MAKE"
19880
19881  # On Cygwin, we require a newer version of make than on other platforms
19882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19883    MAKE_VERSION_EXPR="-e 4\."
19884    MAKE_REQUIRED_VERSION="4.0"
19885   else
19886    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19887    MAKE_REQUIRED_VERSION="3.81"
19888  fi
19889
19890  if test "x$MAKE_CANDIDATE" != x; then
19891    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19892$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19893    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19894    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19895    if test "x$IS_GNU_MAKE" = x; then
19896      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19897$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19898    else
19899      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19900      if test "x$IS_MODERN_MAKE" = x; then
19901        { $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
19902$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;}
19903      else
19904        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19905          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19906            MAKE_EXPECTED_ENV='cygwin'
19907          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19908            MAKE_EXPECTED_ENV='msys'
19909          else
19910            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19911          fi
19912          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19913          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19914        else
19915          # Not relevant for non-Windows
19916          IS_MAKE_CORRECT_ENV=true
19917        fi
19918        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19919          { $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
19920$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;}
19921        else
19922          FOUND_MAKE=$MAKE_CANDIDATE
19923
19924  # Only process if variable expands to non-empty
19925
19926  if test "x$FOUND_MAKE" != x; then
19927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19928
19929  # First separate the path from the arguments. This will split at the first
19930  # space.
19931  complete="$FOUND_MAKE"
19932  path="${complete%% *}"
19933  tmp="$complete EOL"
19934  arguments="${tmp#* }"
19935
19936  # Input might be given as Windows format, start by converting to
19937  # unix format.
19938  new_path=`$CYGPATH -u "$path"`
19939
19940  # Now try to locate executable using which
19941  new_path=`$WHICH "$new_path" 2> /dev/null`
19942  # bat and cmd files are not always considered executable in cygwin causing which
19943  # to not find them
19944  if test "x$new_path" = x \
19945      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19946      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19947    new_path=`$CYGPATH -u "$path"`
19948  fi
19949  if test "x$new_path" = x; then
19950    # Oops. Which didn't find the executable.
19951    # The splitting of arguments from the executable at a space might have been incorrect,
19952    # since paths with space are more likely in Windows. Give it another try with the whole
19953    # argument.
19954    path="$complete"
19955    arguments="EOL"
19956    new_path=`$CYGPATH -u "$path"`
19957    new_path=`$WHICH "$new_path" 2> /dev/null`
19958    # bat and cmd files are not always considered executable in cygwin causing which
19959    # to not find them
19960    if test "x$new_path" = x \
19961        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19962        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19963      new_path=`$CYGPATH -u "$path"`
19964    fi
19965    if test "x$new_path" = x; then
19966      # It's still not found. Now this is an unrecoverable error.
19967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19968$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19969      has_space=`$ECHO "$complete" | $GREP " "`
19970      if test "x$has_space" != x; then
19971        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19972$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19973      fi
19974      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19975    fi
19976  fi
19977
19978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19981  # "foo.exe" is OK but "foo" is an error.
19982  #
19983  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19984  # It is also a way to make sure we got the proper file name for the real test later on.
19985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19986  if test "x$test_shortpath" = x; then
19987    # Short path failed, file does not exist as specified.
19988    # Try adding .exe or .cmd
19989    if test -f "${new_path}.exe"; then
19990      input_to_shortpath="${new_path}.exe"
19991    elif test -f "${new_path}.cmd"; then
19992      input_to_shortpath="${new_path}.cmd"
19993    else
19994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19995$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19996      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19997$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19998      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19999    fi
20000  else
20001    input_to_shortpath="$new_path"
20002  fi
20003
20004  # Call helper function which possibly converts this using DOS-style short mode.
20005  # If so, the updated path is stored in $new_path.
20006  new_path="$input_to_shortpath"
20007
20008  input_path="$input_to_shortpath"
20009  # Check if we need to convert this using DOS-style short mode. If the path
20010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20011  # take no chances and rewrite it.
20012  # Note: m4 eats our [], so we need to use [ and ] instead.
20013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20014  if test "x$has_forbidden_chars" != x; then
20015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20019      # Going to short mode and back again did indeed matter. Since short mode is
20020      # case insensitive, let's make it lowercase to improve readability.
20021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20022      # Now convert it back to Unix-style (cygpath)
20023      input_path=`$CYGPATH -u "$shortmode_path"`
20024      new_path="$input_path"
20025    fi
20026  fi
20027
20028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20029  if test "x$test_cygdrive_prefix" = x; then
20030    # As a simple fix, exclude /usr/bin since it's not a real path.
20031    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20033      # a path prefixed by /cygdrive for fixpath to work.
20034      new_path="$CYGWIN_ROOT_PATH$input_path"
20035    fi
20036  fi
20037
20038  # remove trailing .exe if any
20039  new_path="${new_path/%.exe/}"
20040
20041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20042
20043  # First separate the path from the arguments. This will split at the first
20044  # space.
20045  complete="$FOUND_MAKE"
20046  path="${complete%% *}"
20047  tmp="$complete EOL"
20048  arguments="${tmp#* }"
20049
20050  # Input might be given as Windows format, start by converting to
20051  # unix format.
20052  new_path="$path"
20053
20054  windows_path="$new_path"
20055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20056    unix_path=`$CYGPATH -u "$windows_path"`
20057    new_path="$unix_path"
20058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20060    new_path="$unix_path"
20061  fi
20062
20063
20064  # Now try to locate executable using which
20065  new_path=`$WHICH "$new_path" 2> /dev/null`
20066
20067  if test "x$new_path" = x; then
20068    # Oops. Which didn't find the executable.
20069    # The splitting of arguments from the executable at a space might have been incorrect,
20070    # since paths with space are more likely in Windows. Give it another try with the whole
20071    # argument.
20072    path="$complete"
20073    arguments="EOL"
20074    new_path="$path"
20075
20076  windows_path="$new_path"
20077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20078    unix_path=`$CYGPATH -u "$windows_path"`
20079    new_path="$unix_path"
20080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20082    new_path="$unix_path"
20083  fi
20084
20085
20086    new_path=`$WHICH "$new_path" 2> /dev/null`
20087    # bat and cmd files are not always considered executable in MSYS causing which
20088    # to not find them
20089    if test "x$new_path" = x \
20090        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20091        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20092      new_path="$path"
20093
20094  windows_path="$new_path"
20095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20096    unix_path=`$CYGPATH -u "$windows_path"`
20097    new_path="$unix_path"
20098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20100    new_path="$unix_path"
20101  fi
20102
20103    fi
20104
20105    if test "x$new_path" = x; then
20106      # It's still not found. Now this is an unrecoverable error.
20107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20108$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20109      has_space=`$ECHO "$complete" | $GREP " "`
20110      if test "x$has_space" != x; then
20111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20113      fi
20114      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20115    fi
20116  fi
20117
20118  # Now new_path has a complete unix path to the binary
20119  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20120    # Keep paths in /bin as-is, but remove trailing .exe if any
20121    new_path="${new_path/%.exe/}"
20122    # Do not save /bin paths to all_fixpath_prefixes!
20123  else
20124    # Not in mixed or Windows style, start by that.
20125    new_path=`cmd //c echo $new_path`
20126
20127  input_path="$new_path"
20128  # Check if we need to convert this using DOS-style short mode. If the path
20129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20130  # take no chances and rewrite it.
20131  # Note: m4 eats our [], so we need to use [ and ] instead.
20132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20133  if test "x$has_forbidden_chars" != x; then
20134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20136  fi
20137
20138    # Output is in $new_path
20139
20140  windows_path="$new_path"
20141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20142    unix_path=`$CYGPATH -u "$windows_path"`
20143    new_path="$unix_path"
20144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20146    new_path="$unix_path"
20147  fi
20148
20149    # remove trailing .exe if any
20150    new_path="${new_path/%.exe/}"
20151
20152    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20153    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20154  fi
20155
20156    else
20157      # We're on a unix platform. Hooray! :)
20158      # First separate the path from the arguments. This will split at the first
20159      # space.
20160      complete="$FOUND_MAKE"
20161      path="${complete%% *}"
20162      tmp="$complete EOL"
20163      arguments="${tmp#* }"
20164
20165      # Cannot rely on the command "which" here since it doesn't always work.
20166      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20167      if test -z "$is_absolute_path"; then
20168        # Path to executable is not absolute. Find it.
20169        IFS_save="$IFS"
20170        IFS=:
20171        for p in $PATH; do
20172          if test -f "$p/$path" && test -x "$p/$path"; then
20173            new_path="$p/$path"
20174            break
20175          fi
20176        done
20177        IFS="$IFS_save"
20178      else
20179        # This is an absolute path, we can use it without further modifications.
20180        new_path="$path"
20181      fi
20182
20183      if test "x$new_path" = x; then
20184        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20185$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20186        has_space=`$ECHO "$complete" | $GREP " "`
20187        if test "x$has_space" != x; then
20188          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20189$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20190        fi
20191        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20192      fi
20193    fi
20194
20195    # Now join together the path and the arguments once again
20196    if test "x$arguments" != xEOL; then
20197      new_complete="$new_path ${arguments% *}"
20198    else
20199      new_complete="$new_path"
20200    fi
20201
20202    if test "x$complete" != "x$new_complete"; then
20203      FOUND_MAKE="$new_complete"
20204      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20205$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20206    fi
20207  fi
20208
20209        fi
20210      fi
20211    fi
20212  fi
20213
20214    if test "x$FOUND_MAKE" = x; then
20215      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20216    fi
20217
20218  fi
20219
20220
20221  MAKE=$FOUND_MAKE
20222
20223  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20224$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20225
20226
20227  # Check if make supports the output sync option and if so, setup using it.
20228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20229$as_echo_n "checking if make --output-sync is supported... " >&6; }
20230  if $MAKE --version -O > /dev/null 2>&1; then
20231    OUTPUT_SYNC_SUPPORTED=true
20232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20233$as_echo "yes" >&6; }
20234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20235$as_echo_n "checking for output-sync value... " >&6; }
20236
20237# Check whether --with-output-sync was given.
20238if test "${with_output_sync+set}" = set; then :
20239  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20240fi
20241
20242    if test "x$OUTPUT_SYNC" = "x"; then
20243      OUTPUT_SYNC=none
20244    fi
20245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20246$as_echo "$OUTPUT_SYNC" >&6; }
20247    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20248      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20249    fi
20250  else
20251    OUTPUT_SYNC_SUPPORTED=false
20252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20253$as_echo "no" >&6; }
20254  fi
20255
20256
20257
20258
20259
20260
20261  # Test if find supports -delete
20262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20263$as_echo_n "checking if find supports -delete... " >&6; }
20264  FIND_DELETE="-delete"
20265
20266  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20267
20268  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20269
20270  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20271  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20272    # No, it does not.
20273    rm $DELETEDIR/TestIfFindSupportsDelete
20274    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20275      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20276      FIND_DELETE="-print | xargs rm"
20277    else
20278      FIND_DELETE="-exec rm \{\} \+"
20279    fi
20280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20281$as_echo "no" >&6; }
20282  else
20283    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20284$as_echo "yes" >&6; }
20285  fi
20286  rmdir $DELETEDIR
20287
20288
20289
20290  # These tools might not be installed by default,
20291  # need hint on how to install them.
20292
20293
20294
20295  # Publish this variable in the help.
20296
20297
20298  if [ -z "${UNZIP+x}" ]; then
20299    # The variable is not set by user, try to locate tool using the code snippet
20300    for ac_prog in unzip
20301do
20302  # Extract the first word of "$ac_prog", so it can be a program name with args.
20303set dummy $ac_prog; ac_word=$2
20304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20305$as_echo_n "checking for $ac_word... " >&6; }
20306if ${ac_cv_path_UNZIP+:} false; then :
20307  $as_echo_n "(cached) " >&6
20308else
20309  case $UNZIP in
20310  [\\/]* | ?:[\\/]*)
20311  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20312  ;;
20313  *)
20314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20315for as_dir in $PATH
20316do
20317  IFS=$as_save_IFS
20318  test -z "$as_dir" && as_dir=.
20319    for ac_exec_ext in '' $ac_executable_extensions; do
20320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20321    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20323    break 2
20324  fi
20325done
20326  done
20327IFS=$as_save_IFS
20328
20329  ;;
20330esac
20331fi
20332UNZIP=$ac_cv_path_UNZIP
20333if test -n "$UNZIP"; then
20334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20335$as_echo "$UNZIP" >&6; }
20336else
20337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20338$as_echo "no" >&6; }
20339fi
20340
20341
20342  test -n "$UNZIP" && break
20343done
20344
20345  else
20346    # The variable is set, but is it from the command line or the environment?
20347
20348    # Try to remove the string !UNZIP! from our list.
20349    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20350    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20351      # If it failed, the variable was not from the command line. Ignore it,
20352      # but warn the user (except for BASH, which is always set by the calling BASH).
20353      if test "xUNZIP" != xBASH; then
20354        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20355$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20356      fi
20357      # Try to locate tool using the code snippet
20358      for ac_prog in unzip
20359do
20360  # Extract the first word of "$ac_prog", so it can be a program name with args.
20361set dummy $ac_prog; ac_word=$2
20362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20363$as_echo_n "checking for $ac_word... " >&6; }
20364if ${ac_cv_path_UNZIP+:} false; then :
20365  $as_echo_n "(cached) " >&6
20366else
20367  case $UNZIP in
20368  [\\/]* | ?:[\\/]*)
20369  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20370  ;;
20371  *)
20372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20373for as_dir in $PATH
20374do
20375  IFS=$as_save_IFS
20376  test -z "$as_dir" && as_dir=.
20377    for ac_exec_ext in '' $ac_executable_extensions; do
20378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20379    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20381    break 2
20382  fi
20383done
20384  done
20385IFS=$as_save_IFS
20386
20387  ;;
20388esac
20389fi
20390UNZIP=$ac_cv_path_UNZIP
20391if test -n "$UNZIP"; then
20392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20393$as_echo "$UNZIP" >&6; }
20394else
20395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20396$as_echo "no" >&6; }
20397fi
20398
20399
20400  test -n "$UNZIP" && break
20401done
20402
20403    else
20404      # If it succeeded, then it was overridden by the user. We will use it
20405      # for the tool.
20406
20407      # First remove it from the list of overridden variables, so we can test
20408      # for unknown variables in the end.
20409      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20410
20411      # Check if we try to supply an empty value
20412      if test "x$UNZIP" = x; then
20413        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20414$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20416$as_echo_n "checking for UNZIP... " >&6; }
20417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20418$as_echo "disabled" >&6; }
20419      else
20420        # Check if the provided tool contains a complete path.
20421        tool_specified="$UNZIP"
20422        tool_basename="${tool_specified##*/}"
20423        if test "x$tool_basename" = "x$tool_specified"; then
20424          # A command without a complete path is provided, search $PATH.
20425          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20426$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20427          # Extract the first word of "$tool_basename", so it can be a program name with args.
20428set dummy $tool_basename; ac_word=$2
20429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20430$as_echo_n "checking for $ac_word... " >&6; }
20431if ${ac_cv_path_UNZIP+:} false; then :
20432  $as_echo_n "(cached) " >&6
20433else
20434  case $UNZIP in
20435  [\\/]* | ?:[\\/]*)
20436  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20437  ;;
20438  *)
20439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20440for as_dir in $PATH
20441do
20442  IFS=$as_save_IFS
20443  test -z "$as_dir" && as_dir=.
20444    for ac_exec_ext in '' $ac_executable_extensions; do
20445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20446    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20448    break 2
20449  fi
20450done
20451  done
20452IFS=$as_save_IFS
20453
20454  ;;
20455esac
20456fi
20457UNZIP=$ac_cv_path_UNZIP
20458if test -n "$UNZIP"; then
20459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20460$as_echo "$UNZIP" >&6; }
20461else
20462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20463$as_echo "no" >&6; }
20464fi
20465
20466
20467          if test "x$UNZIP" = x; then
20468            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20469          fi
20470        else
20471          # Otherwise we believe it is a complete path. Use it as it is.
20472          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20473$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20474          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20475$as_echo_n "checking for UNZIP... " >&6; }
20476          if test ! -x "$tool_specified"; then
20477            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20478$as_echo "not found" >&6; }
20479            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20480          fi
20481          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20482$as_echo "$tool_specified" >&6; }
20483        fi
20484      fi
20485    fi
20486
20487  fi
20488
20489
20490
20491  if test "x$UNZIP" = x; then
20492    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20493  fi
20494
20495
20496
20497
20498
20499  # Publish this variable in the help.
20500
20501
20502  if [ -z "${ZIP+x}" ]; then
20503    # The variable is not set by user, try to locate tool using the code snippet
20504    for ac_prog in zip
20505do
20506  # Extract the first word of "$ac_prog", so it can be a program name with args.
20507set dummy $ac_prog; ac_word=$2
20508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20509$as_echo_n "checking for $ac_word... " >&6; }
20510if ${ac_cv_path_ZIP+:} false; then :
20511  $as_echo_n "(cached) " >&6
20512else
20513  case $ZIP in
20514  [\\/]* | ?:[\\/]*)
20515  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20516  ;;
20517  *)
20518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20519for as_dir in $PATH
20520do
20521  IFS=$as_save_IFS
20522  test -z "$as_dir" && as_dir=.
20523    for ac_exec_ext in '' $ac_executable_extensions; do
20524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20525    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20527    break 2
20528  fi
20529done
20530  done
20531IFS=$as_save_IFS
20532
20533  ;;
20534esac
20535fi
20536ZIP=$ac_cv_path_ZIP
20537if test -n "$ZIP"; then
20538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20539$as_echo "$ZIP" >&6; }
20540else
20541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20542$as_echo "no" >&6; }
20543fi
20544
20545
20546  test -n "$ZIP" && break
20547done
20548
20549  else
20550    # The variable is set, but is it from the command line or the environment?
20551
20552    # Try to remove the string !ZIP! from our list.
20553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20555      # If it failed, the variable was not from the command line. Ignore it,
20556      # but warn the user (except for BASH, which is always set by the calling BASH).
20557      if test "xZIP" != xBASH; then
20558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20559$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20560      fi
20561      # Try to locate tool using the code snippet
20562      for ac_prog in zip
20563do
20564  # Extract the first word of "$ac_prog", so it can be a program name with args.
20565set dummy $ac_prog; ac_word=$2
20566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20567$as_echo_n "checking for $ac_word... " >&6; }
20568if ${ac_cv_path_ZIP+:} false; then :
20569  $as_echo_n "(cached) " >&6
20570else
20571  case $ZIP in
20572  [\\/]* | ?:[\\/]*)
20573  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20574  ;;
20575  *)
20576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20577for as_dir in $PATH
20578do
20579  IFS=$as_save_IFS
20580  test -z "$as_dir" && as_dir=.
20581    for ac_exec_ext in '' $ac_executable_extensions; do
20582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20583    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20585    break 2
20586  fi
20587done
20588  done
20589IFS=$as_save_IFS
20590
20591  ;;
20592esac
20593fi
20594ZIP=$ac_cv_path_ZIP
20595if test -n "$ZIP"; then
20596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20597$as_echo "$ZIP" >&6; }
20598else
20599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20600$as_echo "no" >&6; }
20601fi
20602
20603
20604  test -n "$ZIP" && break
20605done
20606
20607    else
20608      # If it succeeded, then it was overridden by the user. We will use it
20609      # for the tool.
20610
20611      # First remove it from the list of overridden variables, so we can test
20612      # for unknown variables in the end.
20613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20614
20615      # Check if we try to supply an empty value
20616      if test "x$ZIP" = x; then
20617        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
20618$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
20619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20620$as_echo_n "checking for ZIP... " >&6; }
20621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20622$as_echo "disabled" >&6; }
20623      else
20624        # Check if the provided tool contains a complete path.
20625        tool_specified="$ZIP"
20626        tool_basename="${tool_specified##*/}"
20627        if test "x$tool_basename" = "x$tool_specified"; then
20628          # A command without a complete path is provided, search $PATH.
20629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
20630$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
20631          # Extract the first word of "$tool_basename", so it can be a program name with args.
20632set dummy $tool_basename; ac_word=$2
20633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20634$as_echo_n "checking for $ac_word... " >&6; }
20635if ${ac_cv_path_ZIP+:} false; then :
20636  $as_echo_n "(cached) " >&6
20637else
20638  case $ZIP in
20639  [\\/]* | ?:[\\/]*)
20640  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20641  ;;
20642  *)
20643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20644for as_dir in $PATH
20645do
20646  IFS=$as_save_IFS
20647  test -z "$as_dir" && as_dir=.
20648    for ac_exec_ext in '' $ac_executable_extensions; do
20649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20650    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20652    break 2
20653  fi
20654done
20655  done
20656IFS=$as_save_IFS
20657
20658  ;;
20659esac
20660fi
20661ZIP=$ac_cv_path_ZIP
20662if test -n "$ZIP"; then
20663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20664$as_echo "$ZIP" >&6; }
20665else
20666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20667$as_echo "no" >&6; }
20668fi
20669
20670
20671          if test "x$ZIP" = x; then
20672            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20673          fi
20674        else
20675          # Otherwise we believe it is a complete path. Use it as it is.
20676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
20677$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
20678          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
20679$as_echo_n "checking for ZIP... " >&6; }
20680          if test ! -x "$tool_specified"; then
20681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20682$as_echo "not found" >&6; }
20683            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20684          fi
20685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20686$as_echo "$tool_specified" >&6; }
20687        fi
20688      fi
20689    fi
20690
20691  fi
20692
20693
20694
20695  if test "x$ZIP" = x; then
20696    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
20697  fi
20698
20699
20700
20701  # Non-required basic tools
20702
20703
20704
20705  # Publish this variable in the help.
20706
20707
20708  if [ -z "${LDD+x}" ]; then
20709    # The variable is not set by user, try to locate tool using the code snippet
20710    for ac_prog in ldd
20711do
20712  # Extract the first word of "$ac_prog", so it can be a program name with args.
20713set dummy $ac_prog; ac_word=$2
20714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20715$as_echo_n "checking for $ac_word... " >&6; }
20716if ${ac_cv_path_LDD+:} false; then :
20717  $as_echo_n "(cached) " >&6
20718else
20719  case $LDD in
20720  [\\/]* | ?:[\\/]*)
20721  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20722  ;;
20723  *)
20724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20725for as_dir in $PATH
20726do
20727  IFS=$as_save_IFS
20728  test -z "$as_dir" && as_dir=.
20729    for ac_exec_ext in '' $ac_executable_extensions; do
20730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20731    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20733    break 2
20734  fi
20735done
20736  done
20737IFS=$as_save_IFS
20738
20739  ;;
20740esac
20741fi
20742LDD=$ac_cv_path_LDD
20743if test -n "$LDD"; then
20744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20745$as_echo "$LDD" >&6; }
20746else
20747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20748$as_echo "no" >&6; }
20749fi
20750
20751
20752  test -n "$LDD" && break
20753done
20754
20755  else
20756    # The variable is set, but is it from the command line or the environment?
20757
20758    # Try to remove the string !LDD! from our list.
20759    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
20760    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20761      # If it failed, the variable was not from the command line. Ignore it,
20762      # but warn the user (except for BASH, which is always set by the calling BASH).
20763      if test "xLDD" != xBASH; then
20764        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
20765$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
20766      fi
20767      # Try to locate tool using the code snippet
20768      for ac_prog in ldd
20769do
20770  # Extract the first word of "$ac_prog", so it can be a program name with args.
20771set dummy $ac_prog; ac_word=$2
20772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20773$as_echo_n "checking for $ac_word... " >&6; }
20774if ${ac_cv_path_LDD+:} false; then :
20775  $as_echo_n "(cached) " >&6
20776else
20777  case $LDD in
20778  [\\/]* | ?:[\\/]*)
20779  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20780  ;;
20781  *)
20782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20783for as_dir in $PATH
20784do
20785  IFS=$as_save_IFS
20786  test -z "$as_dir" && as_dir=.
20787    for ac_exec_ext in '' $ac_executable_extensions; do
20788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20789    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20791    break 2
20792  fi
20793done
20794  done
20795IFS=$as_save_IFS
20796
20797  ;;
20798esac
20799fi
20800LDD=$ac_cv_path_LDD
20801if test -n "$LDD"; then
20802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20803$as_echo "$LDD" >&6; }
20804else
20805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20806$as_echo "no" >&6; }
20807fi
20808
20809
20810  test -n "$LDD" && break
20811done
20812
20813    else
20814      # If it succeeded, then it was overridden by the user. We will use it
20815      # for the tool.
20816
20817      # First remove it from the list of overridden variables, so we can test
20818      # for unknown variables in the end.
20819      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20820
20821      # Check if we try to supply an empty value
20822      if test "x$LDD" = x; then
20823        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
20824$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
20825        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20826$as_echo_n "checking for LDD... " >&6; }
20827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20828$as_echo "disabled" >&6; }
20829      else
20830        # Check if the provided tool contains a complete path.
20831        tool_specified="$LDD"
20832        tool_basename="${tool_specified##*/}"
20833        if test "x$tool_basename" = "x$tool_specified"; then
20834          # A command without a complete path is provided, search $PATH.
20835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
20836$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
20837          # Extract the first word of "$tool_basename", so it can be a program name with args.
20838set dummy $tool_basename; ac_word=$2
20839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20840$as_echo_n "checking for $ac_word... " >&6; }
20841if ${ac_cv_path_LDD+:} false; then :
20842  $as_echo_n "(cached) " >&6
20843else
20844  case $LDD in
20845  [\\/]* | ?:[\\/]*)
20846  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
20847  ;;
20848  *)
20849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20850for as_dir in $PATH
20851do
20852  IFS=$as_save_IFS
20853  test -z "$as_dir" && as_dir=.
20854    for ac_exec_ext in '' $ac_executable_extensions; do
20855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20856    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
20857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20858    break 2
20859  fi
20860done
20861  done
20862IFS=$as_save_IFS
20863
20864  ;;
20865esac
20866fi
20867LDD=$ac_cv_path_LDD
20868if test -n "$LDD"; then
20869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
20870$as_echo "$LDD" >&6; }
20871else
20872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20873$as_echo "no" >&6; }
20874fi
20875
20876
20877          if test "x$LDD" = x; then
20878            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20879          fi
20880        else
20881          # Otherwise we believe it is a complete path. Use it as it is.
20882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
20883$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
20884          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
20885$as_echo_n "checking for LDD... " >&6; }
20886          if test ! -x "$tool_specified"; then
20887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20888$as_echo "not found" >&6; }
20889            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
20890          fi
20891          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20892$as_echo "$tool_specified" >&6; }
20893        fi
20894      fi
20895    fi
20896
20897  fi
20898
20899
20900  if test "x$LDD" = "x"; then
20901    # List shared lib dependencies is used for
20902    # debug output and checking for forbidden dependencies.
20903    # We can build without it.
20904    LDD="true"
20905  fi
20906
20907
20908  # Publish this variable in the help.
20909
20910
20911  if [ -z "${OTOOL+x}" ]; then
20912    # The variable is not set by user, try to locate tool using the code snippet
20913    for ac_prog in otool
20914do
20915  # Extract the first word of "$ac_prog", so it can be a program name with args.
20916set dummy $ac_prog; ac_word=$2
20917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20918$as_echo_n "checking for $ac_word... " >&6; }
20919if ${ac_cv_path_OTOOL+:} false; then :
20920  $as_echo_n "(cached) " >&6
20921else
20922  case $OTOOL in
20923  [\\/]* | ?:[\\/]*)
20924  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20925  ;;
20926  *)
20927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20928for as_dir in $PATH
20929do
20930  IFS=$as_save_IFS
20931  test -z "$as_dir" && as_dir=.
20932    for ac_exec_ext in '' $ac_executable_extensions; do
20933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20934    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20936    break 2
20937  fi
20938done
20939  done
20940IFS=$as_save_IFS
20941
20942  ;;
20943esac
20944fi
20945OTOOL=$ac_cv_path_OTOOL
20946if test -n "$OTOOL"; then
20947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
20948$as_echo "$OTOOL" >&6; }
20949else
20950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20951$as_echo "no" >&6; }
20952fi
20953
20954
20955  test -n "$OTOOL" && break
20956done
20957
20958  else
20959    # The variable is set, but is it from the command line or the environment?
20960
20961    # Try to remove the string !OTOOL! from our list.
20962    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
20963    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20964      # If it failed, the variable was not from the command line. Ignore it,
20965      # but warn the user (except for BASH, which is always set by the calling BASH).
20966      if test "xOTOOL" != xBASH; then
20967        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
20968$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
20969      fi
20970      # Try to locate tool using the code snippet
20971      for ac_prog in otool
20972do
20973  # Extract the first word of "$ac_prog", so it can be a program name with args.
20974set dummy $ac_prog; ac_word=$2
20975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20976$as_echo_n "checking for $ac_word... " >&6; }
20977if ${ac_cv_path_OTOOL+:} false; then :
20978  $as_echo_n "(cached) " >&6
20979else
20980  case $OTOOL in
20981  [\\/]* | ?:[\\/]*)
20982  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
20983  ;;
20984  *)
20985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20986for as_dir in $PATH
20987do
20988  IFS=$as_save_IFS
20989  test -z "$as_dir" && as_dir=.
20990    for ac_exec_ext in '' $ac_executable_extensions; do
20991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20992    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
20993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20994    break 2
20995  fi
20996done
20997  done
20998IFS=$as_save_IFS
20999
21000  ;;
21001esac
21002fi
21003OTOOL=$ac_cv_path_OTOOL
21004if test -n "$OTOOL"; then
21005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21006$as_echo "$OTOOL" >&6; }
21007else
21008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21009$as_echo "no" >&6; }
21010fi
21011
21012
21013  test -n "$OTOOL" && break
21014done
21015
21016    else
21017      # If it succeeded, then it was overridden by the user. We will use it
21018      # for the tool.
21019
21020      # First remove it from the list of overridden variables, so we can test
21021      # for unknown variables in the end.
21022      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21023
21024      # Check if we try to supply an empty value
21025      if test "x$OTOOL" = x; then
21026        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21027$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21029$as_echo_n "checking for OTOOL... " >&6; }
21030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21031$as_echo "disabled" >&6; }
21032      else
21033        # Check if the provided tool contains a complete path.
21034        tool_specified="$OTOOL"
21035        tool_basename="${tool_specified##*/}"
21036        if test "x$tool_basename" = "x$tool_specified"; then
21037          # A command without a complete path is provided, search $PATH.
21038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21039$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21040          # Extract the first word of "$tool_basename", so it can be a program name with args.
21041set dummy $tool_basename; ac_word=$2
21042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21043$as_echo_n "checking for $ac_word... " >&6; }
21044if ${ac_cv_path_OTOOL+:} false; then :
21045  $as_echo_n "(cached) " >&6
21046else
21047  case $OTOOL in
21048  [\\/]* | ?:[\\/]*)
21049  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21050  ;;
21051  *)
21052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21053for as_dir in $PATH
21054do
21055  IFS=$as_save_IFS
21056  test -z "$as_dir" && as_dir=.
21057    for ac_exec_ext in '' $ac_executable_extensions; do
21058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21059    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21061    break 2
21062  fi
21063done
21064  done
21065IFS=$as_save_IFS
21066
21067  ;;
21068esac
21069fi
21070OTOOL=$ac_cv_path_OTOOL
21071if test -n "$OTOOL"; then
21072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21073$as_echo "$OTOOL" >&6; }
21074else
21075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21076$as_echo "no" >&6; }
21077fi
21078
21079
21080          if test "x$OTOOL" = x; then
21081            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21082          fi
21083        else
21084          # Otherwise we believe it is a complete path. Use it as it is.
21085          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21086$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21087          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21088$as_echo_n "checking for OTOOL... " >&6; }
21089          if test ! -x "$tool_specified"; then
21090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21091$as_echo "not found" >&6; }
21092            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21093          fi
21094          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21095$as_echo "$tool_specified" >&6; }
21096        fi
21097      fi
21098    fi
21099
21100  fi
21101
21102
21103  if test "x$OTOOL" = "x"; then
21104    OTOOL="true"
21105  fi
21106
21107
21108  # Publish this variable in the help.
21109
21110
21111  if [ -z "${READELF+x}" ]; then
21112    # The variable is not set by user, try to locate tool using the code snippet
21113    for ac_prog in greadelf readelf
21114do
21115  # Extract the first word of "$ac_prog", so it can be a program name with args.
21116set dummy $ac_prog; ac_word=$2
21117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21118$as_echo_n "checking for $ac_word... " >&6; }
21119if ${ac_cv_path_READELF+:} false; then :
21120  $as_echo_n "(cached) " >&6
21121else
21122  case $READELF in
21123  [\\/]* | ?:[\\/]*)
21124  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21125  ;;
21126  *)
21127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21128for as_dir in $PATH
21129do
21130  IFS=$as_save_IFS
21131  test -z "$as_dir" && as_dir=.
21132    for ac_exec_ext in '' $ac_executable_extensions; do
21133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21134    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21136    break 2
21137  fi
21138done
21139  done
21140IFS=$as_save_IFS
21141
21142  ;;
21143esac
21144fi
21145READELF=$ac_cv_path_READELF
21146if test -n "$READELF"; then
21147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21148$as_echo "$READELF" >&6; }
21149else
21150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21151$as_echo "no" >&6; }
21152fi
21153
21154
21155  test -n "$READELF" && break
21156done
21157
21158  else
21159    # The variable is set, but is it from the command line or the environment?
21160
21161    # Try to remove the string !READELF! from our list.
21162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21164      # If it failed, the variable was not from the command line. Ignore it,
21165      # but warn the user (except for BASH, which is always set by the calling BASH).
21166      if test "xREADELF" != xBASH; then
21167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21168$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21169      fi
21170      # Try to locate tool using the code snippet
21171      for ac_prog in greadelf readelf
21172do
21173  # Extract the first word of "$ac_prog", so it can be a program name with args.
21174set dummy $ac_prog; ac_word=$2
21175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21176$as_echo_n "checking for $ac_word... " >&6; }
21177if ${ac_cv_path_READELF+:} false; then :
21178  $as_echo_n "(cached) " >&6
21179else
21180  case $READELF in
21181  [\\/]* | ?:[\\/]*)
21182  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21183  ;;
21184  *)
21185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21186for as_dir in $PATH
21187do
21188  IFS=$as_save_IFS
21189  test -z "$as_dir" && as_dir=.
21190    for ac_exec_ext in '' $ac_executable_extensions; do
21191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21192    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21194    break 2
21195  fi
21196done
21197  done
21198IFS=$as_save_IFS
21199
21200  ;;
21201esac
21202fi
21203READELF=$ac_cv_path_READELF
21204if test -n "$READELF"; then
21205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21206$as_echo "$READELF" >&6; }
21207else
21208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21209$as_echo "no" >&6; }
21210fi
21211
21212
21213  test -n "$READELF" && break
21214done
21215
21216    else
21217      # If it succeeded, then it was overridden by the user. We will use it
21218      # for the tool.
21219
21220      # First remove it from the list of overridden variables, so we can test
21221      # for unknown variables in the end.
21222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21223
21224      # Check if we try to supply an empty value
21225      if test "x$READELF" = x; then
21226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21227$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21229$as_echo_n "checking for READELF... " >&6; }
21230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21231$as_echo "disabled" >&6; }
21232      else
21233        # Check if the provided tool contains a complete path.
21234        tool_specified="$READELF"
21235        tool_basename="${tool_specified##*/}"
21236        if test "x$tool_basename" = "x$tool_specified"; then
21237          # A command without a complete path is provided, search $PATH.
21238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21239$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21240          # Extract the first word of "$tool_basename", so it can be a program name with args.
21241set dummy $tool_basename; ac_word=$2
21242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21243$as_echo_n "checking for $ac_word... " >&6; }
21244if ${ac_cv_path_READELF+:} false; then :
21245  $as_echo_n "(cached) " >&6
21246else
21247  case $READELF in
21248  [\\/]* | ?:[\\/]*)
21249  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21250  ;;
21251  *)
21252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21253for as_dir in $PATH
21254do
21255  IFS=$as_save_IFS
21256  test -z "$as_dir" && as_dir=.
21257    for ac_exec_ext in '' $ac_executable_extensions; do
21258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21259    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21261    break 2
21262  fi
21263done
21264  done
21265IFS=$as_save_IFS
21266
21267  ;;
21268esac
21269fi
21270READELF=$ac_cv_path_READELF
21271if test -n "$READELF"; then
21272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21273$as_echo "$READELF" >&6; }
21274else
21275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21276$as_echo "no" >&6; }
21277fi
21278
21279
21280          if test "x$READELF" = x; then
21281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21282          fi
21283        else
21284          # Otherwise we believe it is a complete path. Use it as it is.
21285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21286$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21288$as_echo_n "checking for READELF... " >&6; }
21289          if test ! -x "$tool_specified"; then
21290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21291$as_echo "not found" >&6; }
21292            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21293          fi
21294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21295$as_echo "$tool_specified" >&6; }
21296        fi
21297      fi
21298    fi
21299
21300  fi
21301
21302
21303
21304
21305  # Publish this variable in the help.
21306
21307
21308  if [ -z "${HG+x}" ]; then
21309    # The variable is not set by user, try to locate tool using the code snippet
21310    for ac_prog in hg
21311do
21312  # Extract the first word of "$ac_prog", so it can be a program name with args.
21313set dummy $ac_prog; ac_word=$2
21314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21315$as_echo_n "checking for $ac_word... " >&6; }
21316if ${ac_cv_path_HG+:} false; then :
21317  $as_echo_n "(cached) " >&6
21318else
21319  case $HG in
21320  [\\/]* | ?:[\\/]*)
21321  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21322  ;;
21323  *)
21324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21325for as_dir in $PATH
21326do
21327  IFS=$as_save_IFS
21328  test -z "$as_dir" && as_dir=.
21329    for ac_exec_ext in '' $ac_executable_extensions; do
21330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21331    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21333    break 2
21334  fi
21335done
21336  done
21337IFS=$as_save_IFS
21338
21339  ;;
21340esac
21341fi
21342HG=$ac_cv_path_HG
21343if test -n "$HG"; then
21344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21345$as_echo "$HG" >&6; }
21346else
21347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21348$as_echo "no" >&6; }
21349fi
21350
21351
21352  test -n "$HG" && break
21353done
21354
21355  else
21356    # The variable is set, but is it from the command line or the environment?
21357
21358    # Try to remove the string !HG! from our list.
21359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21361      # If it failed, the variable was not from the command line. Ignore it,
21362      # but warn the user (except for BASH, which is always set by the calling BASH).
21363      if test "xHG" != xBASH; then
21364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21365$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21366      fi
21367      # Try to locate tool using the code snippet
21368      for ac_prog in hg
21369do
21370  # Extract the first word of "$ac_prog", so it can be a program name with args.
21371set dummy $ac_prog; ac_word=$2
21372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21373$as_echo_n "checking for $ac_word... " >&6; }
21374if ${ac_cv_path_HG+:} false; then :
21375  $as_echo_n "(cached) " >&6
21376else
21377  case $HG in
21378  [\\/]* | ?:[\\/]*)
21379  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21380  ;;
21381  *)
21382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21383for as_dir in $PATH
21384do
21385  IFS=$as_save_IFS
21386  test -z "$as_dir" && as_dir=.
21387    for ac_exec_ext in '' $ac_executable_extensions; do
21388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21389    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21391    break 2
21392  fi
21393done
21394  done
21395IFS=$as_save_IFS
21396
21397  ;;
21398esac
21399fi
21400HG=$ac_cv_path_HG
21401if test -n "$HG"; then
21402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21403$as_echo "$HG" >&6; }
21404else
21405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21406$as_echo "no" >&6; }
21407fi
21408
21409
21410  test -n "$HG" && break
21411done
21412
21413    else
21414      # If it succeeded, then it was overridden by the user. We will use it
21415      # for the tool.
21416
21417      # First remove it from the list of overridden variables, so we can test
21418      # for unknown variables in the end.
21419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21420
21421      # Check if we try to supply an empty value
21422      if test "x$HG" = x; then
21423        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21424$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21425        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21426$as_echo_n "checking for HG... " >&6; }
21427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21428$as_echo "disabled" >&6; }
21429      else
21430        # Check if the provided tool contains a complete path.
21431        tool_specified="$HG"
21432        tool_basename="${tool_specified##*/}"
21433        if test "x$tool_basename" = "x$tool_specified"; then
21434          # A command without a complete path is provided, search $PATH.
21435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21436$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21437          # Extract the first word of "$tool_basename", so it can be a program name with args.
21438set dummy $tool_basename; ac_word=$2
21439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21440$as_echo_n "checking for $ac_word... " >&6; }
21441if ${ac_cv_path_HG+:} false; then :
21442  $as_echo_n "(cached) " >&6
21443else
21444  case $HG in
21445  [\\/]* | ?:[\\/]*)
21446  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21447  ;;
21448  *)
21449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21450for as_dir in $PATH
21451do
21452  IFS=$as_save_IFS
21453  test -z "$as_dir" && as_dir=.
21454    for ac_exec_ext in '' $ac_executable_extensions; do
21455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21456    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21458    break 2
21459  fi
21460done
21461  done
21462IFS=$as_save_IFS
21463
21464  ;;
21465esac
21466fi
21467HG=$ac_cv_path_HG
21468if test -n "$HG"; then
21469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21470$as_echo "$HG" >&6; }
21471else
21472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21473$as_echo "no" >&6; }
21474fi
21475
21476
21477          if test "x$HG" = x; then
21478            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21479          fi
21480        else
21481          # Otherwise we believe it is a complete path. Use it as it is.
21482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21483$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21484          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21485$as_echo_n "checking for HG... " >&6; }
21486          if test ! -x "$tool_specified"; then
21487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21488$as_echo "not found" >&6; }
21489            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21490          fi
21491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21492$as_echo "$tool_specified" >&6; }
21493        fi
21494      fi
21495    fi
21496
21497  fi
21498
21499
21500
21501
21502  # Publish this variable in the help.
21503
21504
21505  if [ -z "${STAT+x}" ]; then
21506    # The variable is not set by user, try to locate tool using the code snippet
21507    for ac_prog in stat
21508do
21509  # Extract the first word of "$ac_prog", so it can be a program name with args.
21510set dummy $ac_prog; ac_word=$2
21511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21512$as_echo_n "checking for $ac_word... " >&6; }
21513if ${ac_cv_path_STAT+:} false; then :
21514  $as_echo_n "(cached) " >&6
21515else
21516  case $STAT in
21517  [\\/]* | ?:[\\/]*)
21518  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21519  ;;
21520  *)
21521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21522for as_dir in $PATH
21523do
21524  IFS=$as_save_IFS
21525  test -z "$as_dir" && as_dir=.
21526    for ac_exec_ext in '' $ac_executable_extensions; do
21527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21528    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21530    break 2
21531  fi
21532done
21533  done
21534IFS=$as_save_IFS
21535
21536  ;;
21537esac
21538fi
21539STAT=$ac_cv_path_STAT
21540if test -n "$STAT"; then
21541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21542$as_echo "$STAT" >&6; }
21543else
21544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21545$as_echo "no" >&6; }
21546fi
21547
21548
21549  test -n "$STAT" && break
21550done
21551
21552  else
21553    # The variable is set, but is it from the command line or the environment?
21554
21555    # Try to remove the string !STAT! from our list.
21556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21558      # If it failed, the variable was not from the command line. Ignore it,
21559      # but warn the user (except for BASH, which is always set by the calling BASH).
21560      if test "xSTAT" != xBASH; then
21561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21562$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21563      fi
21564      # Try to locate tool using the code snippet
21565      for ac_prog in stat
21566do
21567  # Extract the first word of "$ac_prog", so it can be a program name with args.
21568set dummy $ac_prog; ac_word=$2
21569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21570$as_echo_n "checking for $ac_word... " >&6; }
21571if ${ac_cv_path_STAT+:} false; then :
21572  $as_echo_n "(cached) " >&6
21573else
21574  case $STAT in
21575  [\\/]* | ?:[\\/]*)
21576  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21577  ;;
21578  *)
21579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21580for as_dir in $PATH
21581do
21582  IFS=$as_save_IFS
21583  test -z "$as_dir" && as_dir=.
21584    for ac_exec_ext in '' $ac_executable_extensions; do
21585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21586    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21588    break 2
21589  fi
21590done
21591  done
21592IFS=$as_save_IFS
21593
21594  ;;
21595esac
21596fi
21597STAT=$ac_cv_path_STAT
21598if test -n "$STAT"; then
21599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21600$as_echo "$STAT" >&6; }
21601else
21602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21603$as_echo "no" >&6; }
21604fi
21605
21606
21607  test -n "$STAT" && break
21608done
21609
21610    else
21611      # If it succeeded, then it was overridden by the user. We will use it
21612      # for the tool.
21613
21614      # First remove it from the list of overridden variables, so we can test
21615      # for unknown variables in the end.
21616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21617
21618      # Check if we try to supply an empty value
21619      if test "x$STAT" = x; then
21620        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
21621$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
21622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21623$as_echo_n "checking for STAT... " >&6; }
21624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21625$as_echo "disabled" >&6; }
21626      else
21627        # Check if the provided tool contains a complete path.
21628        tool_specified="$STAT"
21629        tool_basename="${tool_specified##*/}"
21630        if test "x$tool_basename" = "x$tool_specified"; then
21631          # A command without a complete path is provided, search $PATH.
21632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
21633$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
21634          # Extract the first word of "$tool_basename", so it can be a program name with args.
21635set dummy $tool_basename; ac_word=$2
21636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21637$as_echo_n "checking for $ac_word... " >&6; }
21638if ${ac_cv_path_STAT+:} false; then :
21639  $as_echo_n "(cached) " >&6
21640else
21641  case $STAT in
21642  [\\/]* | ?:[\\/]*)
21643  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21644  ;;
21645  *)
21646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21647for as_dir in $PATH
21648do
21649  IFS=$as_save_IFS
21650  test -z "$as_dir" && as_dir=.
21651    for ac_exec_ext in '' $ac_executable_extensions; do
21652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21653    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21655    break 2
21656  fi
21657done
21658  done
21659IFS=$as_save_IFS
21660
21661  ;;
21662esac
21663fi
21664STAT=$ac_cv_path_STAT
21665if test -n "$STAT"; then
21666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21667$as_echo "$STAT" >&6; }
21668else
21669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21670$as_echo "no" >&6; }
21671fi
21672
21673
21674          if test "x$STAT" = x; then
21675            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21676          fi
21677        else
21678          # Otherwise we believe it is a complete path. Use it as it is.
21679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
21680$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
21681          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
21682$as_echo_n "checking for STAT... " >&6; }
21683          if test ! -x "$tool_specified"; then
21684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21685$as_echo "not found" >&6; }
21686            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
21687          fi
21688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21689$as_echo "$tool_specified" >&6; }
21690        fi
21691      fi
21692    fi
21693
21694  fi
21695
21696
21697
21698
21699  # Publish this variable in the help.
21700
21701
21702  if [ -z "${TIME+x}" ]; then
21703    # The variable is not set by user, try to locate tool using the code snippet
21704    for ac_prog in time
21705do
21706  # Extract the first word of "$ac_prog", so it can be a program name with args.
21707set dummy $ac_prog; ac_word=$2
21708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21709$as_echo_n "checking for $ac_word... " >&6; }
21710if ${ac_cv_path_TIME+:} false; then :
21711  $as_echo_n "(cached) " >&6
21712else
21713  case $TIME in
21714  [\\/]* | ?:[\\/]*)
21715  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21716  ;;
21717  *)
21718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21719for as_dir in $PATH
21720do
21721  IFS=$as_save_IFS
21722  test -z "$as_dir" && as_dir=.
21723    for ac_exec_ext in '' $ac_executable_extensions; do
21724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21725    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21727    break 2
21728  fi
21729done
21730  done
21731IFS=$as_save_IFS
21732
21733  ;;
21734esac
21735fi
21736TIME=$ac_cv_path_TIME
21737if test -n "$TIME"; then
21738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21739$as_echo "$TIME" >&6; }
21740else
21741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21742$as_echo "no" >&6; }
21743fi
21744
21745
21746  test -n "$TIME" && break
21747done
21748
21749  else
21750    # The variable is set, but is it from the command line or the environment?
21751
21752    # Try to remove the string !TIME! from our list.
21753    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
21754    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21755      # If it failed, the variable was not from the command line. Ignore it,
21756      # but warn the user (except for BASH, which is always set by the calling BASH).
21757      if test "xTIME" != xBASH; then
21758        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
21759$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
21760      fi
21761      # Try to locate tool using the code snippet
21762      for ac_prog in time
21763do
21764  # Extract the first word of "$ac_prog", so it can be a program name with args.
21765set dummy $ac_prog; ac_word=$2
21766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21767$as_echo_n "checking for $ac_word... " >&6; }
21768if ${ac_cv_path_TIME+:} false; then :
21769  $as_echo_n "(cached) " >&6
21770else
21771  case $TIME in
21772  [\\/]* | ?:[\\/]*)
21773  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21774  ;;
21775  *)
21776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21777for as_dir in $PATH
21778do
21779  IFS=$as_save_IFS
21780  test -z "$as_dir" && as_dir=.
21781    for ac_exec_ext in '' $ac_executable_extensions; do
21782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21783    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21785    break 2
21786  fi
21787done
21788  done
21789IFS=$as_save_IFS
21790
21791  ;;
21792esac
21793fi
21794TIME=$ac_cv_path_TIME
21795if test -n "$TIME"; then
21796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21797$as_echo "$TIME" >&6; }
21798else
21799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21800$as_echo "no" >&6; }
21801fi
21802
21803
21804  test -n "$TIME" && break
21805done
21806
21807    else
21808      # If it succeeded, then it was overridden by the user. We will use it
21809      # for the tool.
21810
21811      # First remove it from the list of overridden variables, so we can test
21812      # for unknown variables in the end.
21813      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21814
21815      # Check if we try to supply an empty value
21816      if test "x$TIME" = x; then
21817        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
21818$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
21819        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21820$as_echo_n "checking for TIME... " >&6; }
21821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21822$as_echo "disabled" >&6; }
21823      else
21824        # Check if the provided tool contains a complete path.
21825        tool_specified="$TIME"
21826        tool_basename="${tool_specified##*/}"
21827        if test "x$tool_basename" = "x$tool_specified"; then
21828          # A command without a complete path is provided, search $PATH.
21829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
21830$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
21831          # Extract the first word of "$tool_basename", so it can be a program name with args.
21832set dummy $tool_basename; ac_word=$2
21833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21834$as_echo_n "checking for $ac_word... " >&6; }
21835if ${ac_cv_path_TIME+:} false; then :
21836  $as_echo_n "(cached) " >&6
21837else
21838  case $TIME in
21839  [\\/]* | ?:[\\/]*)
21840  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
21841  ;;
21842  *)
21843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21844for as_dir in $PATH
21845do
21846  IFS=$as_save_IFS
21847  test -z "$as_dir" && as_dir=.
21848    for ac_exec_ext in '' $ac_executable_extensions; do
21849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21850    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
21851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21852    break 2
21853  fi
21854done
21855  done
21856IFS=$as_save_IFS
21857
21858  ;;
21859esac
21860fi
21861TIME=$ac_cv_path_TIME
21862if test -n "$TIME"; then
21863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
21864$as_echo "$TIME" >&6; }
21865else
21866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21867$as_echo "no" >&6; }
21868fi
21869
21870
21871          if test "x$TIME" = x; then
21872            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21873          fi
21874        else
21875          # Otherwise we believe it is a complete path. Use it as it is.
21876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
21877$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
21878          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
21879$as_echo_n "checking for TIME... " >&6; }
21880          if test ! -x "$tool_specified"; then
21881            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21882$as_echo "not found" >&6; }
21883            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
21884          fi
21885          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21886$as_echo "$tool_specified" >&6; }
21887        fi
21888      fi
21889    fi
21890
21891  fi
21892
21893
21894
21895
21896  # Publish this variable in the help.
21897
21898
21899  if [ -z "${PATCH+x}" ]; then
21900    # The variable is not set by user, try to locate tool using the code snippet
21901    for ac_prog in gpatch patch
21902do
21903  # Extract the first word of "$ac_prog", so it can be a program name with args.
21904set dummy $ac_prog; ac_word=$2
21905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21906$as_echo_n "checking for $ac_word... " >&6; }
21907if ${ac_cv_path_PATCH+:} false; then :
21908  $as_echo_n "(cached) " >&6
21909else
21910  case $PATCH in
21911  [\\/]* | ?:[\\/]*)
21912  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21913  ;;
21914  *)
21915  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21916for as_dir in $PATH
21917do
21918  IFS=$as_save_IFS
21919  test -z "$as_dir" && as_dir=.
21920    for ac_exec_ext in '' $ac_executable_extensions; do
21921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21922    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21924    break 2
21925  fi
21926done
21927  done
21928IFS=$as_save_IFS
21929
21930  ;;
21931esac
21932fi
21933PATCH=$ac_cv_path_PATCH
21934if test -n "$PATCH"; then
21935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21936$as_echo "$PATCH" >&6; }
21937else
21938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21939$as_echo "no" >&6; }
21940fi
21941
21942
21943  test -n "$PATCH" && break
21944done
21945
21946  else
21947    # The variable is set, but is it from the command line or the environment?
21948
21949    # Try to remove the string !PATCH! from our list.
21950    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
21951    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21952      # If it failed, the variable was not from the command line. Ignore it,
21953      # but warn the user (except for BASH, which is always set by the calling BASH).
21954      if test "xPATCH" != xBASH; then
21955        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
21956$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
21957      fi
21958      # Try to locate tool using the code snippet
21959      for ac_prog in gpatch patch
21960do
21961  # Extract the first word of "$ac_prog", so it can be a program name with args.
21962set dummy $ac_prog; ac_word=$2
21963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21964$as_echo_n "checking for $ac_word... " >&6; }
21965if ${ac_cv_path_PATCH+:} false; then :
21966  $as_echo_n "(cached) " >&6
21967else
21968  case $PATCH in
21969  [\\/]* | ?:[\\/]*)
21970  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
21971  ;;
21972  *)
21973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21974for as_dir in $PATH
21975do
21976  IFS=$as_save_IFS
21977  test -z "$as_dir" && as_dir=.
21978    for ac_exec_ext in '' $ac_executable_extensions; do
21979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21980    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
21981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21982    break 2
21983  fi
21984done
21985  done
21986IFS=$as_save_IFS
21987
21988  ;;
21989esac
21990fi
21991PATCH=$ac_cv_path_PATCH
21992if test -n "$PATCH"; then
21993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
21994$as_echo "$PATCH" >&6; }
21995else
21996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21997$as_echo "no" >&6; }
21998fi
21999
22000
22001  test -n "$PATCH" && break
22002done
22003
22004    else
22005      # If it succeeded, then it was overridden by the user. We will use it
22006      # for the tool.
22007
22008      # First remove it from the list of overridden variables, so we can test
22009      # for unknown variables in the end.
22010      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22011
22012      # Check if we try to supply an empty value
22013      if test "x$PATCH" = x; then
22014        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22015$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22017$as_echo_n "checking for PATCH... " >&6; }
22018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22019$as_echo "disabled" >&6; }
22020      else
22021        # Check if the provided tool contains a complete path.
22022        tool_specified="$PATCH"
22023        tool_basename="${tool_specified##*/}"
22024        if test "x$tool_basename" = "x$tool_specified"; then
22025          # A command without a complete path is provided, search $PATH.
22026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22027$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22028          # Extract the first word of "$tool_basename", so it can be a program name with args.
22029set dummy $tool_basename; ac_word=$2
22030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22031$as_echo_n "checking for $ac_word... " >&6; }
22032if ${ac_cv_path_PATCH+:} false; then :
22033  $as_echo_n "(cached) " >&6
22034else
22035  case $PATCH in
22036  [\\/]* | ?:[\\/]*)
22037  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22038  ;;
22039  *)
22040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22041for as_dir in $PATH
22042do
22043  IFS=$as_save_IFS
22044  test -z "$as_dir" && as_dir=.
22045    for ac_exec_ext in '' $ac_executable_extensions; do
22046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22047    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22049    break 2
22050  fi
22051done
22052  done
22053IFS=$as_save_IFS
22054
22055  ;;
22056esac
22057fi
22058PATCH=$ac_cv_path_PATCH
22059if test -n "$PATCH"; then
22060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22061$as_echo "$PATCH" >&6; }
22062else
22063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22064$as_echo "no" >&6; }
22065fi
22066
22067
22068          if test "x$PATCH" = x; then
22069            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22070          fi
22071        else
22072          # Otherwise we believe it is a complete path. Use it as it is.
22073          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22074$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22075          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22076$as_echo_n "checking for PATCH... " >&6; }
22077          if test ! -x "$tool_specified"; then
22078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22079$as_echo "not found" >&6; }
22080            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22081          fi
22082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22083$as_echo "$tool_specified" >&6; }
22084        fi
22085      fi
22086    fi
22087
22088  fi
22089
22090
22091  # Check if it's GNU time
22092  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22093  if test "x$IS_GNU_TIME" != x; then
22094    IS_GNU_TIME=yes
22095  else
22096    IS_GNU_TIME=no
22097  fi
22098
22099
22100  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22101
22102
22103
22104  # Publish this variable in the help.
22105
22106
22107  if [ -z "${DSYMUTIL+x}" ]; then
22108    # The variable is not set by user, try to locate tool using the code snippet
22109    for ac_prog in dsymutil
22110do
22111  # Extract the first word of "$ac_prog", so it can be a program name with args.
22112set dummy $ac_prog; ac_word=$2
22113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22114$as_echo_n "checking for $ac_word... " >&6; }
22115if ${ac_cv_path_DSYMUTIL+:} false; then :
22116  $as_echo_n "(cached) " >&6
22117else
22118  case $DSYMUTIL in
22119  [\\/]* | ?:[\\/]*)
22120  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22121  ;;
22122  *)
22123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22124for as_dir in $PATH
22125do
22126  IFS=$as_save_IFS
22127  test -z "$as_dir" && as_dir=.
22128    for ac_exec_ext in '' $ac_executable_extensions; do
22129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22130    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22132    break 2
22133  fi
22134done
22135  done
22136IFS=$as_save_IFS
22137
22138  ;;
22139esac
22140fi
22141DSYMUTIL=$ac_cv_path_DSYMUTIL
22142if test -n "$DSYMUTIL"; then
22143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22144$as_echo "$DSYMUTIL" >&6; }
22145else
22146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22147$as_echo "no" >&6; }
22148fi
22149
22150
22151  test -n "$DSYMUTIL" && break
22152done
22153
22154  else
22155    # The variable is set, but is it from the command line or the environment?
22156
22157    # Try to remove the string !DSYMUTIL! from our list.
22158    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22159    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22160      # If it failed, the variable was not from the command line. Ignore it,
22161      # but warn the user (except for BASH, which is always set by the calling BASH).
22162      if test "xDSYMUTIL" != xBASH; then
22163        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22164$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22165      fi
22166      # Try to locate tool using the code snippet
22167      for ac_prog in dsymutil
22168do
22169  # Extract the first word of "$ac_prog", so it can be a program name with args.
22170set dummy $ac_prog; ac_word=$2
22171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22172$as_echo_n "checking for $ac_word... " >&6; }
22173if ${ac_cv_path_DSYMUTIL+:} false; then :
22174  $as_echo_n "(cached) " >&6
22175else
22176  case $DSYMUTIL in
22177  [\\/]* | ?:[\\/]*)
22178  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22179  ;;
22180  *)
22181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22182for as_dir in $PATH
22183do
22184  IFS=$as_save_IFS
22185  test -z "$as_dir" && as_dir=.
22186    for ac_exec_ext in '' $ac_executable_extensions; do
22187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22188    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22190    break 2
22191  fi
22192done
22193  done
22194IFS=$as_save_IFS
22195
22196  ;;
22197esac
22198fi
22199DSYMUTIL=$ac_cv_path_DSYMUTIL
22200if test -n "$DSYMUTIL"; then
22201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22202$as_echo "$DSYMUTIL" >&6; }
22203else
22204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22205$as_echo "no" >&6; }
22206fi
22207
22208
22209  test -n "$DSYMUTIL" && break
22210done
22211
22212    else
22213      # If it succeeded, then it was overridden by the user. We will use it
22214      # for the tool.
22215
22216      # First remove it from the list of overridden variables, so we can test
22217      # for unknown variables in the end.
22218      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22219
22220      # Check if we try to supply an empty value
22221      if test "x$DSYMUTIL" = x; then
22222        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22223$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22224        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22225$as_echo_n "checking for DSYMUTIL... " >&6; }
22226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22227$as_echo "disabled" >&6; }
22228      else
22229        # Check if the provided tool contains a complete path.
22230        tool_specified="$DSYMUTIL"
22231        tool_basename="${tool_specified##*/}"
22232        if test "x$tool_basename" = "x$tool_specified"; then
22233          # A command without a complete path is provided, search $PATH.
22234          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22235$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22236          # Extract the first word of "$tool_basename", so it can be a program name with args.
22237set dummy $tool_basename; ac_word=$2
22238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22239$as_echo_n "checking for $ac_word... " >&6; }
22240if ${ac_cv_path_DSYMUTIL+:} false; then :
22241  $as_echo_n "(cached) " >&6
22242else
22243  case $DSYMUTIL in
22244  [\\/]* | ?:[\\/]*)
22245  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22246  ;;
22247  *)
22248  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22249for as_dir in $PATH
22250do
22251  IFS=$as_save_IFS
22252  test -z "$as_dir" && as_dir=.
22253    for ac_exec_ext in '' $ac_executable_extensions; do
22254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22255    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22257    break 2
22258  fi
22259done
22260  done
22261IFS=$as_save_IFS
22262
22263  ;;
22264esac
22265fi
22266DSYMUTIL=$ac_cv_path_DSYMUTIL
22267if test -n "$DSYMUTIL"; then
22268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22269$as_echo "$DSYMUTIL" >&6; }
22270else
22271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22272$as_echo "no" >&6; }
22273fi
22274
22275
22276          if test "x$DSYMUTIL" = x; then
22277            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22278          fi
22279        else
22280          # Otherwise we believe it is a complete path. Use it as it is.
22281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22282$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22283          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22284$as_echo_n "checking for DSYMUTIL... " >&6; }
22285          if test ! -x "$tool_specified"; then
22286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22287$as_echo "not found" >&6; }
22288            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22289          fi
22290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22291$as_echo "$tool_specified" >&6; }
22292        fi
22293      fi
22294    fi
22295
22296  fi
22297
22298
22299
22300  if test "x$DSYMUTIL" = x; then
22301    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22302  fi
22303
22304
22305
22306
22307
22308  # Publish this variable in the help.
22309
22310
22311  if [ -z "${XATTR+x}" ]; then
22312    # The variable is not set by user, try to locate tool using the code snippet
22313    for ac_prog in xattr
22314do
22315  # Extract the first word of "$ac_prog", so it can be a program name with args.
22316set dummy $ac_prog; ac_word=$2
22317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22318$as_echo_n "checking for $ac_word... " >&6; }
22319if ${ac_cv_path_XATTR+:} false; then :
22320  $as_echo_n "(cached) " >&6
22321else
22322  case $XATTR in
22323  [\\/]* | ?:[\\/]*)
22324  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22325  ;;
22326  *)
22327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22328for as_dir in $PATH
22329do
22330  IFS=$as_save_IFS
22331  test -z "$as_dir" && as_dir=.
22332    for ac_exec_ext in '' $ac_executable_extensions; do
22333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22334    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22336    break 2
22337  fi
22338done
22339  done
22340IFS=$as_save_IFS
22341
22342  ;;
22343esac
22344fi
22345XATTR=$ac_cv_path_XATTR
22346if test -n "$XATTR"; then
22347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22348$as_echo "$XATTR" >&6; }
22349else
22350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22351$as_echo "no" >&6; }
22352fi
22353
22354
22355  test -n "$XATTR" && break
22356done
22357
22358  else
22359    # The variable is set, but is it from the command line or the environment?
22360
22361    # Try to remove the string !XATTR! from our list.
22362    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22363    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22364      # If it failed, the variable was not from the command line. Ignore it,
22365      # but warn the user (except for BASH, which is always set by the calling BASH).
22366      if test "xXATTR" != xBASH; then
22367        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22368$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22369      fi
22370      # Try to locate tool using the code snippet
22371      for ac_prog in xattr
22372do
22373  # Extract the first word of "$ac_prog", so it can be a program name with args.
22374set dummy $ac_prog; ac_word=$2
22375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22376$as_echo_n "checking for $ac_word... " >&6; }
22377if ${ac_cv_path_XATTR+:} false; then :
22378  $as_echo_n "(cached) " >&6
22379else
22380  case $XATTR in
22381  [\\/]* | ?:[\\/]*)
22382  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22383  ;;
22384  *)
22385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22386for as_dir in $PATH
22387do
22388  IFS=$as_save_IFS
22389  test -z "$as_dir" && as_dir=.
22390    for ac_exec_ext in '' $ac_executable_extensions; do
22391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22392    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22394    break 2
22395  fi
22396done
22397  done
22398IFS=$as_save_IFS
22399
22400  ;;
22401esac
22402fi
22403XATTR=$ac_cv_path_XATTR
22404if test -n "$XATTR"; then
22405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22406$as_echo "$XATTR" >&6; }
22407else
22408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22409$as_echo "no" >&6; }
22410fi
22411
22412
22413  test -n "$XATTR" && break
22414done
22415
22416    else
22417      # If it succeeded, then it was overridden by the user. We will use it
22418      # for the tool.
22419
22420      # First remove it from the list of overridden variables, so we can test
22421      # for unknown variables in the end.
22422      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22423
22424      # Check if we try to supply an empty value
22425      if test "x$XATTR" = x; then
22426        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
22427$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
22428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22429$as_echo_n "checking for XATTR... " >&6; }
22430        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22431$as_echo "disabled" >&6; }
22432      else
22433        # Check if the provided tool contains a complete path.
22434        tool_specified="$XATTR"
22435        tool_basename="${tool_specified##*/}"
22436        if test "x$tool_basename" = "x$tool_specified"; then
22437          # A command without a complete path is provided, search $PATH.
22438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
22439$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
22440          # Extract the first word of "$tool_basename", so it can be a program name with args.
22441set dummy $tool_basename; ac_word=$2
22442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22443$as_echo_n "checking for $ac_word... " >&6; }
22444if ${ac_cv_path_XATTR+:} false; then :
22445  $as_echo_n "(cached) " >&6
22446else
22447  case $XATTR in
22448  [\\/]* | ?:[\\/]*)
22449  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22450  ;;
22451  *)
22452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22453for as_dir in $PATH
22454do
22455  IFS=$as_save_IFS
22456  test -z "$as_dir" && as_dir=.
22457    for ac_exec_ext in '' $ac_executable_extensions; do
22458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22459    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22461    break 2
22462  fi
22463done
22464  done
22465IFS=$as_save_IFS
22466
22467  ;;
22468esac
22469fi
22470XATTR=$ac_cv_path_XATTR
22471if test -n "$XATTR"; then
22472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22473$as_echo "$XATTR" >&6; }
22474else
22475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22476$as_echo "no" >&6; }
22477fi
22478
22479
22480          if test "x$XATTR" = x; then
22481            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22482          fi
22483        else
22484          # Otherwise we believe it is a complete path. Use it as it is.
22485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
22486$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
22487          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
22488$as_echo_n "checking for XATTR... " >&6; }
22489          if test ! -x "$tool_specified"; then
22490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22491$as_echo "not found" >&6; }
22492            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
22493          fi
22494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22495$as_echo "$tool_specified" >&6; }
22496        fi
22497      fi
22498    fi
22499
22500  fi
22501
22502
22503
22504  if test "x$XATTR" = x; then
22505    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
22506  fi
22507
22508
22509
22510
22511  # Publish this variable in the help.
22512
22513
22514  if [ -z "${CODESIGN+x}" ]; then
22515    # The variable is not set by user, try to locate tool using the code snippet
22516    for ac_prog in codesign
22517do
22518  # Extract the first word of "$ac_prog", so it can be a program name with args.
22519set dummy $ac_prog; ac_word=$2
22520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22521$as_echo_n "checking for $ac_word... " >&6; }
22522if ${ac_cv_path_CODESIGN+:} false; then :
22523  $as_echo_n "(cached) " >&6
22524else
22525  case $CODESIGN in
22526  [\\/]* | ?:[\\/]*)
22527  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22528  ;;
22529  *)
22530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22531for as_dir in $PATH
22532do
22533  IFS=$as_save_IFS
22534  test -z "$as_dir" && as_dir=.
22535    for ac_exec_ext in '' $ac_executable_extensions; do
22536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22537    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22539    break 2
22540  fi
22541done
22542  done
22543IFS=$as_save_IFS
22544
22545  ;;
22546esac
22547fi
22548CODESIGN=$ac_cv_path_CODESIGN
22549if test -n "$CODESIGN"; then
22550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22551$as_echo "$CODESIGN" >&6; }
22552else
22553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22554$as_echo "no" >&6; }
22555fi
22556
22557
22558  test -n "$CODESIGN" && break
22559done
22560
22561  else
22562    # The variable is set, but is it from the command line or the environment?
22563
22564    # Try to remove the string !CODESIGN! from our list.
22565    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
22566    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22567      # If it failed, the variable was not from the command line. Ignore it,
22568      # but warn the user (except for BASH, which is always set by the calling BASH).
22569      if test "xCODESIGN" != xBASH; then
22570        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
22571$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
22572      fi
22573      # Try to locate tool using the code snippet
22574      for ac_prog in codesign
22575do
22576  # Extract the first word of "$ac_prog", so it can be a program name with args.
22577set dummy $ac_prog; ac_word=$2
22578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22579$as_echo_n "checking for $ac_word... " >&6; }
22580if ${ac_cv_path_CODESIGN+:} false; then :
22581  $as_echo_n "(cached) " >&6
22582else
22583  case $CODESIGN in
22584  [\\/]* | ?:[\\/]*)
22585  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22586  ;;
22587  *)
22588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22589for as_dir in $PATH
22590do
22591  IFS=$as_save_IFS
22592  test -z "$as_dir" && as_dir=.
22593    for ac_exec_ext in '' $ac_executable_extensions; do
22594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22595    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22597    break 2
22598  fi
22599done
22600  done
22601IFS=$as_save_IFS
22602
22603  ;;
22604esac
22605fi
22606CODESIGN=$ac_cv_path_CODESIGN
22607if test -n "$CODESIGN"; then
22608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22609$as_echo "$CODESIGN" >&6; }
22610else
22611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22612$as_echo "no" >&6; }
22613fi
22614
22615
22616  test -n "$CODESIGN" && break
22617done
22618
22619    else
22620      # If it succeeded, then it was overridden by the user. We will use it
22621      # for the tool.
22622
22623      # First remove it from the list of overridden variables, so we can test
22624      # for unknown variables in the end.
22625      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22626
22627      # Check if we try to supply an empty value
22628      if test "x$CODESIGN" = x; then
22629        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
22630$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
22631        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22632$as_echo_n "checking for CODESIGN... " >&6; }
22633        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22634$as_echo "disabled" >&6; }
22635      else
22636        # Check if the provided tool contains a complete path.
22637        tool_specified="$CODESIGN"
22638        tool_basename="${tool_specified##*/}"
22639        if test "x$tool_basename" = "x$tool_specified"; then
22640          # A command without a complete path is provided, search $PATH.
22641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
22642$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
22643          # Extract the first word of "$tool_basename", so it can be a program name with args.
22644set dummy $tool_basename; ac_word=$2
22645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22646$as_echo_n "checking for $ac_word... " >&6; }
22647if ${ac_cv_path_CODESIGN+:} false; then :
22648  $as_echo_n "(cached) " >&6
22649else
22650  case $CODESIGN in
22651  [\\/]* | ?:[\\/]*)
22652  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
22653  ;;
22654  *)
22655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22656for as_dir in $PATH
22657do
22658  IFS=$as_save_IFS
22659  test -z "$as_dir" && as_dir=.
22660    for ac_exec_ext in '' $ac_executable_extensions; do
22661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22662    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
22663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22664    break 2
22665  fi
22666done
22667  done
22668IFS=$as_save_IFS
22669
22670  ;;
22671esac
22672fi
22673CODESIGN=$ac_cv_path_CODESIGN
22674if test -n "$CODESIGN"; then
22675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
22676$as_echo "$CODESIGN" >&6; }
22677else
22678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22679$as_echo "no" >&6; }
22680fi
22681
22682
22683          if test "x$CODESIGN" = x; then
22684            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22685          fi
22686        else
22687          # Otherwise we believe it is a complete path. Use it as it is.
22688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
22689$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
22690          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
22691$as_echo_n "checking for CODESIGN... " >&6; }
22692          if test ! -x "$tool_specified"; then
22693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22694$as_echo "not found" >&6; }
22695            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
22696          fi
22697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22698$as_echo "$tool_specified" >&6; }
22699        fi
22700      fi
22701    fi
22702
22703  fi
22704
22705
22706    if test "x$CODESIGN" != "x"; then
22707      # Verify that the openjdk_codesign certificate is present
22708      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
22709$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
22710      rm -f codesign-testfile
22711      touch codesign-testfile
22712      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
22713      rm -f codesign-testfile
22714      if test "x$CODESIGN" = x; then
22715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22716$as_echo "no" >&6; }
22717      else
22718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22719$as_echo "yes" >&6; }
22720      fi
22721    fi
22722
22723
22724
22725  # Publish this variable in the help.
22726
22727
22728  if [ -z "${SETFILE+x}" ]; then
22729    # The variable is not set by user, try to locate tool using the code snippet
22730    for ac_prog in SetFile
22731do
22732  # Extract the first word of "$ac_prog", so it can be a program name with args.
22733set dummy $ac_prog; ac_word=$2
22734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22735$as_echo_n "checking for $ac_word... " >&6; }
22736if ${ac_cv_path_SETFILE+:} false; then :
22737  $as_echo_n "(cached) " >&6
22738else
22739  case $SETFILE in
22740  [\\/]* | ?:[\\/]*)
22741  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22742  ;;
22743  *)
22744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22745for as_dir in $PATH
22746do
22747  IFS=$as_save_IFS
22748  test -z "$as_dir" && as_dir=.
22749    for ac_exec_ext in '' $ac_executable_extensions; do
22750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22751    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22753    break 2
22754  fi
22755done
22756  done
22757IFS=$as_save_IFS
22758
22759  ;;
22760esac
22761fi
22762SETFILE=$ac_cv_path_SETFILE
22763if test -n "$SETFILE"; then
22764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22765$as_echo "$SETFILE" >&6; }
22766else
22767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22768$as_echo "no" >&6; }
22769fi
22770
22771
22772  test -n "$SETFILE" && break
22773done
22774
22775  else
22776    # The variable is set, but is it from the command line or the environment?
22777
22778    # Try to remove the string !SETFILE! from our list.
22779    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
22780    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22781      # If it failed, the variable was not from the command line. Ignore it,
22782      # but warn the user (except for BASH, which is always set by the calling BASH).
22783      if test "xSETFILE" != xBASH; then
22784        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
22785$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
22786      fi
22787      # Try to locate tool using the code snippet
22788      for ac_prog in SetFile
22789do
22790  # Extract the first word of "$ac_prog", so it can be a program name with args.
22791set dummy $ac_prog; ac_word=$2
22792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22793$as_echo_n "checking for $ac_word... " >&6; }
22794if ${ac_cv_path_SETFILE+:} false; then :
22795  $as_echo_n "(cached) " >&6
22796else
22797  case $SETFILE in
22798  [\\/]* | ?:[\\/]*)
22799  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22800  ;;
22801  *)
22802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22803for as_dir in $PATH
22804do
22805  IFS=$as_save_IFS
22806  test -z "$as_dir" && as_dir=.
22807    for ac_exec_ext in '' $ac_executable_extensions; do
22808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22809    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22811    break 2
22812  fi
22813done
22814  done
22815IFS=$as_save_IFS
22816
22817  ;;
22818esac
22819fi
22820SETFILE=$ac_cv_path_SETFILE
22821if test -n "$SETFILE"; then
22822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22823$as_echo "$SETFILE" >&6; }
22824else
22825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22826$as_echo "no" >&6; }
22827fi
22828
22829
22830  test -n "$SETFILE" && break
22831done
22832
22833    else
22834      # If it succeeded, then it was overridden by the user. We will use it
22835      # for the tool.
22836
22837      # First remove it from the list of overridden variables, so we can test
22838      # for unknown variables in the end.
22839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22840
22841      # Check if we try to supply an empty value
22842      if test "x$SETFILE" = x; then
22843        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
22844$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
22845        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22846$as_echo_n "checking for SETFILE... " >&6; }
22847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22848$as_echo "disabled" >&6; }
22849      else
22850        # Check if the provided tool contains a complete path.
22851        tool_specified="$SETFILE"
22852        tool_basename="${tool_specified##*/}"
22853        if test "x$tool_basename" = "x$tool_specified"; then
22854          # A command without a complete path is provided, search $PATH.
22855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
22856$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
22857          # Extract the first word of "$tool_basename", so it can be a program name with args.
22858set dummy $tool_basename; ac_word=$2
22859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22860$as_echo_n "checking for $ac_word... " >&6; }
22861if ${ac_cv_path_SETFILE+:} false; then :
22862  $as_echo_n "(cached) " >&6
22863else
22864  case $SETFILE in
22865  [\\/]* | ?:[\\/]*)
22866  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
22867  ;;
22868  *)
22869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22870for as_dir in $PATH
22871do
22872  IFS=$as_save_IFS
22873  test -z "$as_dir" && as_dir=.
22874    for ac_exec_ext in '' $ac_executable_extensions; do
22875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22876    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
22877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22878    break 2
22879  fi
22880done
22881  done
22882IFS=$as_save_IFS
22883
22884  ;;
22885esac
22886fi
22887SETFILE=$ac_cv_path_SETFILE
22888if test -n "$SETFILE"; then
22889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
22890$as_echo "$SETFILE" >&6; }
22891else
22892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22893$as_echo "no" >&6; }
22894fi
22895
22896
22897          if test "x$SETFILE" = x; then
22898            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22899          fi
22900        else
22901          # Otherwise we believe it is a complete path. Use it as it is.
22902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
22903$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
22904          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
22905$as_echo_n "checking for SETFILE... " >&6; }
22906          if test ! -x "$tool_specified"; then
22907            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22908$as_echo "not found" >&6; }
22909            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
22910          fi
22911          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22912$as_echo "$tool_specified" >&6; }
22913        fi
22914      fi
22915    fi
22916
22917  fi
22918
22919
22920
22921  if test "x$SETFILE" = x; then
22922    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
22923  fi
22924
22925
22926  fi
22927
22928
22929  # Test if bash supports pipefail.
22930  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
22931$as_echo_n "checking if bash supports pipefail... " >&6; }
22932  if ${BASH} -c 'set -o pipefail'; then
22933    BASH_ARGS="$BASH_ARGS -o pipefail"
22934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22935$as_echo "yes" >&6; }
22936  else
22937    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22938$as_echo "no" >&6; }
22939  fi
22940
22941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
22942$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
22943  if ${BASH} -e -c 'true'; then
22944    BASH_ARGS="$BASH_ARGS -e"
22945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22946$as_echo "yes" >&6; }
22947  else
22948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22949$as_echo "no" >&6; }
22950  fi
22951
22952
22953
22954
22955# Check if pkg-config is available.
22956
22957
22958if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
22959	if test -n "$ac_tool_prefix"; then
22960  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
22961set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
22962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22963$as_echo_n "checking for $ac_word... " >&6; }
22964if ${ac_cv_path_PKG_CONFIG+:} false; then :
22965  $as_echo_n "(cached) " >&6
22966else
22967  case $PKG_CONFIG in
22968  [\\/]* | ?:[\\/]*)
22969  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
22970  ;;
22971  *)
22972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22973for as_dir in $PATH
22974do
22975  IFS=$as_save_IFS
22976  test -z "$as_dir" && as_dir=.
22977    for ac_exec_ext in '' $ac_executable_extensions; do
22978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22979    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22981    break 2
22982  fi
22983done
22984  done
22985IFS=$as_save_IFS
22986
22987  ;;
22988esac
22989fi
22990PKG_CONFIG=$ac_cv_path_PKG_CONFIG
22991if test -n "$PKG_CONFIG"; then
22992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
22993$as_echo "$PKG_CONFIG" >&6; }
22994else
22995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22996$as_echo "no" >&6; }
22997fi
22998
22999
23000fi
23001if test -z "$ac_cv_path_PKG_CONFIG"; then
23002  ac_pt_PKG_CONFIG=$PKG_CONFIG
23003  # Extract the first word of "pkg-config", so it can be a program name with args.
23004set dummy pkg-config; ac_word=$2
23005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23006$as_echo_n "checking for $ac_word... " >&6; }
23007if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23008  $as_echo_n "(cached) " >&6
23009else
23010  case $ac_pt_PKG_CONFIG in
23011  [\\/]* | ?:[\\/]*)
23012  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23013  ;;
23014  *)
23015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23016for as_dir in $PATH
23017do
23018  IFS=$as_save_IFS
23019  test -z "$as_dir" && as_dir=.
23020    for ac_exec_ext in '' $ac_executable_extensions; do
23021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23022    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23024    break 2
23025  fi
23026done
23027  done
23028IFS=$as_save_IFS
23029
23030  ;;
23031esac
23032fi
23033ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23034if test -n "$ac_pt_PKG_CONFIG"; then
23035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23036$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23037else
23038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23039$as_echo "no" >&6; }
23040fi
23041
23042  if test "x$ac_pt_PKG_CONFIG" = x; then
23043    PKG_CONFIG=""
23044  else
23045    case $cross_compiling:$ac_tool_warned in
23046yes:)
23047{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23048$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23049ac_tool_warned=yes ;;
23050esac
23051    PKG_CONFIG=$ac_pt_PKG_CONFIG
23052  fi
23053else
23054  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23055fi
23056
23057fi
23058if test -n "$PKG_CONFIG"; then
23059	_pkg_min_version=0.9.0
23060	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23061$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23062	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23063		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23064$as_echo "yes" >&6; }
23065	else
23066		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23067$as_echo "no" >&6; }
23068		PKG_CONFIG=""
23069	fi
23070
23071fi
23072
23073# After basic tools have been setup, we can check build os specific details.
23074
23075  ###############################################################################
23076
23077  # Note that this is the build platform OS version!
23078
23079  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23080  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23081  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23082  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23083
23084
23085
23086
23087
23088# Misc basic settings
23089
23090
23091# Check whether --with-default-make-target was given.
23092if test "${with_default_make_target+set}" = set; then :
23093  withval=$with_default_make_target;
23094fi
23095
23096  if test "x$with_default_make_target" = "x" \
23097      || test "x$with_default_make_target" = "xyes"; then
23098    DEFAULT_MAKE_TARGET="exploded-image"
23099  elif test "x$with_default_make_target" = "xno"; then
23100    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23101  else
23102    DEFAULT_MAKE_TARGET="$with_default_make_target"
23103  fi
23104
23105
23106
23107
23108###############################################################################
23109#
23110# Determine OpenJDK variants, options and version numbers.
23111#
23112###############################################################################
23113
23114# We need build & target for this.
23115
23116
23117  ###############################################################################
23118  #
23119  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23120  # We always build headless support.
23121  #
23122  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23123$as_echo_n "checking headful support... " >&6; }
23124  # Check whether --enable-headful was given.
23125if test "${enable_headful+set}" = set; then :
23126  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23127else
23128  SUPPORT_HEADFUL=yes
23129fi
23130
23131
23132  SUPPORT_HEADLESS=yes
23133  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23134
23135  if test "x$SUPPORT_HEADFUL" = xyes; then
23136    # We are building both headful and headless.
23137    headful_msg="include support for both headful and headless"
23138  fi
23139
23140  if test "x$SUPPORT_HEADFUL" = xno; then
23141    # Thus we are building headless only.
23142    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23143    headful_msg="headless only"
23144  fi
23145
23146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23147$as_echo "$headful_msg" >&6; }
23148
23149
23150
23151
23152
23153  # Control wether Hotspot runs Queens test after build.
23154  # Check whether --enable-hotspot-test-in-build was given.
23155if test "${enable_hotspot_test_in_build+set}" = set; then :
23156  enableval=$enable_hotspot_test_in_build;
23157else
23158  enable_hotspot_test_in_build=no
23159fi
23160
23161  if test "x$enable_hotspot_test_in_build" = "xyes"; then
23162    TEST_IN_BUILD=true
23163  else
23164    TEST_IN_BUILD=false
23165  fi
23166
23167
23168  ###############################################################################
23169  #
23170  # Choose cacerts source file
23171  #
23172
23173# Check whether --with-cacerts-file was given.
23174if test "${with_cacerts_file+set}" = set; then :
23175  withval=$with_cacerts_file;
23176fi
23177
23178  if test "x$with_cacerts_file" != x; then
23179    CACERTS_FILE=$with_cacerts_file
23180  fi
23181
23182
23183  ###############################################################################
23184  #
23185  # Enable or disable unlimited crypto
23186  #
23187  # Check whether --enable-unlimited-crypto was given.
23188if test "${enable_unlimited_crypto+set}" = set; then :
23189  enableval=$enable_unlimited_crypto;
23190else
23191  enable_unlimited_crypto=no
23192fi
23193
23194  if test "x$enable_unlimited_crypto" = "xyes"; then
23195    UNLIMITED_CRYPTO=true
23196  else
23197    UNLIMITED_CRYPTO=false
23198  fi
23199
23200
23201  ###############################################################################
23202  #
23203  # Compress jars
23204  #
23205  COMPRESS_JARS=false
23206
23207
23208
23209  # Setup default copyright year. Mostly overridden when building close to a new year.
23210
23211# Check whether --with-copyright-year was given.
23212if test "${with_copyright_year+set}" = set; then :
23213  withval=$with_copyright_year;
23214fi
23215
23216  if test "x$with_copyright_year" = xyes; then
23217    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23218  elif test "x$with_copyright_year" != x; then
23219    COPYRIGHT_YEAR="$with_copyright_year"
23220  else
23221    COPYRIGHT_YEAR=`date +'%Y'`
23222  fi
23223
23224
23225
23226  # Warn user that old version arguments are deprecated.
23227
23228
23229# Check whether --with-milestone was given.
23230if test "${with_milestone+set}" = set; then :
23231  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23232$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23233fi
23234
23235
23236
23237
23238# Check whether --with-update-version was given.
23239if test "${with_update_version+set}" = set; then :
23240  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23241$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23242fi
23243
23244
23245
23246
23247# Check whether --with-user-release-suffix was given.
23248if test "${with_user_release_suffix+set}" = set; then :
23249  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
23250$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23251fi
23252
23253
23254
23255
23256# Check whether --with-build-number was given.
23257if test "${with_build_number+set}" = set; then :
23258  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23259$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23260fi
23261
23262
23263
23264  # Source the version numbers file
23265  . $AUTOCONF_DIR/version-numbers
23266
23267  # Some non-version number information is set in that file
23268
23269
23270
23271
23272
23273
23274
23275
23276  # Override version from arguments
23277
23278  # If --with-version-string is set, process it first. It is possible to
23279  # override parts with more specific flags, since these are processed later.
23280
23281# Check whether --with-version-string was given.
23282if test "${with_version_string+set}" = set; then :
23283  withval=$with_version_string;
23284fi
23285
23286  if test "x$with_version_string" = xyes; then
23287    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23288  elif test "x$with_version_string" != x; then
23289    # Additional [] needed to keep m4 from mangling shell constructs.
23290    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23291      VERSION_MAJOR=${BASH_REMATCH[1]}
23292      VERSION_MINOR=${BASH_REMATCH[3]}
23293      VERSION_SECURITY=${BASH_REMATCH[5]}
23294      VERSION_PATCH=${BASH_REMATCH[7]}
23295      VERSION_PRE=${BASH_REMATCH[9]}
23296      version_plus_separator=${BASH_REMATCH[11]}
23297      VERSION_BUILD=${BASH_REMATCH[12]}
23298      VERSION_OPT=${BASH_REMATCH[14]}
23299      # Unspecified numerical fields are interpreted as 0.
23300      if test "x$VERSION_MINOR" = x; then
23301        VERSION_MINOR=0
23302      fi
23303      if test "x$VERSION_SECURITY" = x; then
23304        VERSION_SECURITY=0
23305      fi
23306      if test "x$VERSION_PATCH" = x; then
23307        VERSION_PATCH=0
23308      fi
23309      if test "x$version_plus_separator" != x \
23310          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23311        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23312      fi
23313      # Stop the version part process from setting default values.
23314      # We still allow them to explicitely override though.
23315      NO_DEFAULT_VERSION_PARTS=true
23316    else
23317      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23318    fi
23319  fi
23320
23321
23322# Check whether --with-version-pre was given.
23323if test "${with_version_pre+set}" = set; then :
23324  withval=$with_version_pre; with_version_pre_present=true
23325else
23326  with_version_pre_present=false
23327fi
23328
23329
23330  if test "x$with_version_pre_present" = xtrue; then
23331    if test "x$with_version_pre" = xyes; then
23332      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23333    elif test "x$with_version_pre" = xno; then
23334      # Interpret --without-* as empty string instead of the literal "no"
23335      VERSION_PRE=
23336    else
23337      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23338       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23339      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23341$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23342      fi
23343    fi
23344  else
23345    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23346      # Default is to use "internal" as pre
23347      VERSION_PRE="internal"
23348    fi
23349  fi
23350
23351
23352# Check whether --with-version-opt was given.
23353if test "${with_version_opt+set}" = set; then :
23354  withval=$with_version_opt; with_version_opt_present=true
23355else
23356  with_version_opt_present=false
23357fi
23358
23359
23360  if test "x$with_version_opt_present" = xtrue; then
23361    if test "x$with_version_opt" = xyes; then
23362      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23363    elif test "x$with_version_opt" = xno; then
23364      # Interpret --without-* as empty string instead of the literal "no"
23365      VERSION_OPT=
23366    else
23367      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23368       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23369      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23371$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23372      fi
23373    fi
23374  else
23375    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23376      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23377      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23378      # Outer [ ] to quote m4.
23379       username=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
23380       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23381      VERSION_OPT="$timestamp.$username.$basedirname"
23382    fi
23383  fi
23384
23385
23386# Check whether --with-version-build was given.
23387if test "${with_version_build+set}" = set; then :
23388  withval=$with_version_build; with_version_build_present=true
23389else
23390  with_version_build_present=false
23391fi
23392
23393
23394  if test "x$with_version_build_present" = xtrue; then
23395    if test "x$with_version_build" = xyes; then
23396      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
23397    elif test "x$with_version_build" = xno; then
23398      # Interpret --without-* as empty string instead of the literal "no"
23399      VERSION_BUILD=
23400    elif test "x$with_version_build" = x; then
23401      VERSION_BUILD=
23402    else
23403
23404  # Additional [] needed to keep m4 from mangling shell constructs.
23405  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23406    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
23407  fi
23408  # Extract the version number without leading zeros.
23409  cleaned_value=${BASH_REMATCH[1]}
23410  if test "x$cleaned_value" = x; then
23411    # Special case for zero
23412    cleaned_value=${BASH_REMATCH[2]}
23413  fi
23414
23415  if test $cleaned_value -gt 255; then
23416    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
23417  fi
23418  if test "x$cleaned_value" != "x$with_version_build"; then
23419    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
23420$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
23421  fi
23422  VERSION_BUILD=$cleaned_value
23423
23424    fi
23425  else
23426    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23427      # Default is to not have a build number.
23428      VERSION_BUILD=""
23429      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
23430      VERSION_BUILD=0
23431    fi
23432  fi
23433
23434
23435# Check whether --with-version-major was given.
23436if test "${with_version_major+set}" = set; then :
23437  withval=$with_version_major; with_version_major_present=true
23438else
23439  with_version_major_present=false
23440fi
23441
23442
23443  if test "x$with_version_major_present" = xtrue; then
23444    if test "x$with_version_major" = xyes; then
23445      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
23446    else
23447
23448  # Additional [] needed to keep m4 from mangling shell constructs.
23449  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23450    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
23451  fi
23452  # Extract the version number without leading zeros.
23453  cleaned_value=${BASH_REMATCH[1]}
23454  if test "x$cleaned_value" = x; then
23455    # Special case for zero
23456    cleaned_value=${BASH_REMATCH[2]}
23457  fi
23458
23459  if test $cleaned_value -gt 255; then
23460    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
23461  fi
23462  if test "x$cleaned_value" != "x$with_version_major"; then
23463    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
23464$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
23465  fi
23466  VERSION_MAJOR=$cleaned_value
23467
23468    fi
23469  else
23470    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23471      # Default is to get value from version-numbers
23472      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
23473    fi
23474  fi
23475
23476
23477# Check whether --with-version-minor was given.
23478if test "${with_version_minor+set}" = set; then :
23479  withval=$with_version_minor; with_version_minor_present=true
23480else
23481  with_version_minor_present=false
23482fi
23483
23484
23485  if test "x$with_version_minor_present" = xtrue; then
23486    if test "x$with_version_minor" = xyes; then
23487      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
23488    elif test "x$with_version_minor" = xno; then
23489      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23490      VERSION_MINOR=0
23491    elif test "x$with_version_minor" = x; then
23492      VERSION_MINOR=0
23493    else
23494
23495  # Additional [] needed to keep m4 from mangling shell constructs.
23496  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23497    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
23498  fi
23499  # Extract the version number without leading zeros.
23500  cleaned_value=${BASH_REMATCH[1]}
23501  if test "x$cleaned_value" = x; then
23502    # Special case for zero
23503    cleaned_value=${BASH_REMATCH[2]}
23504  fi
23505
23506  if test $cleaned_value -gt 255; then
23507    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
23508  fi
23509  if test "x$cleaned_value" != "x$with_version_minor"; then
23510    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
23511$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
23512  fi
23513  VERSION_MINOR=$cleaned_value
23514
23515    fi
23516  else
23517    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23518      # Default is 0, if unspecified
23519      VERSION_MINOR=0
23520    fi
23521  fi
23522
23523
23524# Check whether --with-version-security was given.
23525if test "${with_version_security+set}" = set; then :
23526  withval=$with_version_security; with_version_security_present=true
23527else
23528  with_version_security_present=false
23529fi
23530
23531
23532  if test "x$with_version_security_present" = xtrue; then
23533    if test "x$with_version_security" = xyes; then
23534      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
23535    elif test "x$with_version_security" = xno; then
23536      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23537      VERSION_SECURITY=0
23538    elif test "x$with_version_security" = x; then
23539      VERSION_SECURITY=0
23540    else
23541
23542  # Additional [] needed to keep m4 from mangling shell constructs.
23543  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23544    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
23545  fi
23546  # Extract the version number without leading zeros.
23547  cleaned_value=${BASH_REMATCH[1]}
23548  if test "x$cleaned_value" = x; then
23549    # Special case for zero
23550    cleaned_value=${BASH_REMATCH[2]}
23551  fi
23552
23553  if test $cleaned_value -gt 255; then
23554    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
23555  fi
23556  if test "x$cleaned_value" != "x$with_version_security"; then
23557    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
23558$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
23559  fi
23560  VERSION_SECURITY=$cleaned_value
23561
23562    fi
23563  else
23564    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23565      # Default is 0, if unspecified
23566      VERSION_SECURITY=0
23567    fi
23568  fi
23569
23570
23571# Check whether --with-version-patch was given.
23572if test "${with_version_patch+set}" = set; then :
23573  withval=$with_version_patch; with_version_patch_present=true
23574else
23575  with_version_patch_present=false
23576fi
23577
23578
23579  if test "x$with_version_patch_present" = xtrue; then
23580    if test "x$with_version_patch" = xyes; then
23581      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
23582    elif test "x$with_version_patch" = xno; then
23583      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
23584      VERSION_PATCH=0
23585    elif test "x$with_version_patch" = x; then
23586      VERSION_PATCH=0
23587    else
23588
23589  # Additional [] needed to keep m4 from mangling shell constructs.
23590  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
23591    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
23592  fi
23593  # Extract the version number without leading zeros.
23594  cleaned_value=${BASH_REMATCH[1]}
23595  if test "x$cleaned_value" = x; then
23596    # Special case for zero
23597    cleaned_value=${BASH_REMATCH[2]}
23598  fi
23599
23600  if test $cleaned_value -gt 255; then
23601    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
23602  fi
23603  if test "x$cleaned_value" != "x$with_version_patch"; then
23604    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
23605$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
23606  fi
23607  VERSION_PATCH=$cleaned_value
23608
23609    fi
23610  else
23611    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23612      # Default is 0, if unspecified
23613      VERSION_PATCH=0
23614    fi
23615  fi
23616
23617  # Calculate derived version properties
23618
23619  # Set VERSION_IS_GA based on if VERSION_PRE has a value
23620  if test "x$VERSION_PRE" = x; then
23621    VERSION_IS_GA=true
23622  else
23623    VERSION_IS_GA=false
23624  fi
23625
23626  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
23627  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
23628
23629  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
23630  # Strip trailing zeroes from stripped_version_number
23631  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
23632  VERSION_NUMBER=$stripped_version_number
23633
23634  # The complete version string, with additional build information
23635  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
23636    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23637  else
23638    # If either build or opt is set, we need a + separator
23639    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
23640  fi
23641
23642  # The short version string, just VERSION_NUMBER and PRE, if present.
23643  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
23644
23645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
23646$as_echo_n "checking for version string... " >&6; }
23647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
23648$as_echo "$VERSION_STRING" >&6; }
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664###############################################################################
23665#
23666# Setup BootJDK, used to bootstrap the build.
23667#
23668###############################################################################
23669
23670
23671  BOOT_JDK_FOUND=no
23672
23673# Check whether --with-boot-jdk was given.
23674if test "${with_boot_jdk+set}" = set; then :
23675  withval=$with_boot_jdk;
23676fi
23677
23678
23679  # We look for the Boot JDK through various means, going from more certain to
23680  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
23681  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
23682  # must check if this is indeed valid; otherwise we'll continue looking.
23683
23684  # Test: Is bootjdk explicitely set by command line arguments?
23685
23686  if test "x$BOOT_JDK_FOUND" = xno; then
23687    # Now execute the test
23688
23689  if test "x$with_boot_jdk" != x; then
23690    BOOT_JDK=$with_boot_jdk
23691    BOOT_JDK_FOUND=maybe
23692    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
23693$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
23694  fi
23695
23696
23697    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23698    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23699      # Do we have a bin/java?
23700      if test ! -x "$BOOT_JDK/bin/java"; then
23701        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23702$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23703        BOOT_JDK_FOUND=no
23704      else
23705        # Do we have a bin/javac?
23706        if test ! -x "$BOOT_JDK/bin/javac"; then
23707          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23709          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23710$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23711          BOOT_JDK_FOUND=no
23712        else
23713          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23714          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23715
23716          # Extra M4 quote needed to protect [] in grep expression.
23717          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23718          if test "x$FOUND_CORRECT_VERSION" = x; then
23719            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23721            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23722$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23723            BOOT_JDK_FOUND=no
23724          else
23725            # We're done! :-)
23726            BOOT_JDK_FOUND=yes
23727
23728  # Only process if variable expands to non-empty
23729
23730  if test "x$BOOT_JDK" != x; then
23731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23732
23733  # Input might be given as Windows format, start by converting to
23734  # unix format.
23735  path="$BOOT_JDK"
23736  new_path=`$CYGPATH -u "$path"`
23737
23738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23741  # "foo.exe" is OK but "foo" is an error.
23742  #
23743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23744  # It is also a way to make sure we got the proper file name for the real test later on.
23745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23746  if test "x$test_shortpath" = x; then
23747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23748$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23749    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23750  fi
23751
23752  # Call helper function which possibly converts this using DOS-style short mode.
23753  # If so, the updated path is stored in $new_path.
23754
23755  input_path="$new_path"
23756  # Check if we need to convert this using DOS-style short mode. If the path
23757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23758  # take no chances and rewrite it.
23759  # Note: m4 eats our [], so we need to use [ and ] instead.
23760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23761  if test "x$has_forbidden_chars" != x; then
23762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23766      # Going to short mode and back again did indeed matter. Since short mode is
23767      # case insensitive, let's make it lowercase to improve readability.
23768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23769      # Now convert it back to Unix-style (cygpath)
23770      input_path=`$CYGPATH -u "$shortmode_path"`
23771      new_path="$input_path"
23772    fi
23773  fi
23774
23775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23776  if test "x$test_cygdrive_prefix" = x; then
23777    # As a simple fix, exclude /usr/bin since it's not a real path.
23778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23780      # a path prefixed by /cygdrive for fixpath to work.
23781      new_path="$CYGWIN_ROOT_PATH$input_path"
23782    fi
23783  fi
23784
23785
23786  if test "x$path" != "x$new_path"; then
23787    BOOT_JDK="$new_path"
23788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23789$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23790  fi
23791
23792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23793
23794  path="$BOOT_JDK"
23795  has_colon=`$ECHO $path | $GREP ^.:`
23796  new_path="$path"
23797  if test "x$has_colon" = x; then
23798    # Not in mixed or Windows style, start by that.
23799    new_path=`cmd //c echo $path`
23800  fi
23801
23802
23803  input_path="$new_path"
23804  # Check if we need to convert this using DOS-style short mode. If the path
23805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23806  # take no chances and rewrite it.
23807  # Note: m4 eats our [], so we need to use [ and ] instead.
23808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23809  if test "x$has_forbidden_chars" != x; then
23810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23812  fi
23813
23814
23815  windows_path="$new_path"
23816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23817    unix_path=`$CYGPATH -u "$windows_path"`
23818    new_path="$unix_path"
23819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23821    new_path="$unix_path"
23822  fi
23823
23824  if test "x$path" != "x$new_path"; then
23825    BOOT_JDK="$new_path"
23826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23828  fi
23829
23830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23832
23833    else
23834      # We're on a unix platform. Hooray! :)
23835      path="$BOOT_JDK"
23836      has_space=`$ECHO "$path" | $GREP " "`
23837      if test "x$has_space" != x; then
23838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23840        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23841      fi
23842
23843      # Use eval to expand a potential ~
23844      eval path="$path"
23845      if test ! -f "$path" && test ! -d "$path"; then
23846        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23847      fi
23848
23849      if test -d "$path"; then
23850        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23851      else
23852        dir="`$DIRNAME "$path"`"
23853        base="`$BASENAME "$path"`"
23854        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
23855      fi
23856    fi
23857  fi
23858
23859            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23860$as_echo_n "checking for Boot JDK... " >&6; }
23861            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23862$as_echo "$BOOT_JDK" >&6; }
23863            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23864$as_echo_n "checking Boot JDK version... " >&6; }
23865            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23866            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23867$as_echo "$BOOT_JDK_VERSION" >&6; }
23868          fi # end check jdk version
23869        fi # end check javac
23870      fi # end check java
23871    fi # end check boot jdk found
23872  fi
23873
23874  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
23875    # Having specified an argument which is incorrect will produce an instant failure;
23876    # we should not go on looking
23877    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
23878  fi
23879
23880  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
23881
23882  if test "x$BOOT_JDK_FOUND" = xno; then
23883    # Now execute the test
23884
23885  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23886    # First check at user selected default
23887
23888  if test "x$BOOT_JDK_FOUND" = xno; then
23889    # Now execute the test
23890
23891  if test -x /usr/libexec/java_home; then
23892    BOOT_JDK=`/usr/libexec/java_home `
23893    BOOT_JDK_FOUND=maybe
23894    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
23895$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
23896  fi
23897
23898
23899    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23900    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23901      # Do we have a bin/java?
23902      if test ! -x "$BOOT_JDK/bin/java"; then
23903        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23905        BOOT_JDK_FOUND=no
23906      else
23907        # Do we have a bin/javac?
23908        if test ! -x "$BOOT_JDK/bin/javac"; then
23909          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23911          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23912$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23913          BOOT_JDK_FOUND=no
23914        else
23915          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23916          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23917
23918          # Extra M4 quote needed to protect [] in grep expression.
23919          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
23920          if test "x$FOUND_CORRECT_VERSION" = x; then
23921            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23923            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23924$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23925            BOOT_JDK_FOUND=no
23926          else
23927            # We're done! :-)
23928            BOOT_JDK_FOUND=yes
23929
23930  # Only process if variable expands to non-empty
23931
23932  if test "x$BOOT_JDK" != x; then
23933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23934
23935  # Input might be given as Windows format, start by converting to
23936  # unix format.
23937  path="$BOOT_JDK"
23938  new_path=`$CYGPATH -u "$path"`
23939
23940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23943  # "foo.exe" is OK but "foo" is an error.
23944  #
23945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23946  # It is also a way to make sure we got the proper file name for the real test later on.
23947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23948  if test "x$test_shortpath" = x; then
23949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23951    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23952  fi
23953
23954  # Call helper function which possibly converts this using DOS-style short mode.
23955  # If so, the updated path is stored in $new_path.
23956
23957  input_path="$new_path"
23958  # Check if we need to convert this using DOS-style short mode. If the path
23959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23960  # take no chances and rewrite it.
23961  # Note: m4 eats our [], so we need to use [ and ] instead.
23962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23963  if test "x$has_forbidden_chars" != x; then
23964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23968      # Going to short mode and back again did indeed matter. Since short mode is
23969      # case insensitive, let's make it lowercase to improve readability.
23970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23971      # Now convert it back to Unix-style (cygpath)
23972      input_path=`$CYGPATH -u "$shortmode_path"`
23973      new_path="$input_path"
23974    fi
23975  fi
23976
23977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23978  if test "x$test_cygdrive_prefix" = x; then
23979    # As a simple fix, exclude /usr/bin since it's not a real path.
23980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23982      # a path prefixed by /cygdrive for fixpath to work.
23983      new_path="$CYGWIN_ROOT_PATH$input_path"
23984    fi
23985  fi
23986
23987
23988  if test "x$path" != "x$new_path"; then
23989    BOOT_JDK="$new_path"
23990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23991$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23992  fi
23993
23994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23995
23996  path="$BOOT_JDK"
23997  has_colon=`$ECHO $path | $GREP ^.:`
23998  new_path="$path"
23999  if test "x$has_colon" = x; then
24000    # Not in mixed or Windows style, start by that.
24001    new_path=`cmd //c echo $path`
24002  fi
24003
24004
24005  input_path="$new_path"
24006  # Check if we need to convert this using DOS-style short mode. If the path
24007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24008  # take no chances and rewrite it.
24009  # Note: m4 eats our [], so we need to use [ and ] instead.
24010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24011  if test "x$has_forbidden_chars" != x; then
24012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24014  fi
24015
24016
24017  windows_path="$new_path"
24018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24019    unix_path=`$CYGPATH -u "$windows_path"`
24020    new_path="$unix_path"
24021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24023    new_path="$unix_path"
24024  fi
24025
24026  if test "x$path" != "x$new_path"; then
24027    BOOT_JDK="$new_path"
24028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24029$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24030  fi
24031
24032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24034
24035    else
24036      # We're on a unix platform. Hooray! :)
24037      path="$BOOT_JDK"
24038      has_space=`$ECHO "$path" | $GREP " "`
24039      if test "x$has_space" != x; then
24040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24041$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24043      fi
24044
24045      # Use eval to expand a potential ~
24046      eval path="$path"
24047      if test ! -f "$path" && test ! -d "$path"; then
24048        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24049      fi
24050
24051      if test -d "$path"; then
24052        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24053      else
24054        dir="`$DIRNAME "$path"`"
24055        base="`$BASENAME "$path"`"
24056        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24057      fi
24058    fi
24059  fi
24060
24061            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24062$as_echo_n "checking for Boot JDK... " >&6; }
24063            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24064$as_echo "$BOOT_JDK" >&6; }
24065            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24066$as_echo_n "checking Boot JDK version... " >&6; }
24067            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24068            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24069$as_echo "$BOOT_JDK_VERSION" >&6; }
24070          fi # end check jdk version
24071        fi # end check javac
24072      fi # end check java
24073    fi # end check boot jdk found
24074  fi
24075
24076    # If that did not work out (e.g. too old), try explicit versions instead
24077
24078  if test "x$BOOT_JDK_FOUND" = xno; then
24079    # Now execute the test
24080
24081  if test -x /usr/libexec/java_home; then
24082    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24083    BOOT_JDK_FOUND=maybe
24084    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24085$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24086  fi
24087
24088
24089    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24090    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24091      # Do we have a bin/java?
24092      if test ! -x "$BOOT_JDK/bin/java"; then
24093        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24095        BOOT_JDK_FOUND=no
24096      else
24097        # Do we have a bin/javac?
24098        if test ! -x "$BOOT_JDK/bin/javac"; then
24099          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24100$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24101          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24102$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24103          BOOT_JDK_FOUND=no
24104        else
24105          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24106          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24107
24108          # Extra M4 quote needed to protect [] in grep expression.
24109          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24110          if test "x$FOUND_CORRECT_VERSION" = x; then
24111            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24113            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24114$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24115            BOOT_JDK_FOUND=no
24116          else
24117            # We're done! :-)
24118            BOOT_JDK_FOUND=yes
24119
24120  # Only process if variable expands to non-empty
24121
24122  if test "x$BOOT_JDK" != x; then
24123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24124
24125  # Input might be given as Windows format, start by converting to
24126  # unix format.
24127  path="$BOOT_JDK"
24128  new_path=`$CYGPATH -u "$path"`
24129
24130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24133  # "foo.exe" is OK but "foo" is an error.
24134  #
24135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24136  # It is also a way to make sure we got the proper file name for the real test later on.
24137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24138  if test "x$test_shortpath" = x; then
24139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24140$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24141    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24142  fi
24143
24144  # Call helper function which possibly converts this using DOS-style short mode.
24145  # If so, the updated path is stored in $new_path.
24146
24147  input_path="$new_path"
24148  # Check if we need to convert this using DOS-style short mode. If the path
24149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24150  # take no chances and rewrite it.
24151  # Note: m4 eats our [], so we need to use [ and ] instead.
24152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24153  if test "x$has_forbidden_chars" != x; then
24154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24158      # Going to short mode and back again did indeed matter. Since short mode is
24159      # case insensitive, let's make it lowercase to improve readability.
24160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24161      # Now convert it back to Unix-style (cygpath)
24162      input_path=`$CYGPATH -u "$shortmode_path"`
24163      new_path="$input_path"
24164    fi
24165  fi
24166
24167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24168  if test "x$test_cygdrive_prefix" = x; then
24169    # As a simple fix, exclude /usr/bin since it's not a real path.
24170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24172      # a path prefixed by /cygdrive for fixpath to work.
24173      new_path="$CYGWIN_ROOT_PATH$input_path"
24174    fi
24175  fi
24176
24177
24178  if test "x$path" != "x$new_path"; then
24179    BOOT_JDK="$new_path"
24180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24181$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24182  fi
24183
24184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24185
24186  path="$BOOT_JDK"
24187  has_colon=`$ECHO $path | $GREP ^.:`
24188  new_path="$path"
24189  if test "x$has_colon" = x; then
24190    # Not in mixed or Windows style, start by that.
24191    new_path=`cmd //c echo $path`
24192  fi
24193
24194
24195  input_path="$new_path"
24196  # Check if we need to convert this using DOS-style short mode. If the path
24197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24198  # take no chances and rewrite it.
24199  # Note: m4 eats our [], so we need to use [ and ] instead.
24200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24201  if test "x$has_forbidden_chars" != x; then
24202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24204  fi
24205
24206
24207  windows_path="$new_path"
24208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24209    unix_path=`$CYGPATH -u "$windows_path"`
24210    new_path="$unix_path"
24211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24213    new_path="$unix_path"
24214  fi
24215
24216  if test "x$path" != "x$new_path"; then
24217    BOOT_JDK="$new_path"
24218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24220  fi
24221
24222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24224
24225    else
24226      # We're on a unix platform. Hooray! :)
24227      path="$BOOT_JDK"
24228      has_space=`$ECHO "$path" | $GREP " "`
24229      if test "x$has_space" != x; then
24230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24232        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24233      fi
24234
24235      # Use eval to expand a potential ~
24236      eval path="$path"
24237      if test ! -f "$path" && test ! -d "$path"; then
24238        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24239      fi
24240
24241      if test -d "$path"; then
24242        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24243      else
24244        dir="`$DIRNAME "$path"`"
24245        base="`$BASENAME "$path"`"
24246        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24247      fi
24248    fi
24249  fi
24250
24251            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24252$as_echo_n "checking for Boot JDK... " >&6; }
24253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24254$as_echo "$BOOT_JDK" >&6; }
24255            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24256$as_echo_n "checking Boot JDK version... " >&6; }
24257            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24259$as_echo "$BOOT_JDK_VERSION" >&6; }
24260          fi # end check jdk version
24261        fi # end check javac
24262      fi # end check java
24263    fi # end check boot jdk found
24264  fi
24265
24266
24267  if test "x$BOOT_JDK_FOUND" = xno; then
24268    # Now execute the test
24269
24270  if test -x /usr/libexec/java_home; then
24271    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24272    BOOT_JDK_FOUND=maybe
24273    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24274$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24275  fi
24276
24277
24278    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24279    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24280      # Do we have a bin/java?
24281      if test ! -x "$BOOT_JDK/bin/java"; then
24282        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24284        BOOT_JDK_FOUND=no
24285      else
24286        # Do we have a bin/javac?
24287        if test ! -x "$BOOT_JDK/bin/javac"; then
24288          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24290          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24291$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24292          BOOT_JDK_FOUND=no
24293        else
24294          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24295          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24296
24297          # Extra M4 quote needed to protect [] in grep expression.
24298          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24299          if test "x$FOUND_CORRECT_VERSION" = x; then
24300            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24302            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24303$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24304            BOOT_JDK_FOUND=no
24305          else
24306            # We're done! :-)
24307            BOOT_JDK_FOUND=yes
24308
24309  # Only process if variable expands to non-empty
24310
24311  if test "x$BOOT_JDK" != x; then
24312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24313
24314  # Input might be given as Windows format, start by converting to
24315  # unix format.
24316  path="$BOOT_JDK"
24317  new_path=`$CYGPATH -u "$path"`
24318
24319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24322  # "foo.exe" is OK but "foo" is an error.
24323  #
24324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24325  # It is also a way to make sure we got the proper file name for the real test later on.
24326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24327  if test "x$test_shortpath" = x; then
24328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24329$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24330    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24331  fi
24332
24333  # Call helper function which possibly converts this using DOS-style short mode.
24334  # If so, the updated path is stored in $new_path.
24335
24336  input_path="$new_path"
24337  # Check if we need to convert this using DOS-style short mode. If the path
24338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24339  # take no chances and rewrite it.
24340  # Note: m4 eats our [], so we need to use [ and ] instead.
24341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24342  if test "x$has_forbidden_chars" != x; then
24343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24347      # Going to short mode and back again did indeed matter. Since short mode is
24348      # case insensitive, let's make it lowercase to improve readability.
24349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24350      # Now convert it back to Unix-style (cygpath)
24351      input_path=`$CYGPATH -u "$shortmode_path"`
24352      new_path="$input_path"
24353    fi
24354  fi
24355
24356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24357  if test "x$test_cygdrive_prefix" = x; then
24358    # As a simple fix, exclude /usr/bin since it's not a real path.
24359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24361      # a path prefixed by /cygdrive for fixpath to work.
24362      new_path="$CYGWIN_ROOT_PATH$input_path"
24363    fi
24364  fi
24365
24366
24367  if test "x$path" != "x$new_path"; then
24368    BOOT_JDK="$new_path"
24369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24370$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24371  fi
24372
24373    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24374
24375  path="$BOOT_JDK"
24376  has_colon=`$ECHO $path | $GREP ^.:`
24377  new_path="$path"
24378  if test "x$has_colon" = x; then
24379    # Not in mixed or Windows style, start by that.
24380    new_path=`cmd //c echo $path`
24381  fi
24382
24383
24384  input_path="$new_path"
24385  # Check if we need to convert this using DOS-style short mode. If the path
24386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24387  # take no chances and rewrite it.
24388  # Note: m4 eats our [], so we need to use [ and ] instead.
24389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24390  if test "x$has_forbidden_chars" != x; then
24391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24393  fi
24394
24395
24396  windows_path="$new_path"
24397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24398    unix_path=`$CYGPATH -u "$windows_path"`
24399    new_path="$unix_path"
24400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24402    new_path="$unix_path"
24403  fi
24404
24405  if test "x$path" != "x$new_path"; then
24406    BOOT_JDK="$new_path"
24407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24408$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24409  fi
24410
24411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24413
24414    else
24415      # We're on a unix platform. Hooray! :)
24416      path="$BOOT_JDK"
24417      has_space=`$ECHO "$path" | $GREP " "`
24418      if test "x$has_space" != x; then
24419        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24420$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24421        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24422      fi
24423
24424      # Use eval to expand a potential ~
24425      eval path="$path"
24426      if test ! -f "$path" && test ! -d "$path"; then
24427        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24428      fi
24429
24430      if test -d "$path"; then
24431        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24432      else
24433        dir="`$DIRNAME "$path"`"
24434        base="`$BASENAME "$path"`"
24435        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24436      fi
24437    fi
24438  fi
24439
24440            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24441$as_echo_n "checking for Boot JDK... " >&6; }
24442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24443$as_echo "$BOOT_JDK" >&6; }
24444            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24445$as_echo_n "checking Boot JDK version... " >&6; }
24446            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24447            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24448$as_echo "$BOOT_JDK_VERSION" >&6; }
24449          fi # end check jdk version
24450        fi # end check javac
24451      fi # end check java
24452    fi # end check boot jdk found
24453  fi
24454
24455
24456  if test "x$BOOT_JDK_FOUND" = xno; then
24457    # Now execute the test
24458
24459  if test -x /usr/libexec/java_home; then
24460    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
24461    BOOT_JDK_FOUND=maybe
24462    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
24463$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
24464  fi
24465
24466
24467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24469      # Do we have a bin/java?
24470      if test ! -x "$BOOT_JDK/bin/java"; then
24471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24473        BOOT_JDK_FOUND=no
24474      else
24475        # Do we have a bin/javac?
24476        if test ! -x "$BOOT_JDK/bin/javac"; then
24477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24481          BOOT_JDK_FOUND=no
24482        else
24483          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24484          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24485
24486          # Extra M4 quote needed to protect [] in grep expression.
24487          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24488          if test "x$FOUND_CORRECT_VERSION" = x; then
24489            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24491            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24492$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24493            BOOT_JDK_FOUND=no
24494          else
24495            # We're done! :-)
24496            BOOT_JDK_FOUND=yes
24497
24498  # Only process if variable expands to non-empty
24499
24500  if test "x$BOOT_JDK" != x; then
24501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24502
24503  # Input might be given as Windows format, start by converting to
24504  # unix format.
24505  path="$BOOT_JDK"
24506  new_path=`$CYGPATH -u "$path"`
24507
24508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24511  # "foo.exe" is OK but "foo" is an error.
24512  #
24513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24514  # It is also a way to make sure we got the proper file name for the real test later on.
24515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24516  if test "x$test_shortpath" = x; then
24517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24520  fi
24521
24522  # Call helper function which possibly converts this using DOS-style short mode.
24523  # If so, the updated path is stored in $new_path.
24524
24525  input_path="$new_path"
24526  # Check if we need to convert this using DOS-style short mode. If the path
24527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24528  # take no chances and rewrite it.
24529  # Note: m4 eats our [], so we need to use [ and ] instead.
24530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24531  if test "x$has_forbidden_chars" != x; then
24532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24536      # Going to short mode and back again did indeed matter. Since short mode is
24537      # case insensitive, let's make it lowercase to improve readability.
24538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24539      # Now convert it back to Unix-style (cygpath)
24540      input_path=`$CYGPATH -u "$shortmode_path"`
24541      new_path="$input_path"
24542    fi
24543  fi
24544
24545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24546  if test "x$test_cygdrive_prefix" = x; then
24547    # As a simple fix, exclude /usr/bin since it's not a real path.
24548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24550      # a path prefixed by /cygdrive for fixpath to work.
24551      new_path="$CYGWIN_ROOT_PATH$input_path"
24552    fi
24553  fi
24554
24555
24556  if test "x$path" != "x$new_path"; then
24557    BOOT_JDK="$new_path"
24558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24560  fi
24561
24562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24563
24564  path="$BOOT_JDK"
24565  has_colon=`$ECHO $path | $GREP ^.:`
24566  new_path="$path"
24567  if test "x$has_colon" = x; then
24568    # Not in mixed or Windows style, start by that.
24569    new_path=`cmd //c echo $path`
24570  fi
24571
24572
24573  input_path="$new_path"
24574  # Check if we need to convert this using DOS-style short mode. If the path
24575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24576  # take no chances and rewrite it.
24577  # Note: m4 eats our [], so we need to use [ and ] instead.
24578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24579  if test "x$has_forbidden_chars" != x; then
24580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24582  fi
24583
24584
24585  windows_path="$new_path"
24586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24587    unix_path=`$CYGPATH -u "$windows_path"`
24588    new_path="$unix_path"
24589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24591    new_path="$unix_path"
24592  fi
24593
24594  if test "x$path" != "x$new_path"; then
24595    BOOT_JDK="$new_path"
24596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24598  fi
24599
24600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24602
24603    else
24604      # We're on a unix platform. Hooray! :)
24605      path="$BOOT_JDK"
24606      has_space=`$ECHO "$path" | $GREP " "`
24607      if test "x$has_space" != x; then
24608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24611      fi
24612
24613      # Use eval to expand a potential ~
24614      eval path="$path"
24615      if test ! -f "$path" && test ! -d "$path"; then
24616        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24617      fi
24618
24619      if test -d "$path"; then
24620        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24621      else
24622        dir="`$DIRNAME "$path"`"
24623        base="`$BASENAME "$path"`"
24624        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24625      fi
24626    fi
24627  fi
24628
24629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24630$as_echo_n "checking for Boot JDK... " >&6; }
24631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24632$as_echo "$BOOT_JDK" >&6; }
24633            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24634$as_echo_n "checking Boot JDK version... " >&6; }
24635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24637$as_echo "$BOOT_JDK_VERSION" >&6; }
24638          fi # end check jdk version
24639        fi # end check javac
24640      fi # end check java
24641    fi # end check boot jdk found
24642  fi
24643
24644  fi
24645
24646
24647    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24648    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24649      # Do we have a bin/java?
24650      if test ! -x "$BOOT_JDK/bin/java"; then
24651        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24653        BOOT_JDK_FOUND=no
24654      else
24655        # Do we have a bin/javac?
24656        if test ! -x "$BOOT_JDK/bin/javac"; then
24657          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24659          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24660$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24661          BOOT_JDK_FOUND=no
24662        else
24663          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24664          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24665
24666          # Extra M4 quote needed to protect [] in grep expression.
24667          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24668          if test "x$FOUND_CORRECT_VERSION" = x; then
24669            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24671            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24672$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24673            BOOT_JDK_FOUND=no
24674          else
24675            # We're done! :-)
24676            BOOT_JDK_FOUND=yes
24677
24678  # Only process if variable expands to non-empty
24679
24680  if test "x$BOOT_JDK" != x; then
24681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24682
24683  # Input might be given as Windows format, start by converting to
24684  # unix format.
24685  path="$BOOT_JDK"
24686  new_path=`$CYGPATH -u "$path"`
24687
24688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24691  # "foo.exe" is OK but "foo" is an error.
24692  #
24693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24694  # It is also a way to make sure we got the proper file name for the real test later on.
24695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24696  if test "x$test_shortpath" = x; then
24697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24699    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24700  fi
24701
24702  # Call helper function which possibly converts this using DOS-style short mode.
24703  # If so, the updated path is stored in $new_path.
24704
24705  input_path="$new_path"
24706  # Check if we need to convert this using DOS-style short mode. If the path
24707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24708  # take no chances and rewrite it.
24709  # Note: m4 eats our [], so we need to use [ and ] instead.
24710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24711  if test "x$has_forbidden_chars" != x; then
24712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24716      # Going to short mode and back again did indeed matter. Since short mode is
24717      # case insensitive, let's make it lowercase to improve readability.
24718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24719      # Now convert it back to Unix-style (cygpath)
24720      input_path=`$CYGPATH -u "$shortmode_path"`
24721      new_path="$input_path"
24722    fi
24723  fi
24724
24725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24726  if test "x$test_cygdrive_prefix" = x; then
24727    # As a simple fix, exclude /usr/bin since it's not a real path.
24728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24730      # a path prefixed by /cygdrive for fixpath to work.
24731      new_path="$CYGWIN_ROOT_PATH$input_path"
24732    fi
24733  fi
24734
24735
24736  if test "x$path" != "x$new_path"; then
24737    BOOT_JDK="$new_path"
24738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24740  fi
24741
24742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24743
24744  path="$BOOT_JDK"
24745  has_colon=`$ECHO $path | $GREP ^.:`
24746  new_path="$path"
24747  if test "x$has_colon" = x; then
24748    # Not in mixed or Windows style, start by that.
24749    new_path=`cmd //c echo $path`
24750  fi
24751
24752
24753  input_path="$new_path"
24754  # Check if we need to convert this using DOS-style short mode. If the path
24755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24756  # take no chances and rewrite it.
24757  # Note: m4 eats our [], so we need to use [ and ] instead.
24758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24759  if test "x$has_forbidden_chars" != x; then
24760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24762  fi
24763
24764
24765  windows_path="$new_path"
24766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24767    unix_path=`$CYGPATH -u "$windows_path"`
24768    new_path="$unix_path"
24769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24771    new_path="$unix_path"
24772  fi
24773
24774  if test "x$path" != "x$new_path"; then
24775    BOOT_JDK="$new_path"
24776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24778  fi
24779
24780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24782
24783    else
24784      # We're on a unix platform. Hooray! :)
24785      path="$BOOT_JDK"
24786      has_space=`$ECHO "$path" | $GREP " "`
24787      if test "x$has_space" != x; then
24788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24791      fi
24792
24793      # Use eval to expand a potential ~
24794      eval path="$path"
24795      if test ! -f "$path" && test ! -d "$path"; then
24796        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24797      fi
24798
24799      if test -d "$path"; then
24800        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24801      else
24802        dir="`$DIRNAME "$path"`"
24803        base="`$BASENAME "$path"`"
24804        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24805      fi
24806    fi
24807  fi
24808
24809            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24810$as_echo_n "checking for Boot JDK... " >&6; }
24811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24812$as_echo "$BOOT_JDK" >&6; }
24813            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24814$as_echo_n "checking Boot JDK version... " >&6; }
24815            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24817$as_echo "$BOOT_JDK_VERSION" >&6; }
24818          fi # end check jdk version
24819        fi # end check javac
24820      fi # end check java
24821    fi # end check boot jdk found
24822  fi
24823
24824
24825  # Test: Is $JAVA_HOME set?
24826
24827  if test "x$BOOT_JDK_FOUND" = xno; then
24828    # Now execute the test
24829
24830  if test "x$JAVA_HOME" != x; then
24831    JAVA_HOME_PROCESSED="$JAVA_HOME"
24832
24833  # Only process if variable expands to non-empty
24834
24835  if test "x$JAVA_HOME_PROCESSED" != x; then
24836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24837
24838  # Input might be given as Windows format, start by converting to
24839  # unix format.
24840  path="$JAVA_HOME_PROCESSED"
24841  new_path=`$CYGPATH -u "$path"`
24842
24843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24846  # "foo.exe" is OK but "foo" is an error.
24847  #
24848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24849  # It is also a way to make sure we got the proper file name for the real test later on.
24850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24851  if test "x$test_shortpath" = x; then
24852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24853$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24854    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
24855  fi
24856
24857  # Call helper function which possibly converts this using DOS-style short mode.
24858  # If so, the updated path is stored in $new_path.
24859
24860  input_path="$new_path"
24861  # Check if we need to convert this using DOS-style short mode. If the path
24862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24863  # take no chances and rewrite it.
24864  # Note: m4 eats our [], so we need to use [ and ] instead.
24865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24866  if test "x$has_forbidden_chars" != x; then
24867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24871      # Going to short mode and back again did indeed matter. Since short mode is
24872      # case insensitive, let's make it lowercase to improve readability.
24873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24874      # Now convert it back to Unix-style (cygpath)
24875      input_path=`$CYGPATH -u "$shortmode_path"`
24876      new_path="$input_path"
24877    fi
24878  fi
24879
24880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24881  if test "x$test_cygdrive_prefix" = x; then
24882    # As a simple fix, exclude /usr/bin since it's not a real path.
24883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24885      # a path prefixed by /cygdrive for fixpath to work.
24886      new_path="$CYGWIN_ROOT_PATH$input_path"
24887    fi
24888  fi
24889
24890
24891  if test "x$path" != "x$new_path"; then
24892    JAVA_HOME_PROCESSED="$new_path"
24893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24894$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24895  fi
24896
24897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24898
24899  path="$JAVA_HOME_PROCESSED"
24900  has_colon=`$ECHO $path | $GREP ^.:`
24901  new_path="$path"
24902  if test "x$has_colon" = x; then
24903    # Not in mixed or Windows style, start by that.
24904    new_path=`cmd //c echo $path`
24905  fi
24906
24907
24908  input_path="$new_path"
24909  # Check if we need to convert this using DOS-style short mode. If the path
24910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24911  # take no chances and rewrite it.
24912  # Note: m4 eats our [], so we need to use [ and ] instead.
24913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24914  if test "x$has_forbidden_chars" != x; then
24915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24917  fi
24918
24919
24920  windows_path="$new_path"
24921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24922    unix_path=`$CYGPATH -u "$windows_path"`
24923    new_path="$unix_path"
24924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24926    new_path="$unix_path"
24927  fi
24928
24929  if test "x$path" != "x$new_path"; then
24930    JAVA_HOME_PROCESSED="$new_path"
24931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
24932$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
24933  fi
24934
24935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24937
24938    else
24939      # We're on a unix platform. Hooray! :)
24940      path="$JAVA_HOME_PROCESSED"
24941      has_space=`$ECHO "$path" | $GREP " "`
24942      if test "x$has_space" != x; then
24943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
24944$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
24945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24946      fi
24947
24948      # Use eval to expand a potential ~
24949      eval path="$path"
24950      if test ! -f "$path" && test ! -d "$path"; then
24951        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
24952      fi
24953
24954      if test -d "$path"; then
24955        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
24956      else
24957        dir="`$DIRNAME "$path"`"
24958        base="`$BASENAME "$path"`"
24959        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
24960      fi
24961    fi
24962  fi
24963
24964    if test ! -d "$JAVA_HOME_PROCESSED"; then
24965      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
24966$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
24967    else
24968      # Aha, the user has set a JAVA_HOME
24969      # let us use that as the Boot JDK.
24970      BOOT_JDK="$JAVA_HOME_PROCESSED"
24971      BOOT_JDK_FOUND=maybe
24972      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
24973$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
24974    fi
24975  fi
24976
24977
24978    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24979    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24980      # Do we have a bin/java?
24981      if test ! -x "$BOOT_JDK/bin/java"; then
24982        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24984        BOOT_JDK_FOUND=no
24985      else
24986        # Do we have a bin/javac?
24987        if test ! -x "$BOOT_JDK/bin/javac"; then
24988          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24990          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24991$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24992          BOOT_JDK_FOUND=no
24993        else
24994          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24995          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24996
24997          # Extra M4 quote needed to protect [] in grep expression.
24998          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24999          if test "x$FOUND_CORRECT_VERSION" = x; then
25000            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25002            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25003$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25004            BOOT_JDK_FOUND=no
25005          else
25006            # We're done! :-)
25007            BOOT_JDK_FOUND=yes
25008
25009  # Only process if variable expands to non-empty
25010
25011  if test "x$BOOT_JDK" != x; then
25012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25013
25014  # Input might be given as Windows format, start by converting to
25015  # unix format.
25016  path="$BOOT_JDK"
25017  new_path=`$CYGPATH -u "$path"`
25018
25019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25022  # "foo.exe" is OK but "foo" is an error.
25023  #
25024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25025  # It is also a way to make sure we got the proper file name for the real test later on.
25026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25027  if test "x$test_shortpath" = x; then
25028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25031  fi
25032
25033  # Call helper function which possibly converts this using DOS-style short mode.
25034  # If so, the updated path is stored in $new_path.
25035
25036  input_path="$new_path"
25037  # Check if we need to convert this using DOS-style short mode. If the path
25038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25039  # take no chances and rewrite it.
25040  # Note: m4 eats our [], so we need to use [ and ] instead.
25041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25042  if test "x$has_forbidden_chars" != x; then
25043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25047      # Going to short mode and back again did indeed matter. Since short mode is
25048      # case insensitive, let's make it lowercase to improve readability.
25049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25050      # Now convert it back to Unix-style (cygpath)
25051      input_path=`$CYGPATH -u "$shortmode_path"`
25052      new_path="$input_path"
25053    fi
25054  fi
25055
25056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25057  if test "x$test_cygdrive_prefix" = x; then
25058    # As a simple fix, exclude /usr/bin since it's not a real path.
25059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25061      # a path prefixed by /cygdrive for fixpath to work.
25062      new_path="$CYGWIN_ROOT_PATH$input_path"
25063    fi
25064  fi
25065
25066
25067  if test "x$path" != "x$new_path"; then
25068    BOOT_JDK="$new_path"
25069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25071  fi
25072
25073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25074
25075  path="$BOOT_JDK"
25076  has_colon=`$ECHO $path | $GREP ^.:`
25077  new_path="$path"
25078  if test "x$has_colon" = x; then
25079    # Not in mixed or Windows style, start by that.
25080    new_path=`cmd //c echo $path`
25081  fi
25082
25083
25084  input_path="$new_path"
25085  # Check if we need to convert this using DOS-style short mode. If the path
25086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25087  # take no chances and rewrite it.
25088  # Note: m4 eats our [], so we need to use [ and ] instead.
25089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25090  if test "x$has_forbidden_chars" != x; then
25091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25093  fi
25094
25095
25096  windows_path="$new_path"
25097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25098    unix_path=`$CYGPATH -u "$windows_path"`
25099    new_path="$unix_path"
25100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25102    new_path="$unix_path"
25103  fi
25104
25105  if test "x$path" != "x$new_path"; then
25106    BOOT_JDK="$new_path"
25107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25109  fi
25110
25111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25113
25114    else
25115      # We're on a unix platform. Hooray! :)
25116      path="$BOOT_JDK"
25117      has_space=`$ECHO "$path" | $GREP " "`
25118      if test "x$has_space" != x; then
25119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25122      fi
25123
25124      # Use eval to expand a potential ~
25125      eval path="$path"
25126      if test ! -f "$path" && test ! -d "$path"; then
25127        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25128      fi
25129
25130      if test -d "$path"; then
25131        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25132      else
25133        dir="`$DIRNAME "$path"`"
25134        base="`$BASENAME "$path"`"
25135        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25136      fi
25137    fi
25138  fi
25139
25140            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25141$as_echo_n "checking for Boot JDK... " >&6; }
25142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25143$as_echo "$BOOT_JDK" >&6; }
25144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25145$as_echo_n "checking Boot JDK version... " >&6; }
25146            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25148$as_echo "$BOOT_JDK_VERSION" >&6; }
25149          fi # end check jdk version
25150        fi # end check javac
25151      fi # end check java
25152    fi # end check boot jdk found
25153  fi
25154
25155
25156  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25157
25158  if test "x$BOOT_JDK_FOUND" = xno; then
25159    # Now execute the test
25160
25161  # Extract the first word of "javac", so it can be a program name with args.
25162set dummy javac; ac_word=$2
25163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25164$as_echo_n "checking for $ac_word... " >&6; }
25165if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25166  $as_echo_n "(cached) " >&6
25167else
25168  case $JAVAC_CHECK in
25169  [\\/]* | ?:[\\/]*)
25170  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25171  ;;
25172  *)
25173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25174for as_dir in $PATH
25175do
25176  IFS=$as_save_IFS
25177  test -z "$as_dir" && as_dir=.
25178    for ac_exec_ext in '' $ac_executable_extensions; do
25179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25180    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25182    break 2
25183  fi
25184done
25185  done
25186IFS=$as_save_IFS
25187
25188  ;;
25189esac
25190fi
25191JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25192if test -n "$JAVAC_CHECK"; then
25193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25194$as_echo "$JAVAC_CHECK" >&6; }
25195else
25196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25197$as_echo "no" >&6; }
25198fi
25199
25200
25201  # Extract the first word of "java", so it can be a program name with args.
25202set dummy java; ac_word=$2
25203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25204$as_echo_n "checking for $ac_word... " >&6; }
25205if ${ac_cv_path_JAVA_CHECK+:} false; then :
25206  $as_echo_n "(cached) " >&6
25207else
25208  case $JAVA_CHECK in
25209  [\\/]* | ?:[\\/]*)
25210  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25211  ;;
25212  *)
25213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25214for as_dir in $PATH
25215do
25216  IFS=$as_save_IFS
25217  test -z "$as_dir" && as_dir=.
25218    for ac_exec_ext in '' $ac_executable_extensions; do
25219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25220    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25222    break 2
25223  fi
25224done
25225  done
25226IFS=$as_save_IFS
25227
25228  ;;
25229esac
25230fi
25231JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25232if test -n "$JAVA_CHECK"; then
25233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25234$as_echo "$JAVA_CHECK" >&6; }
25235else
25236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25237$as_echo "no" >&6; }
25238fi
25239
25240
25241  BINARY="$JAVAC_CHECK"
25242  if test "x$JAVAC_CHECK" = x; then
25243    BINARY="$JAVA_CHECK"
25244  fi
25245  if test "x$BINARY" != x; then
25246    # So there is a java(c) binary, it might be part of a JDK.
25247    # Lets find the JDK/JRE directory by following symbolic links.
25248    # Linux/GNU systems often have links from /usr/bin/java to
25249    # /etc/alternatives/java to the real JDK binary.
25250
25251  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25252    # Follow a chain of symbolic links. Use readlink
25253    # where it exists, else fall back to horribly
25254    # complicated shell code.
25255    if test "x$READLINK_TESTED" != yes; then
25256      # On MacOSX there is a readlink tool with a different
25257      # purpose than the GNU readlink tool. Check the found readlink.
25258      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25259      if test "x$ISGNU" = x; then
25260        # A readlink that we do not know how to use.
25261        # Are there other non-GNU readlinks out there?
25262        READLINK_TESTED=yes
25263        READLINK=
25264      fi
25265    fi
25266
25267    if test "x$READLINK" != x; then
25268      BINARY=`$READLINK -f $BINARY`
25269    else
25270      # Save the current directory for restoring afterwards
25271      STARTDIR=$PWD
25272      COUNTER=0
25273      sym_link_dir=`$DIRNAME $BINARY`
25274      sym_link_file=`$BASENAME $BINARY`
25275      cd $sym_link_dir
25276      # Use -P flag to resolve symlinks in directories.
25277      cd `$THEPWDCMD -P`
25278      sym_link_dir=`$THEPWDCMD -P`
25279      # Resolve file symlinks
25280      while test $COUNTER -lt 20; do
25281        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25282        if test "x$ISLINK" == x; then
25283          # This is not a symbolic link! We are done!
25284          break
25285        fi
25286        # Again resolve directory symlinks since the target of the just found
25287        # link could be in a different directory
25288        cd `$DIRNAME $ISLINK`
25289        sym_link_dir=`$THEPWDCMD -P`
25290        sym_link_file=`$BASENAME $ISLINK`
25291        let COUNTER=COUNTER+1
25292      done
25293      cd $STARTDIR
25294      BINARY=$sym_link_dir/$sym_link_file
25295    fi
25296  fi
25297
25298    BOOT_JDK=`dirname "$BINARY"`
25299    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25300    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25301      # Looks like we found ourselves an JDK
25302      BOOT_JDK_FOUND=maybe
25303      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25304$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25305    fi
25306  fi
25307
25308
25309    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25310    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25311      # Do we have a bin/java?
25312      if test ! -x "$BOOT_JDK/bin/java"; then
25313        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25314$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25315        BOOT_JDK_FOUND=no
25316      else
25317        # Do we have a bin/javac?
25318        if test ! -x "$BOOT_JDK/bin/javac"; then
25319          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25321          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25322$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25323          BOOT_JDK_FOUND=no
25324        else
25325          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25326          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25327
25328          # Extra M4 quote needed to protect [] in grep expression.
25329          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25330          if test "x$FOUND_CORRECT_VERSION" = x; then
25331            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25333            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25334$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25335            BOOT_JDK_FOUND=no
25336          else
25337            # We're done! :-)
25338            BOOT_JDK_FOUND=yes
25339
25340  # Only process if variable expands to non-empty
25341
25342  if test "x$BOOT_JDK" != x; then
25343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25344
25345  # Input might be given as Windows format, start by converting to
25346  # unix format.
25347  path="$BOOT_JDK"
25348  new_path=`$CYGPATH -u "$path"`
25349
25350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25353  # "foo.exe" is OK but "foo" is an error.
25354  #
25355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25356  # It is also a way to make sure we got the proper file name for the real test later on.
25357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25358  if test "x$test_shortpath" = x; then
25359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25361    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25362  fi
25363
25364  # Call helper function which possibly converts this using DOS-style short mode.
25365  # If so, the updated path is stored in $new_path.
25366
25367  input_path="$new_path"
25368  # Check if we need to convert this using DOS-style short mode. If the path
25369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25370  # take no chances and rewrite it.
25371  # Note: m4 eats our [], so we need to use [ and ] instead.
25372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25373  if test "x$has_forbidden_chars" != x; then
25374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25378      # Going to short mode and back again did indeed matter. Since short mode is
25379      # case insensitive, let's make it lowercase to improve readability.
25380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25381      # Now convert it back to Unix-style (cygpath)
25382      input_path=`$CYGPATH -u "$shortmode_path"`
25383      new_path="$input_path"
25384    fi
25385  fi
25386
25387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25388  if test "x$test_cygdrive_prefix" = x; then
25389    # As a simple fix, exclude /usr/bin since it's not a real path.
25390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25392      # a path prefixed by /cygdrive for fixpath to work.
25393      new_path="$CYGWIN_ROOT_PATH$input_path"
25394    fi
25395  fi
25396
25397
25398  if test "x$path" != "x$new_path"; then
25399    BOOT_JDK="$new_path"
25400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25402  fi
25403
25404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25405
25406  path="$BOOT_JDK"
25407  has_colon=`$ECHO $path | $GREP ^.:`
25408  new_path="$path"
25409  if test "x$has_colon" = x; then
25410    # Not in mixed or Windows style, start by that.
25411    new_path=`cmd //c echo $path`
25412  fi
25413
25414
25415  input_path="$new_path"
25416  # Check if we need to convert this using DOS-style short mode. If the path
25417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25418  # take no chances and rewrite it.
25419  # Note: m4 eats our [], so we need to use [ and ] instead.
25420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25421  if test "x$has_forbidden_chars" != x; then
25422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25424  fi
25425
25426
25427  windows_path="$new_path"
25428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25429    unix_path=`$CYGPATH -u "$windows_path"`
25430    new_path="$unix_path"
25431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25433    new_path="$unix_path"
25434  fi
25435
25436  if test "x$path" != "x$new_path"; then
25437    BOOT_JDK="$new_path"
25438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25440  fi
25441
25442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25444
25445    else
25446      # We're on a unix platform. Hooray! :)
25447      path="$BOOT_JDK"
25448      has_space=`$ECHO "$path" | $GREP " "`
25449      if test "x$has_space" != x; then
25450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25451$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25453      fi
25454
25455      # Use eval to expand a potential ~
25456      eval path="$path"
25457      if test ! -f "$path" && test ! -d "$path"; then
25458        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25459      fi
25460
25461      if test -d "$path"; then
25462        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25463      else
25464        dir="`$DIRNAME "$path"`"
25465        base="`$BASENAME "$path"`"
25466        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25467      fi
25468    fi
25469  fi
25470
25471            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25472$as_echo_n "checking for Boot JDK... " >&6; }
25473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25474$as_echo "$BOOT_JDK" >&6; }
25475            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25476$as_echo_n "checking Boot JDK version... " >&6; }
25477            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25479$as_echo "$BOOT_JDK_VERSION" >&6; }
25480          fi # end check jdk version
25481        fi # end check javac
25482      fi # end check java
25483    fi # end check boot jdk found
25484  fi
25485
25486
25487  # Test: Is there a JDK installed in default, well-known locations?
25488
25489  if test "x$BOOT_JDK_FOUND" = xno; then
25490    # Now execute the test
25491
25492  if test "x$OPENJDK_TARGET_OS" = xwindows; then
25493
25494  if test "x$BOOT_JDK_FOUND" = xno; then
25495    # Now execute the test
25496
25497  if test "x$ProgramW6432" != x; then
25498    VIRTUAL_DIR="$ProgramW6432/Java"
25499
25500  windows_path="$VIRTUAL_DIR"
25501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25502    unix_path=`$CYGPATH -u "$windows_path"`
25503    VIRTUAL_DIR="$unix_path"
25504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25506    VIRTUAL_DIR="$unix_path"
25507  fi
25508
25509
25510  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25511  BOOT_JDK_SUFFIX=""
25512  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25513  if test "x$ALL_JDKS_FOUND" != x; then
25514    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25515
25516  if test "x$BOOT_JDK_FOUND" = xno; then
25517    # Now execute the test
25518
25519        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25520        if test -d "$BOOT_JDK"; then
25521          BOOT_JDK_FOUND=maybe
25522          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25523$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25524        fi
25525
25526
25527    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25528    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25529      # Do we have a bin/java?
25530      if test ! -x "$BOOT_JDK/bin/java"; then
25531        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25533        BOOT_JDK_FOUND=no
25534      else
25535        # Do we have a bin/javac?
25536        if test ! -x "$BOOT_JDK/bin/javac"; then
25537          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25539          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25540$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25541          BOOT_JDK_FOUND=no
25542        else
25543          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25544          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25545
25546          # Extra M4 quote needed to protect [] in grep expression.
25547          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25548          if test "x$FOUND_CORRECT_VERSION" = x; then
25549            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25551            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25552$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25553            BOOT_JDK_FOUND=no
25554          else
25555            # We're done! :-)
25556            BOOT_JDK_FOUND=yes
25557
25558  # Only process if variable expands to non-empty
25559
25560  if test "x$BOOT_JDK" != x; then
25561    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25562
25563  # Input might be given as Windows format, start by converting to
25564  # unix format.
25565  path="$BOOT_JDK"
25566  new_path=`$CYGPATH -u "$path"`
25567
25568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25571  # "foo.exe" is OK but "foo" is an error.
25572  #
25573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25574  # It is also a way to make sure we got the proper file name for the real test later on.
25575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25576  if test "x$test_shortpath" = x; then
25577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25579    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25580  fi
25581
25582  # Call helper function which possibly converts this using DOS-style short mode.
25583  # If so, the updated path is stored in $new_path.
25584
25585  input_path="$new_path"
25586  # Check if we need to convert this using DOS-style short mode. If the path
25587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25588  # take no chances and rewrite it.
25589  # Note: m4 eats our [], so we need to use [ and ] instead.
25590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25591  if test "x$has_forbidden_chars" != x; then
25592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25596      # Going to short mode and back again did indeed matter. Since short mode is
25597      # case insensitive, let's make it lowercase to improve readability.
25598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25599      # Now convert it back to Unix-style (cygpath)
25600      input_path=`$CYGPATH -u "$shortmode_path"`
25601      new_path="$input_path"
25602    fi
25603  fi
25604
25605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25606  if test "x$test_cygdrive_prefix" = x; then
25607    # As a simple fix, exclude /usr/bin since it's not a real path.
25608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25610      # a path prefixed by /cygdrive for fixpath to work.
25611      new_path="$CYGWIN_ROOT_PATH$input_path"
25612    fi
25613  fi
25614
25615
25616  if test "x$path" != "x$new_path"; then
25617    BOOT_JDK="$new_path"
25618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25620  fi
25621
25622    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25623
25624  path="$BOOT_JDK"
25625  has_colon=`$ECHO $path | $GREP ^.:`
25626  new_path="$path"
25627  if test "x$has_colon" = x; then
25628    # Not in mixed or Windows style, start by that.
25629    new_path=`cmd //c echo $path`
25630  fi
25631
25632
25633  input_path="$new_path"
25634  # Check if we need to convert this using DOS-style short mode. If the path
25635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25636  # take no chances and rewrite it.
25637  # Note: m4 eats our [], so we need to use [ and ] instead.
25638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25639  if test "x$has_forbidden_chars" != x; then
25640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25642  fi
25643
25644
25645  windows_path="$new_path"
25646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25647    unix_path=`$CYGPATH -u "$windows_path"`
25648    new_path="$unix_path"
25649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25651    new_path="$unix_path"
25652  fi
25653
25654  if test "x$path" != "x$new_path"; then
25655    BOOT_JDK="$new_path"
25656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25658  fi
25659
25660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25662
25663    else
25664      # We're on a unix platform. Hooray! :)
25665      path="$BOOT_JDK"
25666      has_space=`$ECHO "$path" | $GREP " "`
25667      if test "x$has_space" != x; then
25668        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25670        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25671      fi
25672
25673      # Use eval to expand a potential ~
25674      eval path="$path"
25675      if test ! -f "$path" && test ! -d "$path"; then
25676        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25677      fi
25678
25679      if test -d "$path"; then
25680        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25681      else
25682        dir="`$DIRNAME "$path"`"
25683        base="`$BASENAME "$path"`"
25684        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25685      fi
25686    fi
25687  fi
25688
25689            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25690$as_echo_n "checking for Boot JDK... " >&6; }
25691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25692$as_echo "$BOOT_JDK" >&6; }
25693            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25694$as_echo_n "checking Boot JDK version... " >&6; }
25695            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25697$as_echo "$BOOT_JDK_VERSION" >&6; }
25698          fi # end check jdk version
25699        fi # end check javac
25700      fi # end check java
25701    fi # end check boot jdk found
25702  fi
25703
25704    done
25705  fi
25706
25707  fi
25708
25709
25710    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25711    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25712      # Do we have a bin/java?
25713      if test ! -x "$BOOT_JDK/bin/java"; then
25714        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25716        BOOT_JDK_FOUND=no
25717      else
25718        # Do we have a bin/javac?
25719        if test ! -x "$BOOT_JDK/bin/javac"; then
25720          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25721$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25722          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25723$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25724          BOOT_JDK_FOUND=no
25725        else
25726          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25727          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25728
25729          # Extra M4 quote needed to protect [] in grep expression.
25730          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25731          if test "x$FOUND_CORRECT_VERSION" = x; then
25732            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25734            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25735$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25736            BOOT_JDK_FOUND=no
25737          else
25738            # We're done! :-)
25739            BOOT_JDK_FOUND=yes
25740
25741  # Only process if variable expands to non-empty
25742
25743  if test "x$BOOT_JDK" != x; then
25744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25745
25746  # Input might be given as Windows format, start by converting to
25747  # unix format.
25748  path="$BOOT_JDK"
25749  new_path=`$CYGPATH -u "$path"`
25750
25751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25754  # "foo.exe" is OK but "foo" is an error.
25755  #
25756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25757  # It is also a way to make sure we got the proper file name for the real test later on.
25758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25759  if test "x$test_shortpath" = x; then
25760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25761$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25762    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25763  fi
25764
25765  # Call helper function which possibly converts this using DOS-style short mode.
25766  # If so, the updated path is stored in $new_path.
25767
25768  input_path="$new_path"
25769  # Check if we need to convert this using DOS-style short mode. If the path
25770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25771  # take no chances and rewrite it.
25772  # Note: m4 eats our [], so we need to use [ and ] instead.
25773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25774  if test "x$has_forbidden_chars" != x; then
25775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25779      # Going to short mode and back again did indeed matter. Since short mode is
25780      # case insensitive, let's make it lowercase to improve readability.
25781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25782      # Now convert it back to Unix-style (cygpath)
25783      input_path=`$CYGPATH -u "$shortmode_path"`
25784      new_path="$input_path"
25785    fi
25786  fi
25787
25788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25789  if test "x$test_cygdrive_prefix" = x; then
25790    # As a simple fix, exclude /usr/bin since it's not a real path.
25791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25793      # a path prefixed by /cygdrive for fixpath to work.
25794      new_path="$CYGWIN_ROOT_PATH$input_path"
25795    fi
25796  fi
25797
25798
25799  if test "x$path" != "x$new_path"; then
25800    BOOT_JDK="$new_path"
25801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25803  fi
25804
25805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25806
25807  path="$BOOT_JDK"
25808  has_colon=`$ECHO $path | $GREP ^.:`
25809  new_path="$path"
25810  if test "x$has_colon" = x; then
25811    # Not in mixed or Windows style, start by that.
25812    new_path=`cmd //c echo $path`
25813  fi
25814
25815
25816  input_path="$new_path"
25817  # Check if we need to convert this using DOS-style short mode. If the path
25818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25819  # take no chances and rewrite it.
25820  # Note: m4 eats our [], so we need to use [ and ] instead.
25821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25822  if test "x$has_forbidden_chars" != x; then
25823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25825  fi
25826
25827
25828  windows_path="$new_path"
25829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25830    unix_path=`$CYGPATH -u "$windows_path"`
25831    new_path="$unix_path"
25832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25834    new_path="$unix_path"
25835  fi
25836
25837  if test "x$path" != "x$new_path"; then
25838    BOOT_JDK="$new_path"
25839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25841  fi
25842
25843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25845
25846    else
25847      # We're on a unix platform. Hooray! :)
25848      path="$BOOT_JDK"
25849      has_space=`$ECHO "$path" | $GREP " "`
25850      if test "x$has_space" != x; then
25851        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25853        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25854      fi
25855
25856      # Use eval to expand a potential ~
25857      eval path="$path"
25858      if test ! -f "$path" && test ! -d "$path"; then
25859        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25860      fi
25861
25862      if test -d "$path"; then
25863        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25864      else
25865        dir="`$DIRNAME "$path"`"
25866        base="`$BASENAME "$path"`"
25867        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25868      fi
25869    fi
25870  fi
25871
25872            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25873$as_echo_n "checking for Boot JDK... " >&6; }
25874            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25875$as_echo "$BOOT_JDK" >&6; }
25876            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25877$as_echo_n "checking Boot JDK version... " >&6; }
25878            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25879            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25880$as_echo "$BOOT_JDK_VERSION" >&6; }
25881          fi # end check jdk version
25882        fi # end check javac
25883      fi # end check java
25884    fi # end check boot jdk found
25885  fi
25886
25887
25888  if test "x$BOOT_JDK_FOUND" = xno; then
25889    # Now execute the test
25890
25891  if test "x$PROGRAMW6432" != x; then
25892    VIRTUAL_DIR="$PROGRAMW6432/Java"
25893
25894  windows_path="$VIRTUAL_DIR"
25895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25896    unix_path=`$CYGPATH -u "$windows_path"`
25897    VIRTUAL_DIR="$unix_path"
25898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25900    VIRTUAL_DIR="$unix_path"
25901  fi
25902
25903
25904  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
25905  BOOT_JDK_SUFFIX=""
25906  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25907  if test "x$ALL_JDKS_FOUND" != x; then
25908    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25909
25910  if test "x$BOOT_JDK_FOUND" = xno; then
25911    # Now execute the test
25912
25913        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25914        if test -d "$BOOT_JDK"; then
25915          BOOT_JDK_FOUND=maybe
25916          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25917$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25918        fi
25919
25920
25921    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25922    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25923      # Do we have a bin/java?
25924      if test ! -x "$BOOT_JDK/bin/java"; then
25925        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25927        BOOT_JDK_FOUND=no
25928      else
25929        # Do we have a bin/javac?
25930        if test ! -x "$BOOT_JDK/bin/javac"; then
25931          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25933          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25934$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25935          BOOT_JDK_FOUND=no
25936        else
25937          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25938          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25939
25940          # Extra M4 quote needed to protect [] in grep expression.
25941          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25942          if test "x$FOUND_CORRECT_VERSION" = x; then
25943            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25945            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25946$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25947            BOOT_JDK_FOUND=no
25948          else
25949            # We're done! :-)
25950            BOOT_JDK_FOUND=yes
25951
25952  # Only process if variable expands to non-empty
25953
25954  if test "x$BOOT_JDK" != x; then
25955    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25956
25957  # Input might be given as Windows format, start by converting to
25958  # unix format.
25959  path="$BOOT_JDK"
25960  new_path=`$CYGPATH -u "$path"`
25961
25962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25965  # "foo.exe" is OK but "foo" is an error.
25966  #
25967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25968  # It is also a way to make sure we got the proper file name for the real test later on.
25969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25970  if test "x$test_shortpath" = x; then
25971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25972$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25973    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25974  fi
25975
25976  # Call helper function which possibly converts this using DOS-style short mode.
25977  # If so, the updated path is stored in $new_path.
25978
25979  input_path="$new_path"
25980  # Check if we need to convert this using DOS-style short mode. If the path
25981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25982  # take no chances and rewrite it.
25983  # Note: m4 eats our [], so we need to use [ and ] instead.
25984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25985  if test "x$has_forbidden_chars" != x; then
25986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25990      # Going to short mode and back again did indeed matter. Since short mode is
25991      # case insensitive, let's make it lowercase to improve readability.
25992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25993      # Now convert it back to Unix-style (cygpath)
25994      input_path=`$CYGPATH -u "$shortmode_path"`
25995      new_path="$input_path"
25996    fi
25997  fi
25998
25999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26000  if test "x$test_cygdrive_prefix" = x; then
26001    # As a simple fix, exclude /usr/bin since it's not a real path.
26002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26004      # a path prefixed by /cygdrive for fixpath to work.
26005      new_path="$CYGWIN_ROOT_PATH$input_path"
26006    fi
26007  fi
26008
26009
26010  if test "x$path" != "x$new_path"; then
26011    BOOT_JDK="$new_path"
26012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26013$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26014  fi
26015
26016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26017
26018  path="$BOOT_JDK"
26019  has_colon=`$ECHO $path | $GREP ^.:`
26020  new_path="$path"
26021  if test "x$has_colon" = x; then
26022    # Not in mixed or Windows style, start by that.
26023    new_path=`cmd //c echo $path`
26024  fi
26025
26026
26027  input_path="$new_path"
26028  # Check if we need to convert this using DOS-style short mode. If the path
26029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26030  # take no chances and rewrite it.
26031  # Note: m4 eats our [], so we need to use [ and ] instead.
26032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26033  if test "x$has_forbidden_chars" != x; then
26034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26036  fi
26037
26038
26039  windows_path="$new_path"
26040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26041    unix_path=`$CYGPATH -u "$windows_path"`
26042    new_path="$unix_path"
26043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26045    new_path="$unix_path"
26046  fi
26047
26048  if test "x$path" != "x$new_path"; then
26049    BOOT_JDK="$new_path"
26050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26052  fi
26053
26054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26056
26057    else
26058      # We're on a unix platform. Hooray! :)
26059      path="$BOOT_JDK"
26060      has_space=`$ECHO "$path" | $GREP " "`
26061      if test "x$has_space" != x; then
26062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26064        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26065      fi
26066
26067      # Use eval to expand a potential ~
26068      eval path="$path"
26069      if test ! -f "$path" && test ! -d "$path"; then
26070        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26071      fi
26072
26073      if test -d "$path"; then
26074        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26075      else
26076        dir="`$DIRNAME "$path"`"
26077        base="`$BASENAME "$path"`"
26078        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26079      fi
26080    fi
26081  fi
26082
26083            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26084$as_echo_n "checking for Boot JDK... " >&6; }
26085            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26086$as_echo "$BOOT_JDK" >&6; }
26087            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26088$as_echo_n "checking Boot JDK version... " >&6; }
26089            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26091$as_echo "$BOOT_JDK_VERSION" >&6; }
26092          fi # end check jdk version
26093        fi # end check javac
26094      fi # end check java
26095    fi # end check boot jdk found
26096  fi
26097
26098    done
26099  fi
26100
26101  fi
26102
26103
26104    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26105    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26106      # Do we have a bin/java?
26107      if test ! -x "$BOOT_JDK/bin/java"; then
26108        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26110        BOOT_JDK_FOUND=no
26111      else
26112        # Do we have a bin/javac?
26113        if test ! -x "$BOOT_JDK/bin/javac"; then
26114          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26116          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26117$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26118          BOOT_JDK_FOUND=no
26119        else
26120          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26121          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26122
26123          # Extra M4 quote needed to protect [] in grep expression.
26124          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26125          if test "x$FOUND_CORRECT_VERSION" = x; then
26126            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26128            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26129$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26130            BOOT_JDK_FOUND=no
26131          else
26132            # We're done! :-)
26133            BOOT_JDK_FOUND=yes
26134
26135  # Only process if variable expands to non-empty
26136
26137  if test "x$BOOT_JDK" != x; then
26138    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26139
26140  # Input might be given as Windows format, start by converting to
26141  # unix format.
26142  path="$BOOT_JDK"
26143  new_path=`$CYGPATH -u "$path"`
26144
26145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26148  # "foo.exe" is OK but "foo" is an error.
26149  #
26150  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26151  # It is also a way to make sure we got the proper file name for the real test later on.
26152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26153  if test "x$test_shortpath" = x; then
26154    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26156    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26157  fi
26158
26159  # Call helper function which possibly converts this using DOS-style short mode.
26160  # If so, the updated path is stored in $new_path.
26161
26162  input_path="$new_path"
26163  # Check if we need to convert this using DOS-style short mode. If the path
26164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26165  # take no chances and rewrite it.
26166  # Note: m4 eats our [], so we need to use [ and ] instead.
26167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26168  if test "x$has_forbidden_chars" != x; then
26169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26173      # Going to short mode and back again did indeed matter. Since short mode is
26174      # case insensitive, let's make it lowercase to improve readability.
26175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26176      # Now convert it back to Unix-style (cygpath)
26177      input_path=`$CYGPATH -u "$shortmode_path"`
26178      new_path="$input_path"
26179    fi
26180  fi
26181
26182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26183  if test "x$test_cygdrive_prefix" = x; then
26184    # As a simple fix, exclude /usr/bin since it's not a real path.
26185    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26187      # a path prefixed by /cygdrive for fixpath to work.
26188      new_path="$CYGWIN_ROOT_PATH$input_path"
26189    fi
26190  fi
26191
26192
26193  if test "x$path" != "x$new_path"; then
26194    BOOT_JDK="$new_path"
26195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26197  fi
26198
26199    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26200
26201  path="$BOOT_JDK"
26202  has_colon=`$ECHO $path | $GREP ^.:`
26203  new_path="$path"
26204  if test "x$has_colon" = x; then
26205    # Not in mixed or Windows style, start by that.
26206    new_path=`cmd //c echo $path`
26207  fi
26208
26209
26210  input_path="$new_path"
26211  # Check if we need to convert this using DOS-style short mode. If the path
26212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26213  # take no chances and rewrite it.
26214  # Note: m4 eats our [], so we need to use [ and ] instead.
26215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26216  if test "x$has_forbidden_chars" != x; then
26217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26219  fi
26220
26221
26222  windows_path="$new_path"
26223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26224    unix_path=`$CYGPATH -u "$windows_path"`
26225    new_path="$unix_path"
26226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26228    new_path="$unix_path"
26229  fi
26230
26231  if test "x$path" != "x$new_path"; then
26232    BOOT_JDK="$new_path"
26233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26234$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26235  fi
26236
26237  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26238  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26239
26240    else
26241      # We're on a unix platform. Hooray! :)
26242      path="$BOOT_JDK"
26243      has_space=`$ECHO "$path" | $GREP " "`
26244      if test "x$has_space" != x; then
26245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26247        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26248      fi
26249
26250      # Use eval to expand a potential ~
26251      eval path="$path"
26252      if test ! -f "$path" && test ! -d "$path"; then
26253        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26254      fi
26255
26256      if test -d "$path"; then
26257        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26258      else
26259        dir="`$DIRNAME "$path"`"
26260        base="`$BASENAME "$path"`"
26261        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26262      fi
26263    fi
26264  fi
26265
26266            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26267$as_echo_n "checking for Boot JDK... " >&6; }
26268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26269$as_echo "$BOOT_JDK" >&6; }
26270            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26271$as_echo_n "checking Boot JDK version... " >&6; }
26272            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26274$as_echo "$BOOT_JDK_VERSION" >&6; }
26275          fi # end check jdk version
26276        fi # end check javac
26277      fi # end check java
26278    fi # end check boot jdk found
26279  fi
26280
26281
26282  if test "x$BOOT_JDK_FOUND" = xno; then
26283    # Now execute the test
26284
26285  if test "x$PROGRAMFILES" != x; then
26286    VIRTUAL_DIR="$PROGRAMFILES/Java"
26287
26288  windows_path="$VIRTUAL_DIR"
26289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26290    unix_path=`$CYGPATH -u "$windows_path"`
26291    VIRTUAL_DIR="$unix_path"
26292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26294    VIRTUAL_DIR="$unix_path"
26295  fi
26296
26297
26298  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26299  BOOT_JDK_SUFFIX=""
26300  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26301  if test "x$ALL_JDKS_FOUND" != x; then
26302    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26303
26304  if test "x$BOOT_JDK_FOUND" = xno; then
26305    # Now execute the test
26306
26307        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26308        if test -d "$BOOT_JDK"; then
26309          BOOT_JDK_FOUND=maybe
26310          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26311$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26312        fi
26313
26314
26315    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26316    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26317      # Do we have a bin/java?
26318      if test ! -x "$BOOT_JDK/bin/java"; then
26319        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26321        BOOT_JDK_FOUND=no
26322      else
26323        # Do we have a bin/javac?
26324        if test ! -x "$BOOT_JDK/bin/javac"; then
26325          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26327          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26328$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26329          BOOT_JDK_FOUND=no
26330        else
26331          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26332          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26333
26334          # Extra M4 quote needed to protect [] in grep expression.
26335          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26336          if test "x$FOUND_CORRECT_VERSION" = x; then
26337            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26339            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26340$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26341            BOOT_JDK_FOUND=no
26342          else
26343            # We're done! :-)
26344            BOOT_JDK_FOUND=yes
26345
26346  # Only process if variable expands to non-empty
26347
26348  if test "x$BOOT_JDK" != x; then
26349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26350
26351  # Input might be given as Windows format, start by converting to
26352  # unix format.
26353  path="$BOOT_JDK"
26354  new_path=`$CYGPATH -u "$path"`
26355
26356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26359  # "foo.exe" is OK but "foo" is an error.
26360  #
26361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26362  # It is also a way to make sure we got the proper file name for the real test later on.
26363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26364  if test "x$test_shortpath" = x; then
26365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26367    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26368  fi
26369
26370  # Call helper function which possibly converts this using DOS-style short mode.
26371  # If so, the updated path is stored in $new_path.
26372
26373  input_path="$new_path"
26374  # Check if we need to convert this using DOS-style short mode. If the path
26375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26376  # take no chances and rewrite it.
26377  # Note: m4 eats our [], so we need to use [ and ] instead.
26378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26379  if test "x$has_forbidden_chars" != x; then
26380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26384      # Going to short mode and back again did indeed matter. Since short mode is
26385      # case insensitive, let's make it lowercase to improve readability.
26386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26387      # Now convert it back to Unix-style (cygpath)
26388      input_path=`$CYGPATH -u "$shortmode_path"`
26389      new_path="$input_path"
26390    fi
26391  fi
26392
26393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26394  if test "x$test_cygdrive_prefix" = x; then
26395    # As a simple fix, exclude /usr/bin since it's not a real path.
26396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26398      # a path prefixed by /cygdrive for fixpath to work.
26399      new_path="$CYGWIN_ROOT_PATH$input_path"
26400    fi
26401  fi
26402
26403
26404  if test "x$path" != "x$new_path"; then
26405    BOOT_JDK="$new_path"
26406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26407$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26408  fi
26409
26410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26411
26412  path="$BOOT_JDK"
26413  has_colon=`$ECHO $path | $GREP ^.:`
26414  new_path="$path"
26415  if test "x$has_colon" = x; then
26416    # Not in mixed or Windows style, start by that.
26417    new_path=`cmd //c echo $path`
26418  fi
26419
26420
26421  input_path="$new_path"
26422  # Check if we need to convert this using DOS-style short mode. If the path
26423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26424  # take no chances and rewrite it.
26425  # Note: m4 eats our [], so we need to use [ and ] instead.
26426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26427  if test "x$has_forbidden_chars" != x; then
26428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26430  fi
26431
26432
26433  windows_path="$new_path"
26434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26435    unix_path=`$CYGPATH -u "$windows_path"`
26436    new_path="$unix_path"
26437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26439    new_path="$unix_path"
26440  fi
26441
26442  if test "x$path" != "x$new_path"; then
26443    BOOT_JDK="$new_path"
26444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26446  fi
26447
26448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26450
26451    else
26452      # We're on a unix platform. Hooray! :)
26453      path="$BOOT_JDK"
26454      has_space=`$ECHO "$path" | $GREP " "`
26455      if test "x$has_space" != x; then
26456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26459      fi
26460
26461      # Use eval to expand a potential ~
26462      eval path="$path"
26463      if test ! -f "$path" && test ! -d "$path"; then
26464        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26465      fi
26466
26467      if test -d "$path"; then
26468        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26469      else
26470        dir="`$DIRNAME "$path"`"
26471        base="`$BASENAME "$path"`"
26472        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26473      fi
26474    fi
26475  fi
26476
26477            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26478$as_echo_n "checking for Boot JDK... " >&6; }
26479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26480$as_echo "$BOOT_JDK" >&6; }
26481            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26482$as_echo_n "checking Boot JDK version... " >&6; }
26483            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26485$as_echo "$BOOT_JDK_VERSION" >&6; }
26486          fi # end check jdk version
26487        fi # end check javac
26488      fi # end check java
26489    fi # end check boot jdk found
26490  fi
26491
26492    done
26493  fi
26494
26495  fi
26496
26497
26498    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26499    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26500      # Do we have a bin/java?
26501      if test ! -x "$BOOT_JDK/bin/java"; then
26502        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26504        BOOT_JDK_FOUND=no
26505      else
26506        # Do we have a bin/javac?
26507        if test ! -x "$BOOT_JDK/bin/javac"; then
26508          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26510          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26511$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26512          BOOT_JDK_FOUND=no
26513        else
26514          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26515          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26516
26517          # Extra M4 quote needed to protect [] in grep expression.
26518          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26519          if test "x$FOUND_CORRECT_VERSION" = x; then
26520            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26522            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26523$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26524            BOOT_JDK_FOUND=no
26525          else
26526            # We're done! :-)
26527            BOOT_JDK_FOUND=yes
26528
26529  # Only process if variable expands to non-empty
26530
26531  if test "x$BOOT_JDK" != x; then
26532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26533
26534  # Input might be given as Windows format, start by converting to
26535  # unix format.
26536  path="$BOOT_JDK"
26537  new_path=`$CYGPATH -u "$path"`
26538
26539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26542  # "foo.exe" is OK but "foo" is an error.
26543  #
26544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26545  # It is also a way to make sure we got the proper file name for the real test later on.
26546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26547  if test "x$test_shortpath" = x; then
26548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26550    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26551  fi
26552
26553  # Call helper function which possibly converts this using DOS-style short mode.
26554  # If so, the updated path is stored in $new_path.
26555
26556  input_path="$new_path"
26557  # Check if we need to convert this using DOS-style short mode. If the path
26558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26559  # take no chances and rewrite it.
26560  # Note: m4 eats our [], so we need to use [ and ] instead.
26561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26562  if test "x$has_forbidden_chars" != x; then
26563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26567      # Going to short mode and back again did indeed matter. Since short mode is
26568      # case insensitive, let's make it lowercase to improve readability.
26569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26570      # Now convert it back to Unix-style (cygpath)
26571      input_path=`$CYGPATH -u "$shortmode_path"`
26572      new_path="$input_path"
26573    fi
26574  fi
26575
26576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26577  if test "x$test_cygdrive_prefix" = x; then
26578    # As a simple fix, exclude /usr/bin since it's not a real path.
26579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26581      # a path prefixed by /cygdrive for fixpath to work.
26582      new_path="$CYGWIN_ROOT_PATH$input_path"
26583    fi
26584  fi
26585
26586
26587  if test "x$path" != "x$new_path"; then
26588    BOOT_JDK="$new_path"
26589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26590$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26591  fi
26592
26593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26594
26595  path="$BOOT_JDK"
26596  has_colon=`$ECHO $path | $GREP ^.:`
26597  new_path="$path"
26598  if test "x$has_colon" = x; then
26599    # Not in mixed or Windows style, start by that.
26600    new_path=`cmd //c echo $path`
26601  fi
26602
26603
26604  input_path="$new_path"
26605  # Check if we need to convert this using DOS-style short mode. If the path
26606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26607  # take no chances and rewrite it.
26608  # Note: m4 eats our [], so we need to use [ and ] instead.
26609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26610  if test "x$has_forbidden_chars" != x; then
26611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26613  fi
26614
26615
26616  windows_path="$new_path"
26617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26618    unix_path=`$CYGPATH -u "$windows_path"`
26619    new_path="$unix_path"
26620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26622    new_path="$unix_path"
26623  fi
26624
26625  if test "x$path" != "x$new_path"; then
26626    BOOT_JDK="$new_path"
26627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26628$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26629  fi
26630
26631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26633
26634    else
26635      # We're on a unix platform. Hooray! :)
26636      path="$BOOT_JDK"
26637      has_space=`$ECHO "$path" | $GREP " "`
26638      if test "x$has_space" != x; then
26639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26640$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26641        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26642      fi
26643
26644      # Use eval to expand a potential ~
26645      eval path="$path"
26646      if test ! -f "$path" && test ! -d "$path"; then
26647        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26648      fi
26649
26650      if test -d "$path"; then
26651        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26652      else
26653        dir="`$DIRNAME "$path"`"
26654        base="`$BASENAME "$path"`"
26655        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26656      fi
26657    fi
26658  fi
26659
26660            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26661$as_echo_n "checking for Boot JDK... " >&6; }
26662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26663$as_echo "$BOOT_JDK" >&6; }
26664            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26665$as_echo_n "checking Boot JDK version... " >&6; }
26666            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26668$as_echo "$BOOT_JDK_VERSION" >&6; }
26669          fi # end check jdk version
26670        fi # end check javac
26671      fi # end check java
26672    fi # end check boot jdk found
26673  fi
26674
26675
26676  if test "x$BOOT_JDK_FOUND" = xno; then
26677    # Now execute the test
26678
26679  if test "x$ProgramFiles" != x; then
26680    VIRTUAL_DIR="$ProgramFiles/Java"
26681
26682  windows_path="$VIRTUAL_DIR"
26683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26684    unix_path=`$CYGPATH -u "$windows_path"`
26685    VIRTUAL_DIR="$unix_path"
26686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26688    VIRTUAL_DIR="$unix_path"
26689  fi
26690
26691
26692  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26693  BOOT_JDK_SUFFIX=""
26694  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26695  if test "x$ALL_JDKS_FOUND" != x; then
26696    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26697
26698  if test "x$BOOT_JDK_FOUND" = xno; then
26699    # Now execute the test
26700
26701        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26702        if test -d "$BOOT_JDK"; then
26703          BOOT_JDK_FOUND=maybe
26704          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26705$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26706        fi
26707
26708
26709    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26710    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26711      # Do we have a bin/java?
26712      if test ! -x "$BOOT_JDK/bin/java"; then
26713        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26715        BOOT_JDK_FOUND=no
26716      else
26717        # Do we have a bin/javac?
26718        if test ! -x "$BOOT_JDK/bin/javac"; then
26719          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26721          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26722$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26723          BOOT_JDK_FOUND=no
26724        else
26725          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26726          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26727
26728          # Extra M4 quote needed to protect [] in grep expression.
26729          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26730          if test "x$FOUND_CORRECT_VERSION" = x; then
26731            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26733            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26734$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26735            BOOT_JDK_FOUND=no
26736          else
26737            # We're done! :-)
26738            BOOT_JDK_FOUND=yes
26739
26740  # Only process if variable expands to non-empty
26741
26742  if test "x$BOOT_JDK" != x; then
26743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26744
26745  # Input might be given as Windows format, start by converting to
26746  # unix format.
26747  path="$BOOT_JDK"
26748  new_path=`$CYGPATH -u "$path"`
26749
26750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26753  # "foo.exe" is OK but "foo" is an error.
26754  #
26755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26756  # It is also a way to make sure we got the proper file name for the real test later on.
26757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26758  if test "x$test_shortpath" = x; then
26759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26760$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26761    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26762  fi
26763
26764  # Call helper function which possibly converts this using DOS-style short mode.
26765  # If so, the updated path is stored in $new_path.
26766
26767  input_path="$new_path"
26768  # Check if we need to convert this using DOS-style short mode. If the path
26769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26770  # take no chances and rewrite it.
26771  # Note: m4 eats our [], so we need to use [ and ] instead.
26772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26773  if test "x$has_forbidden_chars" != x; then
26774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26778      # Going to short mode and back again did indeed matter. Since short mode is
26779      # case insensitive, let's make it lowercase to improve readability.
26780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26781      # Now convert it back to Unix-style (cygpath)
26782      input_path=`$CYGPATH -u "$shortmode_path"`
26783      new_path="$input_path"
26784    fi
26785  fi
26786
26787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26788  if test "x$test_cygdrive_prefix" = x; then
26789    # As a simple fix, exclude /usr/bin since it's not a real path.
26790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26792      # a path prefixed by /cygdrive for fixpath to work.
26793      new_path="$CYGWIN_ROOT_PATH$input_path"
26794    fi
26795  fi
26796
26797
26798  if test "x$path" != "x$new_path"; then
26799    BOOT_JDK="$new_path"
26800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26801$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26802  fi
26803
26804    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26805
26806  path="$BOOT_JDK"
26807  has_colon=`$ECHO $path | $GREP ^.:`
26808  new_path="$path"
26809  if test "x$has_colon" = x; then
26810    # Not in mixed or Windows style, start by that.
26811    new_path=`cmd //c echo $path`
26812  fi
26813
26814
26815  input_path="$new_path"
26816  # Check if we need to convert this using DOS-style short mode. If the path
26817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26818  # take no chances and rewrite it.
26819  # Note: m4 eats our [], so we need to use [ and ] instead.
26820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26821  if test "x$has_forbidden_chars" != x; then
26822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26824  fi
26825
26826
26827  windows_path="$new_path"
26828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26829    unix_path=`$CYGPATH -u "$windows_path"`
26830    new_path="$unix_path"
26831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26833    new_path="$unix_path"
26834  fi
26835
26836  if test "x$path" != "x$new_path"; then
26837    BOOT_JDK="$new_path"
26838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26839$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26840  fi
26841
26842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26844
26845    else
26846      # We're on a unix platform. Hooray! :)
26847      path="$BOOT_JDK"
26848      has_space=`$ECHO "$path" | $GREP " "`
26849      if test "x$has_space" != x; then
26850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26852        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26853      fi
26854
26855      # Use eval to expand a potential ~
26856      eval path="$path"
26857      if test ! -f "$path" && test ! -d "$path"; then
26858        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26859      fi
26860
26861      if test -d "$path"; then
26862        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26863      else
26864        dir="`$DIRNAME "$path"`"
26865        base="`$BASENAME "$path"`"
26866        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26867      fi
26868    fi
26869  fi
26870
26871            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26872$as_echo_n "checking for Boot JDK... " >&6; }
26873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26874$as_echo "$BOOT_JDK" >&6; }
26875            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26876$as_echo_n "checking Boot JDK version... " >&6; }
26877            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26878            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26879$as_echo "$BOOT_JDK_VERSION" >&6; }
26880          fi # end check jdk version
26881        fi # end check javac
26882      fi # end check java
26883    fi # end check boot jdk found
26884  fi
26885
26886    done
26887  fi
26888
26889  fi
26890
26891
26892    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26893    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26894      # Do we have a bin/java?
26895      if test ! -x "$BOOT_JDK/bin/java"; then
26896        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26898        BOOT_JDK_FOUND=no
26899      else
26900        # Do we have a bin/javac?
26901        if test ! -x "$BOOT_JDK/bin/javac"; then
26902          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26904          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26905$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26906          BOOT_JDK_FOUND=no
26907        else
26908          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26909          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26910
26911          # Extra M4 quote needed to protect [] in grep expression.
26912          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26913          if test "x$FOUND_CORRECT_VERSION" = x; then
26914            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26916            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26917$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26918            BOOT_JDK_FOUND=no
26919          else
26920            # We're done! :-)
26921            BOOT_JDK_FOUND=yes
26922
26923  # Only process if variable expands to non-empty
26924
26925  if test "x$BOOT_JDK" != x; then
26926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26927
26928  # Input might be given as Windows format, start by converting to
26929  # unix format.
26930  path="$BOOT_JDK"
26931  new_path=`$CYGPATH -u "$path"`
26932
26933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26936  # "foo.exe" is OK but "foo" is an error.
26937  #
26938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26939  # It is also a way to make sure we got the proper file name for the real test later on.
26940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26941  if test "x$test_shortpath" = x; then
26942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26944    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26945  fi
26946
26947  # Call helper function which possibly converts this using DOS-style short mode.
26948  # If so, the updated path is stored in $new_path.
26949
26950  input_path="$new_path"
26951  # Check if we need to convert this using DOS-style short mode. If the path
26952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26953  # take no chances and rewrite it.
26954  # Note: m4 eats our [], so we need to use [ and ] instead.
26955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26956  if test "x$has_forbidden_chars" != x; then
26957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26961      # Going to short mode and back again did indeed matter. Since short mode is
26962      # case insensitive, let's make it lowercase to improve readability.
26963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26964      # Now convert it back to Unix-style (cygpath)
26965      input_path=`$CYGPATH -u "$shortmode_path"`
26966      new_path="$input_path"
26967    fi
26968  fi
26969
26970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26971  if test "x$test_cygdrive_prefix" = x; then
26972    # As a simple fix, exclude /usr/bin since it's not a real path.
26973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26975      # a path prefixed by /cygdrive for fixpath to work.
26976      new_path="$CYGWIN_ROOT_PATH$input_path"
26977    fi
26978  fi
26979
26980
26981  if test "x$path" != "x$new_path"; then
26982    BOOT_JDK="$new_path"
26983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26984$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26985  fi
26986
26987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26988
26989  path="$BOOT_JDK"
26990  has_colon=`$ECHO $path | $GREP ^.:`
26991  new_path="$path"
26992  if test "x$has_colon" = x; then
26993    # Not in mixed or Windows style, start by that.
26994    new_path=`cmd //c echo $path`
26995  fi
26996
26997
26998  input_path="$new_path"
26999  # Check if we need to convert this using DOS-style short mode. If the path
27000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27001  # take no chances and rewrite it.
27002  # Note: m4 eats our [], so we need to use [ and ] instead.
27003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27004  if test "x$has_forbidden_chars" != x; then
27005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27007  fi
27008
27009
27010  windows_path="$new_path"
27011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27012    unix_path=`$CYGPATH -u "$windows_path"`
27013    new_path="$unix_path"
27014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27016    new_path="$unix_path"
27017  fi
27018
27019  if test "x$path" != "x$new_path"; then
27020    BOOT_JDK="$new_path"
27021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27023  fi
27024
27025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27027
27028    else
27029      # We're on a unix platform. Hooray! :)
27030      path="$BOOT_JDK"
27031      has_space=`$ECHO "$path" | $GREP " "`
27032      if test "x$has_space" != x; then
27033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27036      fi
27037
27038      # Use eval to expand a potential ~
27039      eval path="$path"
27040      if test ! -f "$path" && test ! -d "$path"; then
27041        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27042      fi
27043
27044      if test -d "$path"; then
27045        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27046      else
27047        dir="`$DIRNAME "$path"`"
27048        base="`$BASENAME "$path"`"
27049        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27050      fi
27051    fi
27052  fi
27053
27054            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27055$as_echo_n "checking for Boot JDK... " >&6; }
27056            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27057$as_echo "$BOOT_JDK" >&6; }
27058            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27059$as_echo_n "checking Boot JDK version... " >&6; }
27060            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27061            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27062$as_echo "$BOOT_JDK_VERSION" >&6; }
27063          fi # end check jdk version
27064        fi # end check javac
27065      fi # end check java
27066    fi # end check boot jdk found
27067  fi
27068
27069
27070  if test "x$BOOT_JDK_FOUND" = xno; then
27071    # Now execute the test
27072
27073  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27074  BOOT_JDK_SUFFIX=""
27075  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27076  if test "x$ALL_JDKS_FOUND" != x; then
27077    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27078
27079  if test "x$BOOT_JDK_FOUND" = xno; then
27080    # Now execute the test
27081
27082        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27083        if test -d "$BOOT_JDK"; then
27084          BOOT_JDK_FOUND=maybe
27085          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27086$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27087        fi
27088
27089
27090    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27091    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27092      # Do we have a bin/java?
27093      if test ! -x "$BOOT_JDK/bin/java"; then
27094        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27096        BOOT_JDK_FOUND=no
27097      else
27098        # Do we have a bin/javac?
27099        if test ! -x "$BOOT_JDK/bin/javac"; then
27100          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27102          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27103$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27104          BOOT_JDK_FOUND=no
27105        else
27106          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27107          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27108
27109          # Extra M4 quote needed to protect [] in grep expression.
27110          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27111          if test "x$FOUND_CORRECT_VERSION" = x; then
27112            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27114            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27115$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27116            BOOT_JDK_FOUND=no
27117          else
27118            # We're done! :-)
27119            BOOT_JDK_FOUND=yes
27120
27121  # Only process if variable expands to non-empty
27122
27123  if test "x$BOOT_JDK" != x; then
27124    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27125
27126  # Input might be given as Windows format, start by converting to
27127  # unix format.
27128  path="$BOOT_JDK"
27129  new_path=`$CYGPATH -u "$path"`
27130
27131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27134  # "foo.exe" is OK but "foo" is an error.
27135  #
27136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27137  # It is also a way to make sure we got the proper file name for the real test later on.
27138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27139  if test "x$test_shortpath" = x; then
27140    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27141$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27142    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27143  fi
27144
27145  # Call helper function which possibly converts this using DOS-style short mode.
27146  # If so, the updated path is stored in $new_path.
27147
27148  input_path="$new_path"
27149  # Check if we need to convert this using DOS-style short mode. If the path
27150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27151  # take no chances and rewrite it.
27152  # Note: m4 eats our [], so we need to use [ and ] instead.
27153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27154  if test "x$has_forbidden_chars" != x; then
27155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27159      # Going to short mode and back again did indeed matter. Since short mode is
27160      # case insensitive, let's make it lowercase to improve readability.
27161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27162      # Now convert it back to Unix-style (cygpath)
27163      input_path=`$CYGPATH -u "$shortmode_path"`
27164      new_path="$input_path"
27165    fi
27166  fi
27167
27168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27169  if test "x$test_cygdrive_prefix" = x; then
27170    # As a simple fix, exclude /usr/bin since it's not a real path.
27171    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27173      # a path prefixed by /cygdrive for fixpath to work.
27174      new_path="$CYGWIN_ROOT_PATH$input_path"
27175    fi
27176  fi
27177
27178
27179  if test "x$path" != "x$new_path"; then
27180    BOOT_JDK="$new_path"
27181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27182$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27183  fi
27184
27185    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27186
27187  path="$BOOT_JDK"
27188  has_colon=`$ECHO $path | $GREP ^.:`
27189  new_path="$path"
27190  if test "x$has_colon" = x; then
27191    # Not in mixed or Windows style, start by that.
27192    new_path=`cmd //c echo $path`
27193  fi
27194
27195
27196  input_path="$new_path"
27197  # Check if we need to convert this using DOS-style short mode. If the path
27198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27199  # take no chances and rewrite it.
27200  # Note: m4 eats our [], so we need to use [ and ] instead.
27201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27202  if test "x$has_forbidden_chars" != x; then
27203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27205  fi
27206
27207
27208  windows_path="$new_path"
27209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27210    unix_path=`$CYGPATH -u "$windows_path"`
27211    new_path="$unix_path"
27212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27214    new_path="$unix_path"
27215  fi
27216
27217  if test "x$path" != "x$new_path"; then
27218    BOOT_JDK="$new_path"
27219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27220$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27221  fi
27222
27223  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27224  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27225
27226    else
27227      # We're on a unix platform. Hooray! :)
27228      path="$BOOT_JDK"
27229      has_space=`$ECHO "$path" | $GREP " "`
27230      if test "x$has_space" != x; then
27231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27233        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27234      fi
27235
27236      # Use eval to expand a potential ~
27237      eval path="$path"
27238      if test ! -f "$path" && test ! -d "$path"; then
27239        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27240      fi
27241
27242      if test -d "$path"; then
27243        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27244      else
27245        dir="`$DIRNAME "$path"`"
27246        base="`$BASENAME "$path"`"
27247        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27248      fi
27249    fi
27250  fi
27251
27252            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27253$as_echo_n "checking for Boot JDK... " >&6; }
27254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27255$as_echo "$BOOT_JDK" >&6; }
27256            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27257$as_echo_n "checking Boot JDK version... " >&6; }
27258            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27260$as_echo "$BOOT_JDK_VERSION" >&6; }
27261          fi # end check jdk version
27262        fi # end check javac
27263      fi # end check java
27264    fi # end check boot jdk found
27265  fi
27266
27267    done
27268  fi
27269
27270
27271    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27272    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27273      # Do we have a bin/java?
27274      if test ! -x "$BOOT_JDK/bin/java"; then
27275        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27277        BOOT_JDK_FOUND=no
27278      else
27279        # Do we have a bin/javac?
27280        if test ! -x "$BOOT_JDK/bin/javac"; then
27281          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27283          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27284$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27285          BOOT_JDK_FOUND=no
27286        else
27287          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27288          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27289
27290          # Extra M4 quote needed to protect [] in grep expression.
27291          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27292          if test "x$FOUND_CORRECT_VERSION" = x; then
27293            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27294$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27295            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27296$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27297            BOOT_JDK_FOUND=no
27298          else
27299            # We're done! :-)
27300            BOOT_JDK_FOUND=yes
27301
27302  # Only process if variable expands to non-empty
27303
27304  if test "x$BOOT_JDK" != x; then
27305    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27306
27307  # Input might be given as Windows format, start by converting to
27308  # unix format.
27309  path="$BOOT_JDK"
27310  new_path=`$CYGPATH -u "$path"`
27311
27312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27315  # "foo.exe" is OK but "foo" is an error.
27316  #
27317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27318  # It is also a way to make sure we got the proper file name for the real test later on.
27319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27320  if test "x$test_shortpath" = x; then
27321    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27323    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27324  fi
27325
27326  # Call helper function which possibly converts this using DOS-style short mode.
27327  # If so, the updated path is stored in $new_path.
27328
27329  input_path="$new_path"
27330  # Check if we need to convert this using DOS-style short mode. If the path
27331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27332  # take no chances and rewrite it.
27333  # Note: m4 eats our [], so we need to use [ and ] instead.
27334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27335  if test "x$has_forbidden_chars" != x; then
27336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27340      # Going to short mode and back again did indeed matter. Since short mode is
27341      # case insensitive, let's make it lowercase to improve readability.
27342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27343      # Now convert it back to Unix-style (cygpath)
27344      input_path=`$CYGPATH -u "$shortmode_path"`
27345      new_path="$input_path"
27346    fi
27347  fi
27348
27349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27350  if test "x$test_cygdrive_prefix" = x; then
27351    # As a simple fix, exclude /usr/bin since it's not a real path.
27352    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27354      # a path prefixed by /cygdrive for fixpath to work.
27355      new_path="$CYGWIN_ROOT_PATH$input_path"
27356    fi
27357  fi
27358
27359
27360  if test "x$path" != "x$new_path"; then
27361    BOOT_JDK="$new_path"
27362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27363$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27364  fi
27365
27366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27367
27368  path="$BOOT_JDK"
27369  has_colon=`$ECHO $path | $GREP ^.:`
27370  new_path="$path"
27371  if test "x$has_colon" = x; then
27372    # Not in mixed or Windows style, start by that.
27373    new_path=`cmd //c echo $path`
27374  fi
27375
27376
27377  input_path="$new_path"
27378  # Check if we need to convert this using DOS-style short mode. If the path
27379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27380  # take no chances and rewrite it.
27381  # Note: m4 eats our [], so we need to use [ and ] instead.
27382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27383  if test "x$has_forbidden_chars" != x; then
27384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27385    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27386  fi
27387
27388
27389  windows_path="$new_path"
27390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27391    unix_path=`$CYGPATH -u "$windows_path"`
27392    new_path="$unix_path"
27393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27395    new_path="$unix_path"
27396  fi
27397
27398  if test "x$path" != "x$new_path"; then
27399    BOOT_JDK="$new_path"
27400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27401$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27402  fi
27403
27404  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27405  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27406
27407    else
27408      # We're on a unix platform. Hooray! :)
27409      path="$BOOT_JDK"
27410      has_space=`$ECHO "$path" | $GREP " "`
27411      if test "x$has_space" != x; then
27412        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27413$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27414        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27415      fi
27416
27417      # Use eval to expand a potential ~
27418      eval path="$path"
27419      if test ! -f "$path" && test ! -d "$path"; then
27420        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27421      fi
27422
27423      if test -d "$path"; then
27424        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27425      else
27426        dir="`$DIRNAME "$path"`"
27427        base="`$BASENAME "$path"`"
27428        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27429      fi
27430    fi
27431  fi
27432
27433            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27434$as_echo_n "checking for Boot JDK... " >&6; }
27435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27436$as_echo "$BOOT_JDK" >&6; }
27437            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27438$as_echo_n "checking Boot JDK version... " >&6; }
27439            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27441$as_echo "$BOOT_JDK_VERSION" >&6; }
27442          fi # end check jdk version
27443        fi # end check javac
27444      fi # end check java
27445    fi # end check boot jdk found
27446  fi
27447
27448  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
27449
27450  if test "x$BOOT_JDK_FOUND" = xno; then
27451    # Now execute the test
27452
27453  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
27454  BOOT_JDK_SUFFIX="/Contents/Home"
27455  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27456  if test "x$ALL_JDKS_FOUND" != x; then
27457    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27458
27459  if test "x$BOOT_JDK_FOUND" = xno; then
27460    # Now execute the test
27461
27462        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27463        if test -d "$BOOT_JDK"; then
27464          BOOT_JDK_FOUND=maybe
27465          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27466$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27467        fi
27468
27469
27470    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27471    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27472      # Do we have a bin/java?
27473      if test ! -x "$BOOT_JDK/bin/java"; then
27474        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27476        BOOT_JDK_FOUND=no
27477      else
27478        # Do we have a bin/javac?
27479        if test ! -x "$BOOT_JDK/bin/javac"; then
27480          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27481$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27482          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27483$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27484          BOOT_JDK_FOUND=no
27485        else
27486          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27487          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27488
27489          # Extra M4 quote needed to protect [] in grep expression.
27490          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27491          if test "x$FOUND_CORRECT_VERSION" = x; then
27492            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27494            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27495$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27496            BOOT_JDK_FOUND=no
27497          else
27498            # We're done! :-)
27499            BOOT_JDK_FOUND=yes
27500
27501  # Only process if variable expands to non-empty
27502
27503  if test "x$BOOT_JDK" != x; then
27504    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27505
27506  # Input might be given as Windows format, start by converting to
27507  # unix format.
27508  path="$BOOT_JDK"
27509  new_path=`$CYGPATH -u "$path"`
27510
27511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27514  # "foo.exe" is OK but "foo" is an error.
27515  #
27516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27517  # It is also a way to make sure we got the proper file name for the real test later on.
27518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27519  if test "x$test_shortpath" = x; then
27520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27522    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27523  fi
27524
27525  # Call helper function which possibly converts this using DOS-style short mode.
27526  # If so, the updated path is stored in $new_path.
27527
27528  input_path="$new_path"
27529  # Check if we need to convert this using DOS-style short mode. If the path
27530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27531  # take no chances and rewrite it.
27532  # Note: m4 eats our [], so we need to use [ and ] instead.
27533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27534  if test "x$has_forbidden_chars" != x; then
27535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27539      # Going to short mode and back again did indeed matter. Since short mode is
27540      # case insensitive, let's make it lowercase to improve readability.
27541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27542      # Now convert it back to Unix-style (cygpath)
27543      input_path=`$CYGPATH -u "$shortmode_path"`
27544      new_path="$input_path"
27545    fi
27546  fi
27547
27548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27549  if test "x$test_cygdrive_prefix" = x; then
27550    # As a simple fix, exclude /usr/bin since it's not a real path.
27551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27553      # a path prefixed by /cygdrive for fixpath to work.
27554      new_path="$CYGWIN_ROOT_PATH$input_path"
27555    fi
27556  fi
27557
27558
27559  if test "x$path" != "x$new_path"; then
27560    BOOT_JDK="$new_path"
27561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27563  fi
27564
27565    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27566
27567  path="$BOOT_JDK"
27568  has_colon=`$ECHO $path | $GREP ^.:`
27569  new_path="$path"
27570  if test "x$has_colon" = x; then
27571    # Not in mixed or Windows style, start by that.
27572    new_path=`cmd //c echo $path`
27573  fi
27574
27575
27576  input_path="$new_path"
27577  # Check if we need to convert this using DOS-style short mode. If the path
27578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27579  # take no chances and rewrite it.
27580  # Note: m4 eats our [], so we need to use [ and ] instead.
27581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27582  if test "x$has_forbidden_chars" != x; then
27583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27585  fi
27586
27587
27588  windows_path="$new_path"
27589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27590    unix_path=`$CYGPATH -u "$windows_path"`
27591    new_path="$unix_path"
27592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27594    new_path="$unix_path"
27595  fi
27596
27597  if test "x$path" != "x$new_path"; then
27598    BOOT_JDK="$new_path"
27599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27601  fi
27602
27603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27605
27606    else
27607      # We're on a unix platform. Hooray! :)
27608      path="$BOOT_JDK"
27609      has_space=`$ECHO "$path" | $GREP " "`
27610      if test "x$has_space" != x; then
27611        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27612$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27613        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27614      fi
27615
27616      # Use eval to expand a potential ~
27617      eval path="$path"
27618      if test ! -f "$path" && test ! -d "$path"; then
27619        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27620      fi
27621
27622      if test -d "$path"; then
27623        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27624      else
27625        dir="`$DIRNAME "$path"`"
27626        base="`$BASENAME "$path"`"
27627        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27628      fi
27629    fi
27630  fi
27631
27632            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27633$as_echo_n "checking for Boot JDK... " >&6; }
27634            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27635$as_echo "$BOOT_JDK" >&6; }
27636            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27637$as_echo_n "checking Boot JDK version... " >&6; }
27638            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27639            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27640$as_echo "$BOOT_JDK_VERSION" >&6; }
27641          fi # end check jdk version
27642        fi # end check javac
27643      fi # end check java
27644    fi # end check boot jdk found
27645  fi
27646
27647    done
27648  fi
27649
27650
27651    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27652    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27653      # Do we have a bin/java?
27654      if test ! -x "$BOOT_JDK/bin/java"; then
27655        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27657        BOOT_JDK_FOUND=no
27658      else
27659        # Do we have a bin/javac?
27660        if test ! -x "$BOOT_JDK/bin/javac"; then
27661          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27663          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27664$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27665          BOOT_JDK_FOUND=no
27666        else
27667          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27668          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27669
27670          # Extra M4 quote needed to protect [] in grep expression.
27671          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27672          if test "x$FOUND_CORRECT_VERSION" = x; then
27673            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27675            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27676$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27677            BOOT_JDK_FOUND=no
27678          else
27679            # We're done! :-)
27680            BOOT_JDK_FOUND=yes
27681
27682  # Only process if variable expands to non-empty
27683
27684  if test "x$BOOT_JDK" != x; then
27685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27686
27687  # Input might be given as Windows format, start by converting to
27688  # unix format.
27689  path="$BOOT_JDK"
27690  new_path=`$CYGPATH -u "$path"`
27691
27692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27695  # "foo.exe" is OK but "foo" is an error.
27696  #
27697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27698  # It is also a way to make sure we got the proper file name for the real test later on.
27699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27700  if test "x$test_shortpath" = x; then
27701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27702$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27703    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27704  fi
27705
27706  # Call helper function which possibly converts this using DOS-style short mode.
27707  # If so, the updated path is stored in $new_path.
27708
27709  input_path="$new_path"
27710  # Check if we need to convert this using DOS-style short mode. If the path
27711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27712  # take no chances and rewrite it.
27713  # Note: m4 eats our [], so we need to use [ and ] instead.
27714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27715  if test "x$has_forbidden_chars" != x; then
27716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27720      # Going to short mode and back again did indeed matter. Since short mode is
27721      # case insensitive, let's make it lowercase to improve readability.
27722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27723      # Now convert it back to Unix-style (cygpath)
27724      input_path=`$CYGPATH -u "$shortmode_path"`
27725      new_path="$input_path"
27726    fi
27727  fi
27728
27729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27730  if test "x$test_cygdrive_prefix" = x; then
27731    # As a simple fix, exclude /usr/bin since it's not a real path.
27732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27734      # a path prefixed by /cygdrive for fixpath to work.
27735      new_path="$CYGWIN_ROOT_PATH$input_path"
27736    fi
27737  fi
27738
27739
27740  if test "x$path" != "x$new_path"; then
27741    BOOT_JDK="$new_path"
27742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27744  fi
27745
27746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27747
27748  path="$BOOT_JDK"
27749  has_colon=`$ECHO $path | $GREP ^.:`
27750  new_path="$path"
27751  if test "x$has_colon" = x; then
27752    # Not in mixed or Windows style, start by that.
27753    new_path=`cmd //c echo $path`
27754  fi
27755
27756
27757  input_path="$new_path"
27758  # Check if we need to convert this using DOS-style short mode. If the path
27759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27760  # take no chances and rewrite it.
27761  # Note: m4 eats our [], so we need to use [ and ] instead.
27762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27763  if test "x$has_forbidden_chars" != x; then
27764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27766  fi
27767
27768
27769  windows_path="$new_path"
27770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27771    unix_path=`$CYGPATH -u "$windows_path"`
27772    new_path="$unix_path"
27773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27775    new_path="$unix_path"
27776  fi
27777
27778  if test "x$path" != "x$new_path"; then
27779    BOOT_JDK="$new_path"
27780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27781$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27782  fi
27783
27784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27786
27787    else
27788      # We're on a unix platform. Hooray! :)
27789      path="$BOOT_JDK"
27790      has_space=`$ECHO "$path" | $GREP " "`
27791      if test "x$has_space" != x; then
27792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27795      fi
27796
27797      # Use eval to expand a potential ~
27798      eval path="$path"
27799      if test ! -f "$path" && test ! -d "$path"; then
27800        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27801      fi
27802
27803      if test -d "$path"; then
27804        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27805      else
27806        dir="`$DIRNAME "$path"`"
27807        base="`$BASENAME "$path"`"
27808        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27809      fi
27810    fi
27811  fi
27812
27813            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27814$as_echo_n "checking for Boot JDK... " >&6; }
27815            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27816$as_echo "$BOOT_JDK" >&6; }
27817            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27818$as_echo_n "checking Boot JDK version... " >&6; }
27819            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27821$as_echo "$BOOT_JDK_VERSION" >&6; }
27822          fi # end check jdk version
27823        fi # end check javac
27824      fi # end check java
27825    fi # end check boot jdk found
27826  fi
27827
27828
27829  if test "x$BOOT_JDK_FOUND" = xno; then
27830    # Now execute the test
27831
27832  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
27833  BOOT_JDK_SUFFIX="/Contents/Home"
27834  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27835  if test "x$ALL_JDKS_FOUND" != x; then
27836    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27837
27838  if test "x$BOOT_JDK_FOUND" = xno; then
27839    # Now execute the test
27840
27841        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27842        if test -d "$BOOT_JDK"; then
27843          BOOT_JDK_FOUND=maybe
27844          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27845$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27846        fi
27847
27848
27849    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27850    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27851      # Do we have a bin/java?
27852      if test ! -x "$BOOT_JDK/bin/java"; then
27853        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27855        BOOT_JDK_FOUND=no
27856      else
27857        # Do we have a bin/javac?
27858        if test ! -x "$BOOT_JDK/bin/javac"; then
27859          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27861          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27862$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27863          BOOT_JDK_FOUND=no
27864        else
27865          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27866          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27867
27868          # Extra M4 quote needed to protect [] in grep expression.
27869          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27870          if test "x$FOUND_CORRECT_VERSION" = x; then
27871            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27873            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27874$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27875            BOOT_JDK_FOUND=no
27876          else
27877            # We're done! :-)
27878            BOOT_JDK_FOUND=yes
27879
27880  # Only process if variable expands to non-empty
27881
27882  if test "x$BOOT_JDK" != x; then
27883    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27884
27885  # Input might be given as Windows format, start by converting to
27886  # unix format.
27887  path="$BOOT_JDK"
27888  new_path=`$CYGPATH -u "$path"`
27889
27890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27893  # "foo.exe" is OK but "foo" is an error.
27894  #
27895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27896  # It is also a way to make sure we got the proper file name for the real test later on.
27897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27898  if test "x$test_shortpath" = x; then
27899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27900$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27901    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27902  fi
27903
27904  # Call helper function which possibly converts this using DOS-style short mode.
27905  # If so, the updated path is stored in $new_path.
27906
27907  input_path="$new_path"
27908  # Check if we need to convert this using DOS-style short mode. If the path
27909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27910  # take no chances and rewrite it.
27911  # Note: m4 eats our [], so we need to use [ and ] instead.
27912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27913  if test "x$has_forbidden_chars" != x; then
27914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27918      # Going to short mode and back again did indeed matter. Since short mode is
27919      # case insensitive, let's make it lowercase to improve readability.
27920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27921      # Now convert it back to Unix-style (cygpath)
27922      input_path=`$CYGPATH -u "$shortmode_path"`
27923      new_path="$input_path"
27924    fi
27925  fi
27926
27927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27928  if test "x$test_cygdrive_prefix" = x; then
27929    # As a simple fix, exclude /usr/bin since it's not a real path.
27930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27932      # a path prefixed by /cygdrive for fixpath to work.
27933      new_path="$CYGWIN_ROOT_PATH$input_path"
27934    fi
27935  fi
27936
27937
27938  if test "x$path" != "x$new_path"; then
27939    BOOT_JDK="$new_path"
27940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27941$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27942  fi
27943
27944    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27945
27946  path="$BOOT_JDK"
27947  has_colon=`$ECHO $path | $GREP ^.:`
27948  new_path="$path"
27949  if test "x$has_colon" = x; then
27950    # Not in mixed or Windows style, start by that.
27951    new_path=`cmd //c echo $path`
27952  fi
27953
27954
27955  input_path="$new_path"
27956  # Check if we need to convert this using DOS-style short mode. If the path
27957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27958  # take no chances and rewrite it.
27959  # Note: m4 eats our [], so we need to use [ and ] instead.
27960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27961  if test "x$has_forbidden_chars" != x; then
27962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27964  fi
27965
27966
27967  windows_path="$new_path"
27968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27969    unix_path=`$CYGPATH -u "$windows_path"`
27970    new_path="$unix_path"
27971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27973    new_path="$unix_path"
27974  fi
27975
27976  if test "x$path" != "x$new_path"; then
27977    BOOT_JDK="$new_path"
27978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27979$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27980  fi
27981
27982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27984
27985    else
27986      # We're on a unix platform. Hooray! :)
27987      path="$BOOT_JDK"
27988      has_space=`$ECHO "$path" | $GREP " "`
27989      if test "x$has_space" != x; then
27990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27992        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27993      fi
27994
27995      # Use eval to expand a potential ~
27996      eval path="$path"
27997      if test ! -f "$path" && test ! -d "$path"; then
27998        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27999      fi
28000
28001      if test -d "$path"; then
28002        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28003      else
28004        dir="`$DIRNAME "$path"`"
28005        base="`$BASENAME "$path"`"
28006        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28007      fi
28008    fi
28009  fi
28010
28011            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28012$as_echo_n "checking for Boot JDK... " >&6; }
28013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28014$as_echo "$BOOT_JDK" >&6; }
28015            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28016$as_echo_n "checking Boot JDK version... " >&6; }
28017            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28018            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28019$as_echo "$BOOT_JDK_VERSION" >&6; }
28020          fi # end check jdk version
28021        fi # end check javac
28022      fi # end check java
28023    fi # end check boot jdk found
28024  fi
28025
28026    done
28027  fi
28028
28029
28030    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28031    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28032      # Do we have a bin/java?
28033      if test ! -x "$BOOT_JDK/bin/java"; then
28034        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28036        BOOT_JDK_FOUND=no
28037      else
28038        # Do we have a bin/javac?
28039        if test ! -x "$BOOT_JDK/bin/javac"; then
28040          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28042          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28043$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28044          BOOT_JDK_FOUND=no
28045        else
28046          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28047          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28048
28049          # Extra M4 quote needed to protect [] in grep expression.
28050          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28051          if test "x$FOUND_CORRECT_VERSION" = x; then
28052            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28054            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28055$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28056            BOOT_JDK_FOUND=no
28057          else
28058            # We're done! :-)
28059            BOOT_JDK_FOUND=yes
28060
28061  # Only process if variable expands to non-empty
28062
28063  if test "x$BOOT_JDK" != x; then
28064    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28065
28066  # Input might be given as Windows format, start by converting to
28067  # unix format.
28068  path="$BOOT_JDK"
28069  new_path=`$CYGPATH -u "$path"`
28070
28071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28074  # "foo.exe" is OK but "foo" is an error.
28075  #
28076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28077  # It is also a way to make sure we got the proper file name for the real test later on.
28078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28079  if test "x$test_shortpath" = x; then
28080    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28082    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28083  fi
28084
28085  # Call helper function which possibly converts this using DOS-style short mode.
28086  # If so, the updated path is stored in $new_path.
28087
28088  input_path="$new_path"
28089  # Check if we need to convert this using DOS-style short mode. If the path
28090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28091  # take no chances and rewrite it.
28092  # Note: m4 eats our [], so we need to use [ and ] instead.
28093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28094  if test "x$has_forbidden_chars" != x; then
28095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28099      # Going to short mode and back again did indeed matter. Since short mode is
28100      # case insensitive, let's make it lowercase to improve readability.
28101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28102      # Now convert it back to Unix-style (cygpath)
28103      input_path=`$CYGPATH -u "$shortmode_path"`
28104      new_path="$input_path"
28105    fi
28106  fi
28107
28108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28109  if test "x$test_cygdrive_prefix" = x; then
28110    # As a simple fix, exclude /usr/bin since it's not a real path.
28111    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28113      # a path prefixed by /cygdrive for fixpath to work.
28114      new_path="$CYGWIN_ROOT_PATH$input_path"
28115    fi
28116  fi
28117
28118
28119  if test "x$path" != "x$new_path"; then
28120    BOOT_JDK="$new_path"
28121    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28122$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28123  fi
28124
28125    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28126
28127  path="$BOOT_JDK"
28128  has_colon=`$ECHO $path | $GREP ^.:`
28129  new_path="$path"
28130  if test "x$has_colon" = x; then
28131    # Not in mixed or Windows style, start by that.
28132    new_path=`cmd //c echo $path`
28133  fi
28134
28135
28136  input_path="$new_path"
28137  # Check if we need to convert this using DOS-style short mode. If the path
28138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28139  # take no chances and rewrite it.
28140  # Note: m4 eats our [], so we need to use [ and ] instead.
28141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28142  if test "x$has_forbidden_chars" != x; then
28143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28144    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28145  fi
28146
28147
28148  windows_path="$new_path"
28149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28150    unix_path=`$CYGPATH -u "$windows_path"`
28151    new_path="$unix_path"
28152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28154    new_path="$unix_path"
28155  fi
28156
28157  if test "x$path" != "x$new_path"; then
28158    BOOT_JDK="$new_path"
28159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28161  fi
28162
28163  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28164  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28165
28166    else
28167      # We're on a unix platform. Hooray! :)
28168      path="$BOOT_JDK"
28169      has_space=`$ECHO "$path" | $GREP " "`
28170      if test "x$has_space" != x; then
28171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28173        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28174      fi
28175
28176      # Use eval to expand a potential ~
28177      eval path="$path"
28178      if test ! -f "$path" && test ! -d "$path"; then
28179        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28180      fi
28181
28182      if test -d "$path"; then
28183        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28184      else
28185        dir="`$DIRNAME "$path"`"
28186        base="`$BASENAME "$path"`"
28187        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28188      fi
28189    fi
28190  fi
28191
28192            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28193$as_echo_n "checking for Boot JDK... " >&6; }
28194            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28195$as_echo "$BOOT_JDK" >&6; }
28196            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28197$as_echo_n "checking Boot JDK version... " >&6; }
28198            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28199            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28200$as_echo "$BOOT_JDK_VERSION" >&6; }
28201          fi # end check jdk version
28202        fi # end check javac
28203      fi # end check java
28204    fi # end check boot jdk found
28205  fi
28206
28207  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28208
28209  if test "x$BOOT_JDK_FOUND" = xno; then
28210    # Now execute the test
28211
28212  BOOT_JDK_PREFIX="/usr/lib/jvm"
28213  BOOT_JDK_SUFFIX=""
28214  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28215  if test "x$ALL_JDKS_FOUND" != x; then
28216    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28217
28218  if test "x$BOOT_JDK_FOUND" = xno; then
28219    # Now execute the test
28220
28221        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28222        if test -d "$BOOT_JDK"; then
28223          BOOT_JDK_FOUND=maybe
28224          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28225$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28226        fi
28227
28228
28229    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28230    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28231      # Do we have a bin/java?
28232      if test ! -x "$BOOT_JDK/bin/java"; then
28233        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28235        BOOT_JDK_FOUND=no
28236      else
28237        # Do we have a bin/javac?
28238        if test ! -x "$BOOT_JDK/bin/javac"; then
28239          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28241          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28242$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28243          BOOT_JDK_FOUND=no
28244        else
28245          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28246          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28247
28248          # Extra M4 quote needed to protect [] in grep expression.
28249          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28250          if test "x$FOUND_CORRECT_VERSION" = x; then
28251            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28253            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28254$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28255            BOOT_JDK_FOUND=no
28256          else
28257            # We're done! :-)
28258            BOOT_JDK_FOUND=yes
28259
28260  # Only process if variable expands to non-empty
28261
28262  if test "x$BOOT_JDK" != x; then
28263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28264
28265  # Input might be given as Windows format, start by converting to
28266  # unix format.
28267  path="$BOOT_JDK"
28268  new_path=`$CYGPATH -u "$path"`
28269
28270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28273  # "foo.exe" is OK but "foo" is an error.
28274  #
28275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28276  # It is also a way to make sure we got the proper file name for the real test later on.
28277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28278  if test "x$test_shortpath" = x; then
28279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28280$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28281    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28282  fi
28283
28284  # Call helper function which possibly converts this using DOS-style short mode.
28285  # If so, the updated path is stored in $new_path.
28286
28287  input_path="$new_path"
28288  # Check if we need to convert this using DOS-style short mode. If the path
28289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28290  # take no chances and rewrite it.
28291  # Note: m4 eats our [], so we need to use [ and ] instead.
28292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28293  if test "x$has_forbidden_chars" != x; then
28294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28298      # Going to short mode and back again did indeed matter. Since short mode is
28299      # case insensitive, let's make it lowercase to improve readability.
28300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28301      # Now convert it back to Unix-style (cygpath)
28302      input_path=`$CYGPATH -u "$shortmode_path"`
28303      new_path="$input_path"
28304    fi
28305  fi
28306
28307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28308  if test "x$test_cygdrive_prefix" = x; then
28309    # As a simple fix, exclude /usr/bin since it's not a real path.
28310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28312      # a path prefixed by /cygdrive for fixpath to work.
28313      new_path="$CYGWIN_ROOT_PATH$input_path"
28314    fi
28315  fi
28316
28317
28318  if test "x$path" != "x$new_path"; then
28319    BOOT_JDK="$new_path"
28320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28321$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28322  fi
28323
28324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28325
28326  path="$BOOT_JDK"
28327  has_colon=`$ECHO $path | $GREP ^.:`
28328  new_path="$path"
28329  if test "x$has_colon" = x; then
28330    # Not in mixed or Windows style, start by that.
28331    new_path=`cmd //c echo $path`
28332  fi
28333
28334
28335  input_path="$new_path"
28336  # Check if we need to convert this using DOS-style short mode. If the path
28337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28338  # take no chances and rewrite it.
28339  # Note: m4 eats our [], so we need to use [ and ] instead.
28340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28341  if test "x$has_forbidden_chars" != x; then
28342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28344  fi
28345
28346
28347  windows_path="$new_path"
28348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28349    unix_path=`$CYGPATH -u "$windows_path"`
28350    new_path="$unix_path"
28351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28353    new_path="$unix_path"
28354  fi
28355
28356  if test "x$path" != "x$new_path"; then
28357    BOOT_JDK="$new_path"
28358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28360  fi
28361
28362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28364
28365    else
28366      # We're on a unix platform. Hooray! :)
28367      path="$BOOT_JDK"
28368      has_space=`$ECHO "$path" | $GREP " "`
28369      if test "x$has_space" != x; then
28370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28373      fi
28374
28375      # Use eval to expand a potential ~
28376      eval path="$path"
28377      if test ! -f "$path" && test ! -d "$path"; then
28378        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28379      fi
28380
28381      if test -d "$path"; then
28382        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28383      else
28384        dir="`$DIRNAME "$path"`"
28385        base="`$BASENAME "$path"`"
28386        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28387      fi
28388    fi
28389  fi
28390
28391            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28392$as_echo_n "checking for Boot JDK... " >&6; }
28393            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28394$as_echo "$BOOT_JDK" >&6; }
28395            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28396$as_echo_n "checking Boot JDK version... " >&6; }
28397            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28398            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28399$as_echo "$BOOT_JDK_VERSION" >&6; }
28400          fi # end check jdk version
28401        fi # end check javac
28402      fi # end check java
28403    fi # end check boot jdk found
28404  fi
28405
28406    done
28407  fi
28408
28409
28410    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28411    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28412      # Do we have a bin/java?
28413      if test ! -x "$BOOT_JDK/bin/java"; then
28414        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28416        BOOT_JDK_FOUND=no
28417      else
28418        # Do we have a bin/javac?
28419        if test ! -x "$BOOT_JDK/bin/javac"; then
28420          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28422          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28423$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28424          BOOT_JDK_FOUND=no
28425        else
28426          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28427          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28428
28429          # Extra M4 quote needed to protect [] in grep expression.
28430          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28431          if test "x$FOUND_CORRECT_VERSION" = x; then
28432            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28434            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28435$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28436            BOOT_JDK_FOUND=no
28437          else
28438            # We're done! :-)
28439            BOOT_JDK_FOUND=yes
28440
28441  # Only process if variable expands to non-empty
28442
28443  if test "x$BOOT_JDK" != x; then
28444    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28445
28446  # Input might be given as Windows format, start by converting to
28447  # unix format.
28448  path="$BOOT_JDK"
28449  new_path=`$CYGPATH -u "$path"`
28450
28451  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28452  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28453  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28454  # "foo.exe" is OK but "foo" is an error.
28455  #
28456  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28457  # It is also a way to make sure we got the proper file name for the real test later on.
28458  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28459  if test "x$test_shortpath" = x; then
28460    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28462    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28463  fi
28464
28465  # Call helper function which possibly converts this using DOS-style short mode.
28466  # If so, the updated path is stored in $new_path.
28467
28468  input_path="$new_path"
28469  # Check if we need to convert this using DOS-style short mode. If the path
28470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28471  # take no chances and rewrite it.
28472  # Note: m4 eats our [], so we need to use [ and ] instead.
28473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28474  if test "x$has_forbidden_chars" != x; then
28475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28479      # Going to short mode and back again did indeed matter. Since short mode is
28480      # case insensitive, let's make it lowercase to improve readability.
28481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28482      # Now convert it back to Unix-style (cygpath)
28483      input_path=`$CYGPATH -u "$shortmode_path"`
28484      new_path="$input_path"
28485    fi
28486  fi
28487
28488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28489  if test "x$test_cygdrive_prefix" = x; then
28490    # As a simple fix, exclude /usr/bin since it's not a real path.
28491    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28493      # a path prefixed by /cygdrive for fixpath to work.
28494      new_path="$CYGWIN_ROOT_PATH$input_path"
28495    fi
28496  fi
28497
28498
28499  if test "x$path" != "x$new_path"; then
28500    BOOT_JDK="$new_path"
28501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28502$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28503  fi
28504
28505    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28506
28507  path="$BOOT_JDK"
28508  has_colon=`$ECHO $path | $GREP ^.:`
28509  new_path="$path"
28510  if test "x$has_colon" = x; then
28511    # Not in mixed or Windows style, start by that.
28512    new_path=`cmd //c echo $path`
28513  fi
28514
28515
28516  input_path="$new_path"
28517  # Check if we need to convert this using DOS-style short mode. If the path
28518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28519  # take no chances and rewrite it.
28520  # Note: m4 eats our [], so we need to use [ and ] instead.
28521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28522  if test "x$has_forbidden_chars" != x; then
28523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28525  fi
28526
28527
28528  windows_path="$new_path"
28529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28530    unix_path=`$CYGPATH -u "$windows_path"`
28531    new_path="$unix_path"
28532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28534    new_path="$unix_path"
28535  fi
28536
28537  if test "x$path" != "x$new_path"; then
28538    BOOT_JDK="$new_path"
28539    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28540$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28541  fi
28542
28543  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28544  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28545
28546    else
28547      # We're on a unix platform. Hooray! :)
28548      path="$BOOT_JDK"
28549      has_space=`$ECHO "$path" | $GREP " "`
28550      if test "x$has_space" != x; then
28551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28552$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28553        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28554      fi
28555
28556      # Use eval to expand a potential ~
28557      eval path="$path"
28558      if test ! -f "$path" && test ! -d "$path"; then
28559        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28560      fi
28561
28562      if test -d "$path"; then
28563        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28564      else
28565        dir="`$DIRNAME "$path"`"
28566        base="`$BASENAME "$path"`"
28567        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28568      fi
28569    fi
28570  fi
28571
28572            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28573$as_echo_n "checking for Boot JDK... " >&6; }
28574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28575$as_echo "$BOOT_JDK" >&6; }
28576            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28577$as_echo_n "checking Boot JDK version... " >&6; }
28578            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28580$as_echo "$BOOT_JDK_VERSION" >&6; }
28581          fi # end check jdk version
28582        fi # end check javac
28583      fi # end check java
28584    fi # end check boot jdk found
28585  fi
28586
28587  fi
28588
28589
28590    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28591    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28592      # Do we have a bin/java?
28593      if test ! -x "$BOOT_JDK/bin/java"; then
28594        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28596        BOOT_JDK_FOUND=no
28597      else
28598        # Do we have a bin/javac?
28599        if test ! -x "$BOOT_JDK/bin/javac"; then
28600          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28602          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28603$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28604          BOOT_JDK_FOUND=no
28605        else
28606          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28607          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28608
28609          # Extra M4 quote needed to protect [] in grep expression.
28610          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28611          if test "x$FOUND_CORRECT_VERSION" = x; then
28612            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28614            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28615$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28616            BOOT_JDK_FOUND=no
28617          else
28618            # We're done! :-)
28619            BOOT_JDK_FOUND=yes
28620
28621  # Only process if variable expands to non-empty
28622
28623  if test "x$BOOT_JDK" != x; then
28624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28625
28626  # Input might be given as Windows format, start by converting to
28627  # unix format.
28628  path="$BOOT_JDK"
28629  new_path=`$CYGPATH -u "$path"`
28630
28631  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28632  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28633  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28634  # "foo.exe" is OK but "foo" is an error.
28635  #
28636  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28637  # It is also a way to make sure we got the proper file name for the real test later on.
28638  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28639  if test "x$test_shortpath" = x; then
28640    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28642    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28643  fi
28644
28645  # Call helper function which possibly converts this using DOS-style short mode.
28646  # If so, the updated path is stored in $new_path.
28647
28648  input_path="$new_path"
28649  # Check if we need to convert this using DOS-style short mode. If the path
28650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28651  # take no chances and rewrite it.
28652  # Note: m4 eats our [], so we need to use [ and ] instead.
28653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28654  if test "x$has_forbidden_chars" != x; then
28655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28656    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28657    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28658    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28659      # Going to short mode and back again did indeed matter. Since short mode is
28660      # case insensitive, let's make it lowercase to improve readability.
28661      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28662      # Now convert it back to Unix-style (cygpath)
28663      input_path=`$CYGPATH -u "$shortmode_path"`
28664      new_path="$input_path"
28665    fi
28666  fi
28667
28668  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28669  if test "x$test_cygdrive_prefix" = x; then
28670    # As a simple fix, exclude /usr/bin since it's not a real path.
28671    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28672      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28673      # a path prefixed by /cygdrive for fixpath to work.
28674      new_path="$CYGWIN_ROOT_PATH$input_path"
28675    fi
28676  fi
28677
28678
28679  if test "x$path" != "x$new_path"; then
28680    BOOT_JDK="$new_path"
28681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28682$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28683  fi
28684
28685    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28686
28687  path="$BOOT_JDK"
28688  has_colon=`$ECHO $path | $GREP ^.:`
28689  new_path="$path"
28690  if test "x$has_colon" = x; then
28691    # Not in mixed or Windows style, start by that.
28692    new_path=`cmd //c echo $path`
28693  fi
28694
28695
28696  input_path="$new_path"
28697  # Check if we need to convert this using DOS-style short mode. If the path
28698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28699  # take no chances and rewrite it.
28700  # Note: m4 eats our [], so we need to use [ and ] instead.
28701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28702  if test "x$has_forbidden_chars" != x; then
28703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28705  fi
28706
28707
28708  windows_path="$new_path"
28709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28710    unix_path=`$CYGPATH -u "$windows_path"`
28711    new_path="$unix_path"
28712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28714    new_path="$unix_path"
28715  fi
28716
28717  if test "x$path" != "x$new_path"; then
28718    BOOT_JDK="$new_path"
28719    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28720$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28721  fi
28722
28723  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28724  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28725
28726    else
28727      # We're on a unix platform. Hooray! :)
28728      path="$BOOT_JDK"
28729      has_space=`$ECHO "$path" | $GREP " "`
28730      if test "x$has_space" != x; then
28731        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28732$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28733        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28734      fi
28735
28736      # Use eval to expand a potential ~
28737      eval path="$path"
28738      if test ! -f "$path" && test ! -d "$path"; then
28739        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28740      fi
28741
28742      if test -d "$path"; then
28743        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28744      else
28745        dir="`$DIRNAME "$path"`"
28746        base="`$BASENAME "$path"`"
28747        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28748      fi
28749    fi
28750  fi
28751
28752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28753$as_echo_n "checking for Boot JDK... " >&6; }
28754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28755$as_echo "$BOOT_JDK" >&6; }
28756            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28757$as_echo_n "checking Boot JDK version... " >&6; }
28758            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28760$as_echo "$BOOT_JDK_VERSION" >&6; }
28761          fi # end check jdk version
28762        fi # end check javac
28763      fi # end check java
28764    fi # end check boot jdk found
28765  fi
28766
28767
28768  # If we haven't found anything yet, we've truly lost. Give up.
28769  if test "x$BOOT_JDK_FOUND" = xno; then
28770
28771  # Print a helpful message on how to acquire the necessary build dependency.
28772  # openjdk is the help tag: freetype, cups, alsa etc
28773  MISSING_DEPENDENCY=openjdk
28774
28775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28776    cygwin_help $MISSING_DEPENDENCY
28777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28778    msys_help $MISSING_DEPENDENCY
28779  else
28780    PKGHANDLER_COMMAND=
28781
28782    case $PKGHANDLER in
28783      apt-get)
28784        apt_help     $MISSING_DEPENDENCY ;;
28785      yum)
28786        yum_help     $MISSING_DEPENDENCY ;;
28787      port)
28788        port_help    $MISSING_DEPENDENCY ;;
28789      pkgutil)
28790        pkgutil_help $MISSING_DEPENDENCY ;;
28791      pkgadd)
28792        pkgadd_help  $MISSING_DEPENDENCY ;;
28793    esac
28794
28795    if test "x$PKGHANDLER_COMMAND" != x; then
28796      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28797    fi
28798  fi
28799
28800    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
28801$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
28802    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
28803$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28804    as_fn_error $? "Cannot continue" "$LINENO" 5
28805  fi
28806
28807
28808
28809  # Setup tools from the Boot JDK.
28810
28811  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28812
28813  # Publish this variable in the help.
28814
28815
28816  if [ -z "${JAVA+x}" ]; then
28817    # The variable is not set by user, try to locate tool using the code snippet
28818
28819      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28820$as_echo_n "checking for java in Boot JDK... " >&6; }
28821      JAVA=$BOOT_JDK/bin/java
28822      if test ! -x $JAVA; then
28823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28824$as_echo "not found" >&6; }
28825        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28826$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28827        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28828      fi
28829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28830$as_echo "ok" >&6; }
28831
28832
28833  else
28834    # The variable is set, but is it from the command line or the environment?
28835
28836    # Try to remove the string !JAVA! from our list.
28837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
28838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28839      # If it failed, the variable was not from the command line. Ignore it,
28840      # but warn the user (except for BASH, which is always set by the calling BASH).
28841      if test "xJAVA" != xBASH; then
28842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
28843$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
28844      fi
28845      # Try to locate tool using the code snippet
28846
28847      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
28848$as_echo_n "checking for java in Boot JDK... " >&6; }
28849      JAVA=$BOOT_JDK/bin/java
28850      if test ! -x $JAVA; then
28851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28852$as_echo "not found" >&6; }
28853        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28854$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28855        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
28856      fi
28857      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28858$as_echo "ok" >&6; }
28859
28860
28861    else
28862      # If it succeeded, then it was overridden by the user. We will use it
28863      # for the tool.
28864
28865      # First remove it from the list of overridden variables, so we can test
28866      # for unknown variables in the end.
28867      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28868
28869      # Check if we try to supply an empty value
28870      if test "x$JAVA" = x; then
28871        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
28872$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
28873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28874$as_echo_n "checking for JAVA... " >&6; }
28875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
28876$as_echo "disabled" >&6; }
28877      else
28878        # Check if the provided tool contains a complete path.
28879        tool_specified="$JAVA"
28880        tool_basename="${tool_specified##*/}"
28881        if test "x$tool_basename" = "x$tool_specified"; then
28882          # A command without a complete path is provided, search $PATH.
28883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
28884$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
28885          # Extract the first word of "$tool_basename", so it can be a program name with args.
28886set dummy $tool_basename; ac_word=$2
28887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28888$as_echo_n "checking for $ac_word... " >&6; }
28889if ${ac_cv_path_JAVA+:} false; then :
28890  $as_echo_n "(cached) " >&6
28891else
28892  case $JAVA in
28893  [\\/]* | ?:[\\/]*)
28894  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
28895  ;;
28896  *)
28897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28898for as_dir in $PATH
28899do
28900  IFS=$as_save_IFS
28901  test -z "$as_dir" && as_dir=.
28902    for ac_exec_ext in '' $ac_executable_extensions; do
28903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28904    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
28905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28906    break 2
28907  fi
28908done
28909  done
28910IFS=$as_save_IFS
28911
28912  ;;
28913esac
28914fi
28915JAVA=$ac_cv_path_JAVA
28916if test -n "$JAVA"; then
28917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
28918$as_echo "$JAVA" >&6; }
28919else
28920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28921$as_echo "no" >&6; }
28922fi
28923
28924
28925          if test "x$JAVA" = x; then
28926            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28927          fi
28928        else
28929          # Otherwise we believe it is a complete path. Use it as it is.
28930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
28931$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
28932          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
28933$as_echo_n "checking for JAVA... " >&6; }
28934          if test ! -x "$tool_specified"; then
28935            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28936$as_echo "not found" >&6; }
28937            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
28938          fi
28939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28940$as_echo "$tool_specified" >&6; }
28941        fi
28942      fi
28943    fi
28944
28945  fi
28946
28947
28948
28949  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
28950
28951  # Publish this variable in the help.
28952
28953
28954  if [ -z "${JAVAC+x}" ]; then
28955    # The variable is not set by user, try to locate tool using the code snippet
28956
28957      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28958$as_echo_n "checking for javac in Boot JDK... " >&6; }
28959      JAVAC=$BOOT_JDK/bin/javac
28960      if test ! -x $JAVAC; then
28961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28962$as_echo "not found" >&6; }
28963        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28964$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28965        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28966      fi
28967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28968$as_echo "ok" >&6; }
28969
28970
28971  else
28972    # The variable is set, but is it from the command line or the environment?
28973
28974    # Try to remove the string !JAVAC! from our list.
28975    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
28976    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28977      # If it failed, the variable was not from the command line. Ignore it,
28978      # but warn the user (except for BASH, which is always set by the calling BASH).
28979      if test "xJAVAC" != xBASH; then
28980        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
28981$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
28982      fi
28983      # Try to locate tool using the code snippet
28984
28985      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
28986$as_echo_n "checking for javac in Boot JDK... " >&6; }
28987      JAVAC=$BOOT_JDK/bin/javac
28988      if test ! -x $JAVAC; then
28989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28990$as_echo "not found" >&6; }
28991        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
28992$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
28993        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
28994      fi
28995      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
28996$as_echo "ok" >&6; }
28997
28998
28999    else
29000      # If it succeeded, then it was overridden by the user. We will use it
29001      # for the tool.
29002
29003      # First remove it from the list of overridden variables, so we can test
29004      # for unknown variables in the end.
29005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29006
29007      # Check if we try to supply an empty value
29008      if test "x$JAVAC" = x; then
29009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29010$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29012$as_echo_n "checking for JAVAC... " >&6; }
29013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29014$as_echo "disabled" >&6; }
29015      else
29016        # Check if the provided tool contains a complete path.
29017        tool_specified="$JAVAC"
29018        tool_basename="${tool_specified##*/}"
29019        if test "x$tool_basename" = "x$tool_specified"; then
29020          # A command without a complete path is provided, search $PATH.
29021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29022$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29023          # Extract the first word of "$tool_basename", so it can be a program name with args.
29024set dummy $tool_basename; ac_word=$2
29025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29026$as_echo_n "checking for $ac_word... " >&6; }
29027if ${ac_cv_path_JAVAC+:} false; then :
29028  $as_echo_n "(cached) " >&6
29029else
29030  case $JAVAC in
29031  [\\/]* | ?:[\\/]*)
29032  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29033  ;;
29034  *)
29035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29036for as_dir in $PATH
29037do
29038  IFS=$as_save_IFS
29039  test -z "$as_dir" && as_dir=.
29040    for ac_exec_ext in '' $ac_executable_extensions; do
29041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29042    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29044    break 2
29045  fi
29046done
29047  done
29048IFS=$as_save_IFS
29049
29050  ;;
29051esac
29052fi
29053JAVAC=$ac_cv_path_JAVAC
29054if test -n "$JAVAC"; then
29055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29056$as_echo "$JAVAC" >&6; }
29057else
29058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29059$as_echo "no" >&6; }
29060fi
29061
29062
29063          if test "x$JAVAC" = x; then
29064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29065          fi
29066        else
29067          # Otherwise we believe it is a complete path. Use it as it is.
29068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29069$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29071$as_echo_n "checking for JAVAC... " >&6; }
29072          if test ! -x "$tool_specified"; then
29073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29074$as_echo "not found" >&6; }
29075            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29076          fi
29077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29078$as_echo "$tool_specified" >&6; }
29079        fi
29080      fi
29081    fi
29082
29083  fi
29084
29085
29086
29087  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29088
29089  # Publish this variable in the help.
29090
29091
29092  if [ -z "${JAVAH+x}" ]; then
29093    # The variable is not set by user, try to locate tool using the code snippet
29094
29095      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29096$as_echo_n "checking for javah in Boot JDK... " >&6; }
29097      JAVAH=$BOOT_JDK/bin/javah
29098      if test ! -x $JAVAH; then
29099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29100$as_echo "not found" >&6; }
29101        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29102$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29103        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29104      fi
29105      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29106$as_echo "ok" >&6; }
29107
29108
29109  else
29110    # The variable is set, but is it from the command line or the environment?
29111
29112    # Try to remove the string !JAVAH! from our list.
29113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29115      # If it failed, the variable was not from the command line. Ignore it,
29116      # but warn the user (except for BASH, which is always set by the calling BASH).
29117      if test "xJAVAH" != xBASH; then
29118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29119$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29120      fi
29121      # Try to locate tool using the code snippet
29122
29123      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29124$as_echo_n "checking for javah in Boot JDK... " >&6; }
29125      JAVAH=$BOOT_JDK/bin/javah
29126      if test ! -x $JAVAH; then
29127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29128$as_echo "not found" >&6; }
29129        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29130$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29131        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29132      fi
29133      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29134$as_echo "ok" >&6; }
29135
29136
29137    else
29138      # If it succeeded, then it was overridden by the user. We will use it
29139      # for the tool.
29140
29141      # First remove it from the list of overridden variables, so we can test
29142      # for unknown variables in the end.
29143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29144
29145      # Check if we try to supply an empty value
29146      if test "x$JAVAH" = x; then
29147        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29148$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29149        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29150$as_echo_n "checking for JAVAH... " >&6; }
29151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29152$as_echo "disabled" >&6; }
29153      else
29154        # Check if the provided tool contains a complete path.
29155        tool_specified="$JAVAH"
29156        tool_basename="${tool_specified##*/}"
29157        if test "x$tool_basename" = "x$tool_specified"; then
29158          # A command without a complete path is provided, search $PATH.
29159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29160$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29161          # Extract the first word of "$tool_basename", so it can be a program name with args.
29162set dummy $tool_basename; ac_word=$2
29163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29164$as_echo_n "checking for $ac_word... " >&6; }
29165if ${ac_cv_path_JAVAH+:} false; then :
29166  $as_echo_n "(cached) " >&6
29167else
29168  case $JAVAH in
29169  [\\/]* | ?:[\\/]*)
29170  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29171  ;;
29172  *)
29173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29174for as_dir in $PATH
29175do
29176  IFS=$as_save_IFS
29177  test -z "$as_dir" && as_dir=.
29178    for ac_exec_ext in '' $ac_executable_extensions; do
29179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29180    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29182    break 2
29183  fi
29184done
29185  done
29186IFS=$as_save_IFS
29187
29188  ;;
29189esac
29190fi
29191JAVAH=$ac_cv_path_JAVAH
29192if test -n "$JAVAH"; then
29193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29194$as_echo "$JAVAH" >&6; }
29195else
29196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29197$as_echo "no" >&6; }
29198fi
29199
29200
29201          if test "x$JAVAH" = x; then
29202            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29203          fi
29204        else
29205          # Otherwise we believe it is a complete path. Use it as it is.
29206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29207$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29208          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29209$as_echo_n "checking for JAVAH... " >&6; }
29210          if test ! -x "$tool_specified"; then
29211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29212$as_echo "not found" >&6; }
29213            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29214          fi
29215          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29216$as_echo "$tool_specified" >&6; }
29217        fi
29218      fi
29219    fi
29220
29221  fi
29222
29223
29224
29225  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29226
29227  # Publish this variable in the help.
29228
29229
29230  if [ -z "${JAR+x}" ]; then
29231    # The variable is not set by user, try to locate tool using the code snippet
29232
29233      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29234$as_echo_n "checking for jar in Boot JDK... " >&6; }
29235      JAR=$BOOT_JDK/bin/jar
29236      if test ! -x $JAR; then
29237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29238$as_echo "not found" >&6; }
29239        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29240$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29241        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29242      fi
29243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29244$as_echo "ok" >&6; }
29245
29246
29247  else
29248    # The variable is set, but is it from the command line or the environment?
29249
29250    # Try to remove the string !JAR! from our list.
29251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29253      # If it failed, the variable was not from the command line. Ignore it,
29254      # but warn the user (except for BASH, which is always set by the calling BASH).
29255      if test "xJAR" != xBASH; then
29256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29257$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29258      fi
29259      # Try to locate tool using the code snippet
29260
29261      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29262$as_echo_n "checking for jar in Boot JDK... " >&6; }
29263      JAR=$BOOT_JDK/bin/jar
29264      if test ! -x $JAR; then
29265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29266$as_echo "not found" >&6; }
29267        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29268$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29269        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29270      fi
29271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29272$as_echo "ok" >&6; }
29273
29274
29275    else
29276      # If it succeeded, then it was overridden by the user. We will use it
29277      # for the tool.
29278
29279      # First remove it from the list of overridden variables, so we can test
29280      # for unknown variables in the end.
29281      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29282
29283      # Check if we try to supply an empty value
29284      if test "x$JAR" = x; then
29285        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29286$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29288$as_echo_n "checking for JAR... " >&6; }
29289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29290$as_echo "disabled" >&6; }
29291      else
29292        # Check if the provided tool contains a complete path.
29293        tool_specified="$JAR"
29294        tool_basename="${tool_specified##*/}"
29295        if test "x$tool_basename" = "x$tool_specified"; then
29296          # A command without a complete path is provided, search $PATH.
29297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29298$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29299          # Extract the first word of "$tool_basename", so it can be a program name with args.
29300set dummy $tool_basename; ac_word=$2
29301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29302$as_echo_n "checking for $ac_word... " >&6; }
29303if ${ac_cv_path_JAR+:} false; then :
29304  $as_echo_n "(cached) " >&6
29305else
29306  case $JAR in
29307  [\\/]* | ?:[\\/]*)
29308  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29309  ;;
29310  *)
29311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29312for as_dir in $PATH
29313do
29314  IFS=$as_save_IFS
29315  test -z "$as_dir" && as_dir=.
29316    for ac_exec_ext in '' $ac_executable_extensions; do
29317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29318    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29320    break 2
29321  fi
29322done
29323  done
29324IFS=$as_save_IFS
29325
29326  ;;
29327esac
29328fi
29329JAR=$ac_cv_path_JAR
29330if test -n "$JAR"; then
29331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29332$as_echo "$JAR" >&6; }
29333else
29334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29335$as_echo "no" >&6; }
29336fi
29337
29338
29339          if test "x$JAR" = x; then
29340            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29341          fi
29342        else
29343          # Otherwise we believe it is a complete path. Use it as it is.
29344          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29345$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29346          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29347$as_echo_n "checking for JAR... " >&6; }
29348          if test ! -x "$tool_specified"; then
29349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29350$as_echo "not found" >&6; }
29351            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29352          fi
29353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29354$as_echo "$tool_specified" >&6; }
29355        fi
29356      fi
29357    fi
29358
29359  fi
29360
29361
29362
29363  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29364
29365  # Publish this variable in the help.
29366
29367
29368  if [ -z "${JARSIGNER+x}" ]; then
29369    # The variable is not set by user, try to locate tool using the code snippet
29370
29371      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29372$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29373      JARSIGNER=$BOOT_JDK/bin/jarsigner
29374      if test ! -x $JARSIGNER; then
29375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29376$as_echo "not found" >&6; }
29377        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29378$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29379        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29380      fi
29381      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29382$as_echo "ok" >&6; }
29383
29384
29385  else
29386    # The variable is set, but is it from the command line or the environment?
29387
29388    # Try to remove the string !JARSIGNER! from our list.
29389    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
29390    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29391      # If it failed, the variable was not from the command line. Ignore it,
29392      # but warn the user (except for BASH, which is always set by the calling BASH).
29393      if test "xJARSIGNER" != xBASH; then
29394        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
29395$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
29396      fi
29397      # Try to locate tool using the code snippet
29398
29399      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29400$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29401      JARSIGNER=$BOOT_JDK/bin/jarsigner
29402      if test ! -x $JARSIGNER; then
29403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29404$as_echo "not found" >&6; }
29405        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29406$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29407        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29408      fi
29409      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29410$as_echo "ok" >&6; }
29411
29412
29413    else
29414      # If it succeeded, then it was overridden by the user. We will use it
29415      # for the tool.
29416
29417      # First remove it from the list of overridden variables, so we can test
29418      # for unknown variables in the end.
29419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29420
29421      # Check if we try to supply an empty value
29422      if test "x$JARSIGNER" = x; then
29423        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
29424$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
29425        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29426$as_echo_n "checking for JARSIGNER... " >&6; }
29427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29428$as_echo "disabled" >&6; }
29429      else
29430        # Check if the provided tool contains a complete path.
29431        tool_specified="$JARSIGNER"
29432        tool_basename="${tool_specified##*/}"
29433        if test "x$tool_basename" = "x$tool_specified"; then
29434          # A command without a complete path is provided, search $PATH.
29435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
29436$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
29437          # Extract the first word of "$tool_basename", so it can be a program name with args.
29438set dummy $tool_basename; ac_word=$2
29439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29440$as_echo_n "checking for $ac_word... " >&6; }
29441if ${ac_cv_path_JARSIGNER+:} false; then :
29442  $as_echo_n "(cached) " >&6
29443else
29444  case $JARSIGNER in
29445  [\\/]* | ?:[\\/]*)
29446  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
29447  ;;
29448  *)
29449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29450for as_dir in $PATH
29451do
29452  IFS=$as_save_IFS
29453  test -z "$as_dir" && as_dir=.
29454    for ac_exec_ext in '' $ac_executable_extensions; do
29455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29456    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
29457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29458    break 2
29459  fi
29460done
29461  done
29462IFS=$as_save_IFS
29463
29464  ;;
29465esac
29466fi
29467JARSIGNER=$ac_cv_path_JARSIGNER
29468if test -n "$JARSIGNER"; then
29469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
29470$as_echo "$JARSIGNER" >&6; }
29471else
29472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29473$as_echo "no" >&6; }
29474fi
29475
29476
29477          if test "x$JARSIGNER" = x; then
29478            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29479          fi
29480        else
29481          # Otherwise we believe it is a complete path. Use it as it is.
29482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
29483$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
29484          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
29485$as_echo_n "checking for JARSIGNER... " >&6; }
29486          if test ! -x "$tool_specified"; then
29487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29488$as_echo "not found" >&6; }
29489            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
29490          fi
29491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29492$as_echo "$tool_specified" >&6; }
29493        fi
29494      fi
29495    fi
29496
29497  fi
29498
29499
29500
29501  # Finally, set some other options...
29502
29503  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
29504  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
29505
29506
29507
29508  # Check if the boot jdk is 32 or 64 bit
29509  if "$JAVA" -d64 -version > /dev/null 2>&1; then
29510    BOOT_JDK_BITS="64"
29511  else
29512    BOOT_JDK_BITS="32"
29513  fi
29514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
29515$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
29516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
29517$as_echo "$BOOT_JDK_BITS" >&6; }
29518
29519
29520
29521###############################################################################
29522#
29523# Configure the sources to use. We can add or override individual directories.
29524#
29525###############################################################################
29526
29527
29528  # Where are the sources.
29529  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
29530  CORBA_TOPDIR="$SRC_ROOT/corba"
29531  JAXP_TOPDIR="$SRC_ROOT/jaxp"
29532  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
29533  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
29534  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
29535  JDK_TOPDIR="$SRC_ROOT/jdk"
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545  # This feature is no longer supported.
29546
29547
29548
29549# Check whether --with-add-source-root was given.
29550if test "${with_add_source_root+set}" = set; then :
29551  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
29552$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
29553fi
29554
29555
29556
29557
29558# Check whether --with-override-source-root was given.
29559if test "${with_override_source_root+set}" = set; then :
29560  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
29561$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
29562fi
29563
29564
29565
29566
29567# Check whether --with-adds-and-overrides was given.
29568if test "${with_adds_and_overrides+set}" = set; then :
29569  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
29570$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
29571fi
29572
29573
29574
29575
29576# Check whether --with-override-langtools was given.
29577if test "${with_override_langtools+set}" = set; then :
29578  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
29579$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
29580fi
29581
29582
29583
29584
29585# Check whether --with-override-corba was given.
29586if test "${with_override_corba+set}" = set; then :
29587  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
29588$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
29589fi
29590
29591
29592
29593
29594# Check whether --with-override-jaxp was given.
29595if test "${with_override_jaxp+set}" = set; then :
29596  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
29597$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
29598fi
29599
29600
29601
29602
29603# Check whether --with-override-jaxws was given.
29604if test "${with_override_jaxws+set}" = set; then :
29605  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
29606$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
29607fi
29608
29609
29610
29611
29612# Check whether --with-override-hotspot was given.
29613if test "${with_override_hotspot+set}" = set; then :
29614  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
29615$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
29616fi
29617
29618
29619
29620
29621# Check whether --with-override-nashorn was given.
29622if test "${with_override_nashorn+set}" = set; then :
29623  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
29624$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
29625fi
29626
29627
29628
29629
29630# Check whether --with-override-jdk was given.
29631if test "${with_override_jdk+set}" = set; then :
29632  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
29633$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
29634fi
29635
29636
29637
29638
29639  BUILD_OUTPUT="$OUTPUT_ROOT"
29640
29641
29642  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
29643  BUILD_HOTSPOT=true
29644
29645
29646
29647# Check whether --with-import-hotspot was given.
29648if test "${with_import_hotspot+set}" = set; then :
29649  withval=$with_import_hotspot;
29650fi
29651
29652  if test "x$with_import_hotspot" != x; then
29653    CURDIR="$PWD"
29654    cd "$with_import_hotspot"
29655    HOTSPOT_DIST="`pwd`"
29656    cd "$CURDIR"
29657    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
29658      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
29659    fi
29660    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
29661$as_echo_n "checking if hotspot should be imported... " >&6; }
29662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
29663$as_echo "yes from $HOTSPOT_DIST" >&6; }
29664    BUILD_HOTSPOT=false
29665  fi
29666
29667  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
29668
29669
29670###############################################################################
29671#
29672# Setup the toolchain (compilers etc), i.e. tools used to compile and process
29673# native code.
29674#
29675###############################################################################
29676
29677# See if we are doing a complete static build or not
29678
29679  # Check whether --enable-static-build was given.
29680if test "${enable_static_build+set}" = set; then :
29681  enableval=$enable_static_build;
29682fi
29683
29684  STATIC_BUILD=false
29685  if test "x$enable_static_build" = "xyes"; then
29686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29687$as_echo_n "checking if static build is enabled... " >&6; }
29688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29689$as_echo "yes" >&6; }
29690    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
29691      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
29692    fi
29693    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
29694    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
29695    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
29696    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29697    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
29698    STATIC_BUILD=true
29699  elif test "x$enable_static_build" = "xno"; then
29700    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
29701$as_echo_n "checking if static build is enabled... " >&6; }
29702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29703$as_echo "no" >&6; }
29704  elif test "x$enable_static_build" != "x"; then
29705    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
29706  fi
29707
29708
29709
29710
29711# First determine the toolchain type (compiler family)
29712
29713
29714# Check whether --with-toolchain-type was given.
29715if test "${with_toolchain_type+set}" = set; then :
29716  withval=$with_toolchain_type;
29717fi
29718
29719
29720  # Use indirect variable referencing
29721  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
29722  VALID_TOOLCHAINS=${!toolchain_var_name}
29723
29724  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29725    if test -n "$XCODEBUILD"; then
29726      # On Mac OS X, default toolchain to clang after Xcode 5
29727      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
29728      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
29729      if test $? -ne 0; then
29730        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
29731      fi
29732      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
29733          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
29734          $CUT -f 1 -d .`
29735      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
29736$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
29737      if test $XCODE_MAJOR_VERSION -ge 5; then
29738          DEFAULT_TOOLCHAIN="clang"
29739      else
29740          DEFAULT_TOOLCHAIN="gcc"
29741      fi
29742    else
29743      # If Xcode is not installed, but the command line tools are
29744      # then we can't run xcodebuild. On these systems we should
29745      # default to clang
29746      DEFAULT_TOOLCHAIN="clang"
29747    fi
29748  else
29749    # First toolchain type in the list is the default
29750    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
29751  fi
29752
29753  if test "x$with_toolchain_type" = xlist; then
29754    # List all toolchains
29755    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
29756$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
29757    for toolchain in $VALID_TOOLCHAINS; do
29758      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
29759      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29760      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
29761    done
29762
29763    exit 0
29764  elif test "x$with_toolchain_type" != x; then
29765    # User override; check that it is valid
29766    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
29767      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
29768$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
29769      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
29770$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
29771      as_fn_error $? "Cannot continue." "$LINENO" 5
29772    fi
29773    TOOLCHAIN_TYPE=$with_toolchain_type
29774  else
29775    # No flag given, use default
29776    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
29777  fi
29778
29779
29780  TOOLCHAIN_CC_BINARY_clang="clang"
29781  TOOLCHAIN_CC_BINARY_gcc="gcc"
29782  TOOLCHAIN_CC_BINARY_microsoft="cl"
29783  TOOLCHAIN_CC_BINARY_solstudio="cc"
29784  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
29785
29786  TOOLCHAIN_CXX_BINARY_clang="clang++"
29787  TOOLCHAIN_CXX_BINARY_gcc="g++"
29788  TOOLCHAIN_CXX_BINARY_microsoft="cl"
29789  TOOLCHAIN_CXX_BINARY_solstudio="CC"
29790  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
29791
29792  # Use indirect variable referencing
29793  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
29794  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
29795  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
29796  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
29797  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
29798  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
29799
29800
29801  # Define filename patterns
29802  if test "x$OPENJDK_TARGET_OS" = xwindows; then
29803    LIBRARY_PREFIX=
29804    SHARED_LIBRARY_SUFFIX='.dll'
29805    STATIC_LIBRARY_SUFFIX='.lib'
29806    SHARED_LIBRARY='$1.dll'
29807    STATIC_LIBRARY='$1.lib'
29808    OBJ_SUFFIX='.obj'
29809    EXE_SUFFIX='.exe'
29810  else
29811    LIBRARY_PREFIX=lib
29812    SHARED_LIBRARY_SUFFIX='.so'
29813    STATIC_LIBRARY_SUFFIX='.a'
29814    SHARED_LIBRARY='lib$1.so'
29815    STATIC_LIBRARY='lib$1.a'
29816    OBJ_SUFFIX='.o'
29817    EXE_SUFFIX=''
29818    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29819      # For full static builds, we're overloading the SHARED_LIBRARY
29820      # variables in order to limit the amount of changes required.
29821      # It would be better to remove SHARED and just use LIBRARY and
29822      # LIBRARY_SUFFIX for libraries that can be built either
29823      # shared or static and use STATIC_* for libraries that are
29824      # always built statically.
29825      if test "x$STATIC_BUILD" = xtrue; then
29826        SHARED_LIBRARY='lib$1.a'
29827        SHARED_LIBRARY_SUFFIX='.a'
29828      else
29829        SHARED_LIBRARY='lib$1.dylib'
29830        SHARED_LIBRARY_SUFFIX='.dylib'
29831      fi
29832    fi
29833  fi
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
29845    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
29846$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
29847  else
29848    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
29849$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
29850  fi
29851
29852
29853# User supplied flags should be used when configure detects compilers
29854
29855  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29856    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29857$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29858  fi
29859
29860  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29861    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29862$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29863  fi
29864
29865  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29866    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29867$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29868  fi
29869
29870
29871# Check whether --with-extra-cflags was given.
29872if test "${with_extra_cflags+set}" = set; then :
29873  withval=$with_extra_cflags;
29874fi
29875
29876
29877
29878# Check whether --with-extra-cxxflags was given.
29879if test "${with_extra_cxxflags+set}" = set; then :
29880  withval=$with_extra_cxxflags;
29881fi
29882
29883
29884
29885# Check whether --with-extra-ldflags was given.
29886if test "${with_extra_ldflags+set}" = set; then :
29887  withval=$with_extra_ldflags;
29888fi
29889
29890
29891  EXTRA_CFLAGS="$with_extra_cflags"
29892  EXTRA_CXXFLAGS="$with_extra_cxxflags"
29893  EXTRA_LDFLAGS="$with_extra_ldflags"
29894
29895  # Hotspot needs these set in their legacy form
29896  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
29897  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
29898  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
29899
29900
29901
29902
29903
29904  # The global CFLAGS and LDLAGS variables are used by configure tests and
29905  # should include the extra parameters
29906  CFLAGS="$EXTRA_CFLAGS"
29907  CXXFLAGS="$EXTRA_CXXFLAGS"
29908  LDFLAGS="$EXTRA_LDFLAGS"
29909  CPPFLAGS=""
29910
29911# The sysroot cflags are needed for configure to be able to run the compilers
29912
29913  if test "x$SYSROOT" != "x"; then
29914    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29915      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29916        # Solaris Studio does not have a concept of sysroot. Instead we must
29917        # make sure the default include and lib dirs are appended to each
29918        # compile and link command line.
29919        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
29920        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
29921            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
29922            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
29923      fi
29924    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
29925      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
29926      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
29927    elif test "x$TOOLCHAIN_TYPE" = xclang; then
29928      SYSROOT_CFLAGS="-isysroot $SYSROOT"
29929      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
29930    fi
29931    # Propagate the sysroot args to hotspot
29932    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
29933    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
29934    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
29935    # The global CFLAGS and LDFLAGS variables need these for configure to function
29936    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
29937    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
29938    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
29939    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
29940  fi
29941
29942  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29943    # We also need -iframework<path>/System/Library/Frameworks
29944    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29945    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
29946    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
29947    # set this here so it doesn't have to be peppered throughout the forest
29948    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29949    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
29950  fi
29951
29952
29953
29954
29955
29956# Then detect the actual binaries needed
29957
29958  # FIXME: Is this needed?
29959  ac_ext=cpp
29960ac_cpp='$CXXCPP $CPPFLAGS'
29961ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29962ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29963ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29964
29965
29966  # Store the CFLAGS etc passed to the configure script.
29967  ORG_CFLAGS="$CFLAGS"
29968  ORG_CXXFLAGS="$CXXFLAGS"
29969
29970  # autoconf magic only relies on PATH, so update it if tools dir is specified
29971  OLD_PATH="$PATH"
29972
29973  # On Windows, we need to detect the visual studio installation first.
29974  # This will change the PATH, but we need to keep that new PATH even
29975  # after toolchain detection is done, since the compiler (on x86) uses
29976  # it for DLL resolution in runtime.
29977  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
29978      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
29979
29980  # Store path to cygwin link.exe to help excluding it when searching for
29981  # VS linker. This must be done before changing the PATH when looking for VS.
29982  # Extract the first word of "link", so it can be a program name with args.
29983set dummy link; ac_word=$2
29984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29985$as_echo_n "checking for $ac_word... " >&6; }
29986if ${ac_cv_path_CYGWIN_LINK+:} false; then :
29987  $as_echo_n "(cached) " >&6
29988else
29989  case $CYGWIN_LINK in
29990  [\\/]* | ?:[\\/]*)
29991  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
29992  ;;
29993  *)
29994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29995for as_dir in $PATH
29996do
29997  IFS=$as_save_IFS
29998  test -z "$as_dir" && as_dir=.
29999    for ac_exec_ext in '' $ac_executable_extensions; do
30000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30001    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
30002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30003    break 2
30004  fi
30005done
30006  done
30007IFS=$as_save_IFS
30008
30009  ;;
30010esac
30011fi
30012CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
30013if test -n "$CYGWIN_LINK"; then
30014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
30015$as_echo "$CYGWIN_LINK" >&6; }
30016else
30017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30018$as_echo "no" >&6; }
30019fi
30020
30021
30022  if test "x$CYGWIN_LINK" != x; then
30023    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
30024$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
30025    "$CYGWIN_LINK" --version > /dev/null
30026    if test $? -eq 0 ; then
30027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30028$as_echo "yes" >&6; }
30029    else
30030      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30031$as_echo "no" >&6; }
30032      # This might be the VS linker. Don't exclude it later on.
30033      CYGWIN_LINK=""
30034    fi
30035  fi
30036
30037  # First-hand choice is to locate and run the vsvars bat file.
30038
30039
30040# Check whether --with-toolchain-version was given.
30041if test "${with_toolchain_version+set}" = set; then :
30042  withval=$with_toolchain_version;
30043fi
30044
30045
30046  if test "x$with_toolchain_version" = xlist; then
30047    # List all toolchains
30048    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
30049$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
30050    for version in $VALID_VS_VERSIONS; do
30051      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
30052      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
30053    done
30054
30055    exit 0
30056  elif test "x$DEVKIT_VS_VERSION" != x; then
30057    VS_VERSION=$DEVKIT_VS_VERSION
30058    TOOLCHAIN_VERSION=$VS_VERSION
30059    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30060    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30061    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30062    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30063    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30064    VS_PATH="$TOOLCHAIN_PATH:$PATH"
30065
30066    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
30067    # can still be exported as INCLUDE for compiler invocations without
30068    # SYSROOT_CFLAGS
30069    OLDIFS="$IFS"
30070    IFS=";"
30071    for i in $DEVKIT_VS_INCLUDE; do
30072      ipath=$i
30073
30074  unix_path="$ipath"
30075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30076    windows_path=`$CYGPATH -m "$unix_path"`
30077    ipath="$windows_path"
30078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30079    windows_path=`cmd //c echo $unix_path`
30080    ipath="$windows_path"
30081  fi
30082
30083      VS_INCLUDE="$VS_INCLUDE;$ipath"
30084    done
30085    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
30086    # as LIB for compiler invocations without SYSROOT_LDFLAGS
30087    for i in $DEVKIT_VS_LIB; do
30088      libpath=$i
30089
30090  unix_path="$libpath"
30091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30092    windows_path=`$CYGPATH -m "$unix_path"`
30093    libpath="$windows_path"
30094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30095    windows_path=`cmd //c echo $unix_path`
30096    libpath="$windows_path"
30097  fi
30098
30099      VS_LIB="$VS_LIB;$libpath"
30100    done
30101    IFS="$OLDIFS"
30102
30103    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
30104$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
30105
30106  elif test "x$with_toolchain_version" != x; then
30107    # User override; check that it is valid
30108    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
30109      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
30110$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
30111      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
30112$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
30113      as_fn_error $? "Cannot continue." "$LINENO" 5
30114    fi
30115    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
30116  else
30117    # No flag given, use default
30118    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
30119  fi
30120
30121  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
30122
30123  VS_VERSION="$VS_VERSION"
30124  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
30125  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
30126  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
30127  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
30128
30129  # When using --with-tools-dir, assume it points to the correct and default
30130  # version of Visual Studio or that --with-toolchain-version was also set.
30131  if test "x$with_tools_dir" != x; then
30132
30133  if test "x$VS_ENV_CMD" = x; then
30134    VS_VERSION="${VS_VERSION}"
30135    VS_BASE="$with_tools_dir/../.."
30136    METHOD="--with-tools-dir"
30137
30138    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30139      VCVARSFILE="vc/bin/vcvars32.bat"
30140    else
30141      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30142    fi
30143
30144
30145  windows_path="$VS_BASE"
30146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30147    unix_path=`$CYGPATH -u "$windows_path"`
30148    VS_BASE="$unix_path"
30149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30151    VS_BASE="$unix_path"
30152  fi
30153
30154    if test -d "$VS_BASE"; then
30155      if test -f "$VS_BASE/$VCVARSFILE"; then
30156        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30157$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30158        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30159        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30160        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30161        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30162      else
30163        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30164$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30165        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30166$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30167      fi
30168    fi
30169  fi
30170
30171
30172  if test "x$VS_ENV_CMD" = x; then
30173    VS_VERSION="${VS_VERSION}"
30174    VS_BASE="$with_tools_dir/../../.."
30175    METHOD="--with-tools-dir"
30176
30177    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30178      VCVARSFILE="vc/bin/vcvars32.bat"
30179    else
30180      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30181    fi
30182
30183
30184  windows_path="$VS_BASE"
30185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30186    unix_path=`$CYGPATH -u "$windows_path"`
30187    VS_BASE="$unix_path"
30188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30190    VS_BASE="$unix_path"
30191  fi
30192
30193    if test -d "$VS_BASE"; then
30194      if test -f "$VS_BASE/$VCVARSFILE"; then
30195        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30196$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30197        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30198        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30199        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30200        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30201      else
30202        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30203$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30204        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30205$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30206      fi
30207    fi
30208  fi
30209
30210    if test "x$VS_ENV_CMD" = x; then
30211      # Having specified an argument which is incorrect will produce an instant failure;
30212      # we should not go on looking
30213      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
30214$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
30215      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
30216$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
30217      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
30218$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
30219      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
30220    fi
30221  fi
30222
30223  VS_ENV_CMD=""
30224  VS_ENV_ARGS=""
30225
30226  if test "x$VS_COMNTOOLS" != x; then
30227
30228  if test "x$VS_ENV_CMD" = x; then
30229    VS_VERSION="${VS_VERSION}"
30230    VS_BASE="$VS_COMNTOOLS/../.."
30231    METHOD="$VS_COMNTOOLS_VAR variable"
30232
30233    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30234      VCVARSFILE="vc/bin/vcvars32.bat"
30235    else
30236      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30237    fi
30238
30239
30240  windows_path="$VS_BASE"
30241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30242    unix_path=`$CYGPATH -u "$windows_path"`
30243    VS_BASE="$unix_path"
30244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30246    VS_BASE="$unix_path"
30247  fi
30248
30249    if test -d "$VS_BASE"; then
30250      if test -f "$VS_BASE/$VCVARSFILE"; then
30251        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30252$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30253        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30254        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30255        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30256        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30257      else
30258        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30259$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30260        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30261$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30262      fi
30263    fi
30264  fi
30265
30266  fi
30267  if test "x$PROGRAMFILES" != x; then
30268
30269  if test "x$VS_ENV_CMD" = x; then
30270    VS_VERSION="${VS_VERSION}"
30271    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
30272    METHOD="well-known name"
30273
30274    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30275      VCVARSFILE="vc/bin/vcvars32.bat"
30276    else
30277      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30278    fi
30279
30280
30281  windows_path="$VS_BASE"
30282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30283    unix_path=`$CYGPATH -u "$windows_path"`
30284    VS_BASE="$unix_path"
30285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30287    VS_BASE="$unix_path"
30288  fi
30289
30290    if test -d "$VS_BASE"; then
30291      if test -f "$VS_BASE/$VCVARSFILE"; then
30292        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30293$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30294        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30295        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30296        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30297        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30298      else
30299        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30300$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30301        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30302$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30303      fi
30304    fi
30305  fi
30306
30307  fi
30308  # Work around the insanely named ProgramFiles(x86) env variable
30309  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
30310  if test "x$PROGRAMFILES_X86" != x; then
30311
30312  if test "x$VS_ENV_CMD" = x; then
30313    VS_VERSION="${VS_VERSION}"
30314    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
30315    METHOD="well-known name"
30316
30317    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30318      VCVARSFILE="vc/bin/vcvars32.bat"
30319    else
30320      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30321    fi
30322
30323
30324  windows_path="$VS_BASE"
30325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30326    unix_path=`$CYGPATH -u "$windows_path"`
30327    VS_BASE="$unix_path"
30328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30330    VS_BASE="$unix_path"
30331  fi
30332
30333    if test -d "$VS_BASE"; then
30334      if test -f "$VS_BASE/$VCVARSFILE"; then
30335        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30336$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30337        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30338        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30339        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30340        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30341      else
30342        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30343$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30344        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30345$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30346      fi
30347    fi
30348  fi
30349
30350  fi
30351
30352  if test "x$VS_ENV_CMD" = x; then
30353    VS_VERSION="${VS_VERSION}"
30354    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
30355    METHOD="well-known name"
30356
30357    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30358      VCVARSFILE="vc/bin/vcvars32.bat"
30359    else
30360      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30361    fi
30362
30363
30364  windows_path="$VS_BASE"
30365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30366    unix_path=`$CYGPATH -u "$windows_path"`
30367    VS_BASE="$unix_path"
30368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30370    VS_BASE="$unix_path"
30371  fi
30372
30373    if test -d "$VS_BASE"; then
30374      if test -f "$VS_BASE/$VCVARSFILE"; then
30375        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30376$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30377        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30378        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30379        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30380        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30381      else
30382        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30383$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30384        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30385$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30386      fi
30387    fi
30388  fi
30389
30390
30391  if test "x$VS_ENV_CMD" = x; then
30392    VS_VERSION="${VS_VERSION}"
30393    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
30394    METHOD="well-known name"
30395
30396    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30397      VCVARSFILE="vc/bin/vcvars32.bat"
30398    else
30399      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
30400    fi
30401
30402
30403  windows_path="$VS_BASE"
30404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30405    unix_path=`$CYGPATH -u "$windows_path"`
30406    VS_BASE="$unix_path"
30407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30409    VS_BASE="$unix_path"
30410  fi
30411
30412    if test -d "$VS_BASE"; then
30413      if test -f "$VS_BASE/$VCVARSFILE"; then
30414        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30415$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30416        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
30417        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30418        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
30419        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
30420      else
30421        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
30422$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
30423        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
30424$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
30425      fi
30426    fi
30427  fi
30428
30429
30430  if test "x$SDK_INSTALL_DIR" != x; then
30431    if test "x$ProgramW6432" != x; then
30432
30433  if test "x$VS_ENV_CMD" = x; then
30434    VS_VERSION="${VS_VERSION}"
30435    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
30436    METHOD="well-known name"
30437
30438  windows_path="$WIN_SDK_BASE"
30439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30440    unix_path=`$CYGPATH -u "$windows_path"`
30441    WIN_SDK_BASE="$unix_path"
30442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30444    WIN_SDK_BASE="$unix_path"
30445  fi
30446
30447    if test -d "$WIN_SDK_BASE"; then
30448      # There have been cases of partial or broken SDK installations. A missing
30449      # lib dir is not going to work.
30450      if test ! -d "$WIN_SDK_BASE/lib"; then
30451        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30452$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30453        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30454$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30455      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30456        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30457$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30458        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30459        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30460          VS_ENV_ARGS="/x86"
30461        else
30462          VS_ENV_ARGS="/x64"
30463        fi
30464        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30465        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30466        # TODO: improve detection for other versions of SDK
30467        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30468      else
30469        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30470$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30471        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30472$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30473      fi
30474    fi
30475  fi
30476
30477    fi
30478    if test "x$PROGRAMW6432" != x; then
30479
30480  if test "x$VS_ENV_CMD" = x; then
30481    VS_VERSION="${VS_VERSION}"
30482    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
30483    METHOD="well-known name"
30484
30485  windows_path="$WIN_SDK_BASE"
30486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30487    unix_path=`$CYGPATH -u "$windows_path"`
30488    WIN_SDK_BASE="$unix_path"
30489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30491    WIN_SDK_BASE="$unix_path"
30492  fi
30493
30494    if test -d "$WIN_SDK_BASE"; then
30495      # There have been cases of partial or broken SDK installations. A missing
30496      # lib dir is not going to work.
30497      if test ! -d "$WIN_SDK_BASE/lib"; then
30498        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30499$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30500        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30501$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30502      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30503        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30504$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30505        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30506        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30507          VS_ENV_ARGS="/x86"
30508        else
30509          VS_ENV_ARGS="/x64"
30510        fi
30511        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30512        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30513        # TODO: improve detection for other versions of SDK
30514        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30515      else
30516        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30517$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30518        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30519$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30520      fi
30521    fi
30522  fi
30523
30524    fi
30525    if test "x$PROGRAMFILES" != x; then
30526
30527  if test "x$VS_ENV_CMD" = x; then
30528    VS_VERSION="${VS_VERSION}"
30529    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
30530    METHOD="well-known name"
30531
30532  windows_path="$WIN_SDK_BASE"
30533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30534    unix_path=`$CYGPATH -u "$windows_path"`
30535    WIN_SDK_BASE="$unix_path"
30536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30538    WIN_SDK_BASE="$unix_path"
30539  fi
30540
30541    if test -d "$WIN_SDK_BASE"; then
30542      # There have been cases of partial or broken SDK installations. A missing
30543      # lib dir is not going to work.
30544      if test ! -d "$WIN_SDK_BASE/lib"; then
30545        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30546$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30547        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30548$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30549      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30550        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30551$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30552        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30553        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30554          VS_ENV_ARGS="/x86"
30555        else
30556          VS_ENV_ARGS="/x64"
30557        fi
30558        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30559        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30560        # TODO: improve detection for other versions of SDK
30561        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30562      else
30563        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30564$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30565        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30566$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30567      fi
30568    fi
30569  fi
30570
30571    fi
30572
30573  if test "x$VS_ENV_CMD" = x; then
30574    VS_VERSION="${VS_VERSION}"
30575    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
30576    METHOD="well-known name"
30577
30578  windows_path="$WIN_SDK_BASE"
30579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30580    unix_path=`$CYGPATH -u "$windows_path"`
30581    WIN_SDK_BASE="$unix_path"
30582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30584    WIN_SDK_BASE="$unix_path"
30585  fi
30586
30587    if test -d "$WIN_SDK_BASE"; then
30588      # There have been cases of partial or broken SDK installations. A missing
30589      # lib dir is not going to work.
30590      if test ! -d "$WIN_SDK_BASE/lib"; then
30591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30592$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30593        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30594$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30595      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30596        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30597$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30598        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30599        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30600          VS_ENV_ARGS="/x86"
30601        else
30602          VS_ENV_ARGS="/x64"
30603        fi
30604        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30605        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30606        # TODO: improve detection for other versions of SDK
30607        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30608      else
30609        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30610$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30611        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30612$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30613      fi
30614    fi
30615  fi
30616
30617
30618  if test "x$VS_ENV_CMD" = x; then
30619    VS_VERSION="${VS_VERSION}"
30620    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
30621    METHOD="well-known name"
30622
30623  windows_path="$WIN_SDK_BASE"
30624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30625    unix_path=`$CYGPATH -u "$windows_path"`
30626    WIN_SDK_BASE="$unix_path"
30627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30629    WIN_SDK_BASE="$unix_path"
30630  fi
30631
30632    if test -d "$WIN_SDK_BASE"; then
30633      # There have been cases of partial or broken SDK installations. A missing
30634      # lib dir is not going to work.
30635      if test ! -d "$WIN_SDK_BASE/lib"; then
30636        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30637$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30638        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
30639$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
30640      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
30641        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30642$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30643        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
30644        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
30645          VS_ENV_ARGS="/x86"
30646        else
30647          VS_ENV_ARGS="/x64"
30648        fi
30649        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
30650        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
30651        # TODO: improve detection for other versions of SDK
30652        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
30653      else
30654        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
30655$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
30656        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
30657$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
30658      fi
30659    fi
30660  fi
30661
30662  fi
30663
30664    if test "x$VS_ENV_CMD" != x; then
30665      TOOLCHAIN_VERSION=$VS_VERSION
30666      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
30667      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
30668      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
30669      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
30670      # The rest of the variables are already evaled while probing
30671      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
30672$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
30673      break
30674    fi
30675  done
30676
30677
30678  # If we have a devkit, skip all of the below.
30679  if test "x$DEVKIT_VS_VERSION" = x; then
30680    if test "x$VS_ENV_CMD" != x; then
30681      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
30682
30683  # Only process if variable expands to non-empty
30684
30685  if test "x$VS_ENV_CMD" != x; then
30686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30687
30688  # First separate the path from the arguments. This will split at the first
30689  # space.
30690  complete="$VS_ENV_CMD"
30691  path="${complete%% *}"
30692  tmp="$complete EOL"
30693  arguments="${tmp#* }"
30694
30695  # Input might be given as Windows format, start by converting to
30696  # unix format.
30697  new_path=`$CYGPATH -u "$path"`
30698
30699  # Now try to locate executable using which
30700  new_path=`$WHICH "$new_path" 2> /dev/null`
30701  # bat and cmd files are not always considered executable in cygwin causing which
30702  # to not find them
30703  if test "x$new_path" = x \
30704      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30705      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30706    new_path=`$CYGPATH -u "$path"`
30707  fi
30708  if test "x$new_path" = x; then
30709    # Oops. Which didn't find the executable.
30710    # The splitting of arguments from the executable at a space might have been incorrect,
30711    # since paths with space are more likely in Windows. Give it another try with the whole
30712    # argument.
30713    path="$complete"
30714    arguments="EOL"
30715    new_path=`$CYGPATH -u "$path"`
30716    new_path=`$WHICH "$new_path" 2> /dev/null`
30717    # bat and cmd files are not always considered executable in cygwin causing which
30718    # to not find them
30719    if test "x$new_path" = x \
30720        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30721        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30722      new_path=`$CYGPATH -u "$path"`
30723    fi
30724    if test "x$new_path" = x; then
30725      # It's still not found. Now this is an unrecoverable error.
30726      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30727$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30728      has_space=`$ECHO "$complete" | $GREP " "`
30729      if test "x$has_space" != x; then
30730        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30731$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30732      fi
30733      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30734    fi
30735  fi
30736
30737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30740  # "foo.exe" is OK but "foo" is an error.
30741  #
30742  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30743  # It is also a way to make sure we got the proper file name for the real test later on.
30744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30745  if test "x$test_shortpath" = x; then
30746    # Short path failed, file does not exist as specified.
30747    # Try adding .exe or .cmd
30748    if test -f "${new_path}.exe"; then
30749      input_to_shortpath="${new_path}.exe"
30750    elif test -f "${new_path}.cmd"; then
30751      input_to_shortpath="${new_path}.cmd"
30752    else
30753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
30754$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
30755      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30756$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30757      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30758    fi
30759  else
30760    input_to_shortpath="$new_path"
30761  fi
30762
30763  # Call helper function which possibly converts this using DOS-style short mode.
30764  # If so, the updated path is stored in $new_path.
30765  new_path="$input_to_shortpath"
30766
30767  input_path="$input_to_shortpath"
30768  # Check if we need to convert this using DOS-style short mode. If the path
30769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30770  # take no chances and rewrite it.
30771  # Note: m4 eats our [], so we need to use [ and ] instead.
30772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30773  if test "x$has_forbidden_chars" != x; then
30774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30778      # Going to short mode and back again did indeed matter. Since short mode is
30779      # case insensitive, let's make it lowercase to improve readability.
30780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30781      # Now convert it back to Unix-style (cygpath)
30782      input_path=`$CYGPATH -u "$shortmode_path"`
30783      new_path="$input_path"
30784    fi
30785  fi
30786
30787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30788  if test "x$test_cygdrive_prefix" = x; then
30789    # As a simple fix, exclude /usr/bin since it's not a real path.
30790    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30792      # a path prefixed by /cygdrive for fixpath to work.
30793      new_path="$CYGWIN_ROOT_PATH$input_path"
30794    fi
30795  fi
30796
30797  # remove trailing .exe if any
30798  new_path="${new_path/%.exe/}"
30799
30800    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30801
30802  # First separate the path from the arguments. This will split at the first
30803  # space.
30804  complete="$VS_ENV_CMD"
30805  path="${complete%% *}"
30806  tmp="$complete EOL"
30807  arguments="${tmp#* }"
30808
30809  # Input might be given as Windows format, start by converting to
30810  # unix format.
30811  new_path="$path"
30812
30813  windows_path="$new_path"
30814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30815    unix_path=`$CYGPATH -u "$windows_path"`
30816    new_path="$unix_path"
30817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30819    new_path="$unix_path"
30820  fi
30821
30822
30823  # Now try to locate executable using which
30824  new_path=`$WHICH "$new_path" 2> /dev/null`
30825
30826  if test "x$new_path" = x; then
30827    # Oops. Which didn't find the executable.
30828    # The splitting of arguments from the executable at a space might have been incorrect,
30829    # since paths with space are more likely in Windows. Give it another try with the whole
30830    # argument.
30831    path="$complete"
30832    arguments="EOL"
30833    new_path="$path"
30834
30835  windows_path="$new_path"
30836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30837    unix_path=`$CYGPATH -u "$windows_path"`
30838    new_path="$unix_path"
30839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30841    new_path="$unix_path"
30842  fi
30843
30844
30845    new_path=`$WHICH "$new_path" 2> /dev/null`
30846    # bat and cmd files are not always considered executable in MSYS causing which
30847    # to not find them
30848    if test "x$new_path" = x \
30849        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30850        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30851      new_path="$path"
30852
30853  windows_path="$new_path"
30854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30855    unix_path=`$CYGPATH -u "$windows_path"`
30856    new_path="$unix_path"
30857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30859    new_path="$unix_path"
30860  fi
30861
30862    fi
30863
30864    if test "x$new_path" = x; then
30865      # It's still not found. Now this is an unrecoverable error.
30866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30867$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30868      has_space=`$ECHO "$complete" | $GREP " "`
30869      if test "x$has_space" != x; then
30870        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30871$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30872      fi
30873      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30874    fi
30875  fi
30876
30877  # Now new_path has a complete unix path to the binary
30878  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30879    # Keep paths in /bin as-is, but remove trailing .exe if any
30880    new_path="${new_path/%.exe/}"
30881    # Do not save /bin paths to all_fixpath_prefixes!
30882  else
30883    # Not in mixed or Windows style, start by that.
30884    new_path=`cmd //c echo $new_path`
30885
30886  input_path="$new_path"
30887  # Check if we need to convert this using DOS-style short mode. If the path
30888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30889  # take no chances and rewrite it.
30890  # Note: m4 eats our [], so we need to use [ and ] instead.
30891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30892  if test "x$has_forbidden_chars" != x; then
30893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30895  fi
30896
30897    # Output is in $new_path
30898
30899  windows_path="$new_path"
30900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30901    unix_path=`$CYGPATH -u "$windows_path"`
30902    new_path="$unix_path"
30903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30905    new_path="$unix_path"
30906  fi
30907
30908    # remove trailing .exe if any
30909    new_path="${new_path/%.exe/}"
30910
30911    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30912    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30913  fi
30914
30915    else
30916      # We're on a unix platform. Hooray! :)
30917      # First separate the path from the arguments. This will split at the first
30918      # space.
30919      complete="$VS_ENV_CMD"
30920      path="${complete%% *}"
30921      tmp="$complete EOL"
30922      arguments="${tmp#* }"
30923
30924      # Cannot rely on the command "which" here since it doesn't always work.
30925      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30926      if test -z "$is_absolute_path"; then
30927        # Path to executable is not absolute. Find it.
30928        IFS_save="$IFS"
30929        IFS=:
30930        for p in $PATH; do
30931          if test -f "$p/$path" && test -x "$p/$path"; then
30932            new_path="$p/$path"
30933            break
30934          fi
30935        done
30936        IFS="$IFS_save"
30937      else
30938        # This is an absolute path, we can use it without further modifications.
30939        new_path="$path"
30940      fi
30941
30942      if test "x$new_path" = x; then
30943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
30944$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
30945        has_space=`$ECHO "$complete" | $GREP " "`
30946        if test "x$has_space" != x; then
30947          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30948$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30949        fi
30950        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
30951      fi
30952    fi
30953
30954    # Now join together the path and the arguments once again
30955    if test "x$arguments" != xEOL; then
30956      new_complete="$new_path ${arguments% *}"
30957    else
30958      new_complete="$new_path"
30959    fi
30960
30961    if test "x$complete" != "x$new_complete"; then
30962      VS_ENV_CMD="$new_complete"
30963      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
30964$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
30965    fi
30966  fi
30967
30968
30969      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
30970      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
30971$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
30972
30973      # We need to create a couple of temporary files.
30974      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
30975      $MKDIR -p $VS_ENV_TMP_DIR
30976
30977      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
30978      # Instead create a shell script which will set the relevant variables when run.
30979      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
30980
30981  unix_path="$WINPATH_VS_ENV_CMD"
30982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30983    windows_path=`$CYGPATH -m "$unix_path"`
30984    WINPATH_VS_ENV_CMD="$windows_path"
30985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30986    windows_path=`cmd //c echo $unix_path`
30987    WINPATH_VS_ENV_CMD="$windows_path"
30988  fi
30989
30990      WINPATH_BASH="$BASH"
30991
30992  unix_path="$WINPATH_BASH"
30993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30994    windows_path=`$CYGPATH -m "$unix_path"`
30995    WINPATH_BASH="$windows_path"
30996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30997    windows_path=`cmd //c echo $unix_path`
30998    WINPATH_BASH="$windows_path"
30999  fi
31000
31001
31002      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
31003      # script (executable by bash) that will setup the important variables.
31004      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
31005      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
31006      # This will end up something like:
31007      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
31008      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
31009      # These will end up something like:
31010      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
31011      # The trailing space for everyone except PATH is no typo, but is needed due
31012      # to trailing \ in the Windows paths. These will be stripped later.
31013      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
31014          >> $EXTRACT_VC_ENV_BAT_FILE
31015      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
31016          >> $EXTRACT_VC_ENV_BAT_FILE
31017      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
31018          >> $EXTRACT_VC_ENV_BAT_FILE
31019      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
31020          >> $EXTRACT_VC_ENV_BAT_FILE
31021      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
31022          >> $EXTRACT_VC_ENV_BAT_FILE
31023      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
31024          >> $EXTRACT_VC_ENV_BAT_FILE
31025
31026      # Now execute the newly created bat file.
31027      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
31028      # Change directory so we don't need to mess with Windows paths in redirects.
31029      cd $VS_ENV_TMP_DIR
31030      cmd /c extract-vs-env.bat | $CAT
31031      cd $CURDIR
31032
31033      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
31034        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
31035$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
31036        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31037$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31038        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31039$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31040        as_fn_error $? "Cannot continue" "$LINENO" 5
31041      fi
31042
31043      # Now set all paths and other env variables. This will allow the rest of
31044      # the configure script to find and run the compiler in the proper way.
31045      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
31046$as_echo "$as_me: Setting extracted environment variables" >&6;}
31047      . $VS_ENV_TMP_DIR/set-vs-env.sh
31048      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
31049      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
31050    else
31051      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
31052      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
31053$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
31054    fi
31055  fi
31056
31057  # At this point, we should have correct variables in the environment, or we can't continue.
31058  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
31059$as_echo_n "checking for Visual Studio variables... " >&6; }
31060
31061  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
31062      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
31063    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
31064      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
31065$as_echo "present but broken" >&6; }
31066      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
31067    else
31068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31069$as_echo "ok" >&6; }
31070      # Remove any trailing "\" ";" and " " from the variables.
31071      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
31072      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
31073      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
31074      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
31075      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
31076      # Remove any paths containing # (typically F#) as that messes up make. This
31077      # is needed if visual studio was installed with F# support.
31078      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
31079
31080
31081
31082
31083
31084      # Convert VS_INCLUDE into SYSROOT_CFLAGS
31085      OLDIFS="$IFS"
31086      IFS=";"
31087      for i in $VS_INCLUDE; do
31088        ipath=$i
31089        # Only process non-empty elements
31090        if test "x$ipath" != x; then
31091          IFS="$OLDIFS"
31092          # Check that directory exists before calling fixup_path
31093          testpath=$ipath
31094
31095  windows_path="$testpath"
31096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31097    unix_path=`$CYGPATH -u "$windows_path"`
31098    testpath="$unix_path"
31099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31101    testpath="$unix_path"
31102  fi
31103
31104          if test -d "$testpath"; then
31105
31106  # Only process if variable expands to non-empty
31107
31108  if test "x$ipath" != x; then
31109    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31110
31111  # Input might be given as Windows format, start by converting to
31112  # unix format.
31113  path="$ipath"
31114  new_path=`$CYGPATH -u "$path"`
31115
31116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31119  # "foo.exe" is OK but "foo" is an error.
31120  #
31121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31122  # It is also a way to make sure we got the proper file name for the real test later on.
31123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31124  if test "x$test_shortpath" = x; then
31125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31126$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31127    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
31128  fi
31129
31130  # Call helper function which possibly converts this using DOS-style short mode.
31131  # If so, the updated path is stored in $new_path.
31132
31133  input_path="$new_path"
31134  # Check if we need to convert this using DOS-style short mode. If the path
31135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31136  # take no chances and rewrite it.
31137  # Note: m4 eats our [], so we need to use [ and ] instead.
31138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31139  if test "x$has_forbidden_chars" != x; then
31140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31144      # Going to short mode and back again did indeed matter. Since short mode is
31145      # case insensitive, let's make it lowercase to improve readability.
31146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31147      # Now convert it back to Unix-style (cygpath)
31148      input_path=`$CYGPATH -u "$shortmode_path"`
31149      new_path="$input_path"
31150    fi
31151  fi
31152
31153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31154  if test "x$test_cygdrive_prefix" = x; then
31155    # As a simple fix, exclude /usr/bin since it's not a real path.
31156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31158      # a path prefixed by /cygdrive for fixpath to work.
31159      new_path="$CYGWIN_ROOT_PATH$input_path"
31160    fi
31161  fi
31162
31163
31164  if test "x$path" != "x$new_path"; then
31165    ipath="$new_path"
31166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31167$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31168  fi
31169
31170    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31171
31172  path="$ipath"
31173  has_colon=`$ECHO $path | $GREP ^.:`
31174  new_path="$path"
31175  if test "x$has_colon" = x; then
31176    # Not in mixed or Windows style, start by that.
31177    new_path=`cmd //c echo $path`
31178  fi
31179
31180
31181  input_path="$new_path"
31182  # Check if we need to convert this using DOS-style short mode. If the path
31183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31184  # take no chances and rewrite it.
31185  # Note: m4 eats our [], so we need to use [ and ] instead.
31186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31187  if test "x$has_forbidden_chars" != x; then
31188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31190  fi
31191
31192
31193  windows_path="$new_path"
31194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31195    unix_path=`$CYGPATH -u "$windows_path"`
31196    new_path="$unix_path"
31197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31199    new_path="$unix_path"
31200  fi
31201
31202  if test "x$path" != "x$new_path"; then
31203    ipath="$new_path"
31204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
31205$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
31206  fi
31207
31208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31210
31211    else
31212      # We're on a unix platform. Hooray! :)
31213      path="$ipath"
31214      has_space=`$ECHO "$path" | $GREP " "`
31215      if test "x$has_space" != x; then
31216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
31217$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
31218        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31219      fi
31220
31221      # Use eval to expand a potential ~
31222      eval path="$path"
31223      if test ! -f "$path" && test ! -d "$path"; then
31224        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
31225      fi
31226
31227      if test -d "$path"; then
31228        ipath="`cd "$path"; $THEPWDCMD -L`"
31229      else
31230        dir="`$DIRNAME "$path"`"
31231        base="`$BASENAME "$path"`"
31232        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
31233      fi
31234    fi
31235  fi
31236
31237            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
31238          fi
31239          IFS=";"
31240        fi
31241      done
31242      # Convert VS_LIB into SYSROOT_LDFLAGS
31243      for i in $VS_LIB; do
31244        libpath=$i
31245        # Only process non-empty elements
31246        if test "x$libpath" != x; then
31247          IFS="$OLDIFS"
31248          # Check that directory exists before calling fixup_path
31249          testpath=$libpath
31250
31251  windows_path="$testpath"
31252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31253    unix_path=`$CYGPATH -u "$windows_path"`
31254    testpath="$unix_path"
31255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31257    testpath="$unix_path"
31258  fi
31259
31260          if test -d "$testpath"; then
31261
31262  # Only process if variable expands to non-empty
31263
31264  if test "x$libpath" != x; then
31265    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31266
31267  # Input might be given as Windows format, start by converting to
31268  # unix format.
31269  path="$libpath"
31270  new_path=`$CYGPATH -u "$path"`
31271
31272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31275  # "foo.exe" is OK but "foo" is an error.
31276  #
31277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31278  # It is also a way to make sure we got the proper file name for the real test later on.
31279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31280  if test "x$test_shortpath" = x; then
31281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31282$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31283    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
31284  fi
31285
31286  # Call helper function which possibly converts this using DOS-style short mode.
31287  # If so, the updated path is stored in $new_path.
31288
31289  input_path="$new_path"
31290  # Check if we need to convert this using DOS-style short mode. If the path
31291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31292  # take no chances and rewrite it.
31293  # Note: m4 eats our [], so we need to use [ and ] instead.
31294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31295  if test "x$has_forbidden_chars" != x; then
31296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31300      # Going to short mode and back again did indeed matter. Since short mode is
31301      # case insensitive, let's make it lowercase to improve readability.
31302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31303      # Now convert it back to Unix-style (cygpath)
31304      input_path=`$CYGPATH -u "$shortmode_path"`
31305      new_path="$input_path"
31306    fi
31307  fi
31308
31309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31310  if test "x$test_cygdrive_prefix" = x; then
31311    # As a simple fix, exclude /usr/bin since it's not a real path.
31312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31314      # a path prefixed by /cygdrive for fixpath to work.
31315      new_path="$CYGWIN_ROOT_PATH$input_path"
31316    fi
31317  fi
31318
31319
31320  if test "x$path" != "x$new_path"; then
31321    libpath="$new_path"
31322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31323$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31324  fi
31325
31326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31327
31328  path="$libpath"
31329  has_colon=`$ECHO $path | $GREP ^.:`
31330  new_path="$path"
31331  if test "x$has_colon" = x; then
31332    # Not in mixed or Windows style, start by that.
31333    new_path=`cmd //c echo $path`
31334  fi
31335
31336
31337  input_path="$new_path"
31338  # Check if we need to convert this using DOS-style short mode. If the path
31339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31340  # take no chances and rewrite it.
31341  # Note: m4 eats our [], so we need to use [ and ] instead.
31342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31343  if test "x$has_forbidden_chars" != x; then
31344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31346  fi
31347
31348
31349  windows_path="$new_path"
31350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31351    unix_path=`$CYGPATH -u "$windows_path"`
31352    new_path="$unix_path"
31353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31355    new_path="$unix_path"
31356  fi
31357
31358  if test "x$path" != "x$new_path"; then
31359    libpath="$new_path"
31360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
31361$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
31362  fi
31363
31364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31366
31367    else
31368      # We're on a unix platform. Hooray! :)
31369      path="$libpath"
31370      has_space=`$ECHO "$path" | $GREP " "`
31371      if test "x$has_space" != x; then
31372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
31373$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
31374        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31375      fi
31376
31377      # Use eval to expand a potential ~
31378      eval path="$path"
31379      if test ! -f "$path" && test ! -d "$path"; then
31380        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
31381      fi
31382
31383      if test -d "$path"; then
31384        libpath="`cd "$path"; $THEPWDCMD -L`"
31385      else
31386        dir="`$DIRNAME "$path"`"
31387        base="`$BASENAME "$path"`"
31388        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
31389      fi
31390    fi
31391  fi
31392
31393            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
31394          fi
31395          IFS=";"
31396        fi
31397      done
31398      IFS="$OLDIFS"
31399    fi
31400  else
31401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31402$as_echo "not found" >&6; }
31403
31404    if test "x$VS_ENV_CMD" = x; then
31405      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
31406$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
31407      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
31408$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
31409    else
31410      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
31411$as_echo "$as_me: Running the extraction script failed." >&6;}
31412    fi
31413    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
31414$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
31415    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
31416$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
31417    as_fn_error $? "Cannot continue" "$LINENO" 5
31418  fi
31419
31420    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
31421    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
31422    PATH="$VS_PATH"
31423    # The microsoft toolchain also requires INCLUDE and LIB to be set.
31424    export INCLUDE="$VS_INCLUDE"
31425    export LIB="$VS_LIB"
31426  fi
31427
31428  # For solaris we really need solaris tools, and not the GNU equivalent.
31429  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
31430  # so add that to path before starting to probe.
31431  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
31432  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
31433    PATH="/usr/ccs/bin:$PATH"
31434  fi
31435
31436  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
31437  # override all other locations.
31438  if test "x$TOOLCHAIN_PATH" != x; then
31439    PATH=$TOOLCHAIN_PATH:$PATH
31440  fi
31441
31442
31443  #
31444  # Setup the compilers (CC and CXX)
31445  #
31446
31447  COMPILER_NAME=C
31448  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
31449
31450  if test "x$CC" != x; then
31451    # User has supplied compiler name already, always let that override.
31452    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
31453$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
31454    if test "x`basename $CC`" = "x$CC"; then
31455      # A command without a complete path is provided, search $PATH.
31456
31457      for ac_prog in $CC
31458do
31459  # Extract the first word of "$ac_prog", so it can be a program name with args.
31460set dummy $ac_prog; ac_word=$2
31461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31462$as_echo_n "checking for $ac_word... " >&6; }
31463if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31464  $as_echo_n "(cached) " >&6
31465else
31466  case $POTENTIAL_CC in
31467  [\\/]* | ?:[\\/]*)
31468  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31469  ;;
31470  *)
31471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31472for as_dir in $PATH
31473do
31474  IFS=$as_save_IFS
31475  test -z "$as_dir" && as_dir=.
31476    for ac_exec_ext in '' $ac_executable_extensions; do
31477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31478    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31480    break 2
31481  fi
31482done
31483  done
31484IFS=$as_save_IFS
31485
31486  ;;
31487esac
31488fi
31489POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31490if test -n "$POTENTIAL_CC"; then
31491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31492$as_echo "$POTENTIAL_CC" >&6; }
31493else
31494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31495$as_echo "no" >&6; }
31496fi
31497
31498
31499  test -n "$POTENTIAL_CC" && break
31500done
31501
31502      if test "x$POTENTIAL_CC" != x; then
31503        CC=$POTENTIAL_CC
31504      else
31505        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
31506      fi
31507    else
31508      # Otherwise it might already be a complete path
31509      if test ! -x "$CC"; then
31510        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
31511      fi
31512    fi
31513  else
31514    # No user supplied value. Locate compiler ourselves.
31515
31516    # If we are cross compiling, assume cross compilation tools follows the
31517    # cross compilation standard where they are prefixed with the autoconf
31518    # standard name for the target. For example the binary
31519    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
31520    # If we are not cross compiling, then the default compiler name will be
31521    # used.
31522
31523    CC=
31524    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
31525    # before checking the rest of the PATH.
31526    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
31527    # step, this should not be necessary.
31528    if test -n "$TOOLCHAIN_PATH"; then
31529      PATH_save="$PATH"
31530      PATH="$TOOLCHAIN_PATH"
31531      for ac_prog in $SEARCH_LIST
31532do
31533  # Extract the first word of "$ac_prog", so it can be a program name with args.
31534set dummy $ac_prog; ac_word=$2
31535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31536$as_echo_n "checking for $ac_word... " >&6; }
31537if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
31538  $as_echo_n "(cached) " >&6
31539else
31540  case $TOOLCHAIN_PATH_CC in
31541  [\\/]* | ?:[\\/]*)
31542  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
31543  ;;
31544  *)
31545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31546for as_dir in $PATH
31547do
31548  IFS=$as_save_IFS
31549  test -z "$as_dir" && as_dir=.
31550    for ac_exec_ext in '' $ac_executable_extensions; do
31551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31552    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
31553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31554    break 2
31555  fi
31556done
31557  done
31558IFS=$as_save_IFS
31559
31560  ;;
31561esac
31562fi
31563TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
31564if test -n "$TOOLCHAIN_PATH_CC"; then
31565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
31566$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
31567else
31568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31569$as_echo "no" >&6; }
31570fi
31571
31572
31573  test -n "$TOOLCHAIN_PATH_CC" && break
31574done
31575
31576      CC=$TOOLCHAIN_PATH_CC
31577      PATH="$PATH_save"
31578    fi
31579
31580    # AC_PATH_PROGS can't be run multiple times with the same variable,
31581    # so create a new name for this run.
31582    if test "x$CC" = x; then
31583      for ac_prog in $SEARCH_LIST
31584do
31585  # Extract the first word of "$ac_prog", so it can be a program name with args.
31586set dummy $ac_prog; ac_word=$2
31587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31588$as_echo_n "checking for $ac_word... " >&6; }
31589if ${ac_cv_path_POTENTIAL_CC+:} false; then :
31590  $as_echo_n "(cached) " >&6
31591else
31592  case $POTENTIAL_CC in
31593  [\\/]* | ?:[\\/]*)
31594  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
31595  ;;
31596  *)
31597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31598for as_dir in $PATH
31599do
31600  IFS=$as_save_IFS
31601  test -z "$as_dir" && as_dir=.
31602    for ac_exec_ext in '' $ac_executable_extensions; do
31603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31604    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
31605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31606    break 2
31607  fi
31608done
31609  done
31610IFS=$as_save_IFS
31611
31612  ;;
31613esac
31614fi
31615POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
31616if test -n "$POTENTIAL_CC"; then
31617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
31618$as_echo "$POTENTIAL_CC" >&6; }
31619else
31620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31621$as_echo "no" >&6; }
31622fi
31623
31624
31625  test -n "$POTENTIAL_CC" && break
31626done
31627
31628      CC=$POTENTIAL_CC
31629    fi
31630
31631    if test "x$CC" = x; then
31632
31633  # Print a helpful message on how to acquire the necessary build dependency.
31634  # devkit is the help tag: freetype, cups, alsa etc
31635  MISSING_DEPENDENCY=devkit
31636
31637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31638    cygwin_help $MISSING_DEPENDENCY
31639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31640    msys_help $MISSING_DEPENDENCY
31641  else
31642    PKGHANDLER_COMMAND=
31643
31644    case $PKGHANDLER in
31645      apt-get)
31646        apt_help     $MISSING_DEPENDENCY ;;
31647      yum)
31648        yum_help     $MISSING_DEPENDENCY ;;
31649      port)
31650        port_help    $MISSING_DEPENDENCY ;;
31651      pkgutil)
31652        pkgutil_help $MISSING_DEPENDENCY ;;
31653      pkgadd)
31654        pkgadd_help  $MISSING_DEPENDENCY ;;
31655    esac
31656
31657    if test "x$PKGHANDLER_COMMAND" != x; then
31658      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31659    fi
31660  fi
31661
31662      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31663    fi
31664  fi
31665
31666  # Now we have a compiler binary in CC. Make sure it's okay.
31667
31668  # Only process if variable expands to non-empty
31669
31670  if test "x$CC" != x; then
31671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31672
31673  # First separate the path from the arguments. This will split at the first
31674  # space.
31675  complete="$CC"
31676  path="${complete%% *}"
31677  tmp="$complete EOL"
31678  arguments="${tmp#* }"
31679
31680  # Input might be given as Windows format, start by converting to
31681  # unix format.
31682  new_path=`$CYGPATH -u "$path"`
31683
31684  # Now try to locate executable using which
31685  new_path=`$WHICH "$new_path" 2> /dev/null`
31686  # bat and cmd files are not always considered executable in cygwin causing which
31687  # to not find them
31688  if test "x$new_path" = x \
31689      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31690      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31691    new_path=`$CYGPATH -u "$path"`
31692  fi
31693  if test "x$new_path" = x; then
31694    # Oops. Which didn't find the executable.
31695    # The splitting of arguments from the executable at a space might have been incorrect,
31696    # since paths with space are more likely in Windows. Give it another try with the whole
31697    # argument.
31698    path="$complete"
31699    arguments="EOL"
31700    new_path=`$CYGPATH -u "$path"`
31701    new_path=`$WHICH "$new_path" 2> /dev/null`
31702    # bat and cmd files are not always considered executable in cygwin causing which
31703    # to not find them
31704    if test "x$new_path" = x \
31705        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31706        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31707      new_path=`$CYGPATH -u "$path"`
31708    fi
31709    if test "x$new_path" = x; then
31710      # It's still not found. Now this is an unrecoverable error.
31711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31712$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31713      has_space=`$ECHO "$complete" | $GREP " "`
31714      if test "x$has_space" != x; then
31715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31717      fi
31718      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31719    fi
31720  fi
31721
31722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31725  # "foo.exe" is OK but "foo" is an error.
31726  #
31727  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31728  # It is also a way to make sure we got the proper file name for the real test later on.
31729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31730  if test "x$test_shortpath" = x; then
31731    # Short path failed, file does not exist as specified.
31732    # Try adding .exe or .cmd
31733    if test -f "${new_path}.exe"; then
31734      input_to_shortpath="${new_path}.exe"
31735    elif test -f "${new_path}.cmd"; then
31736      input_to_shortpath="${new_path}.cmd"
31737    else
31738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
31739$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
31740      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31741$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31742      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31743    fi
31744  else
31745    input_to_shortpath="$new_path"
31746  fi
31747
31748  # Call helper function which possibly converts this using DOS-style short mode.
31749  # If so, the updated path is stored in $new_path.
31750  new_path="$input_to_shortpath"
31751
31752  input_path="$input_to_shortpath"
31753  # Check if we need to convert this using DOS-style short mode. If the path
31754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31755  # take no chances and rewrite it.
31756  # Note: m4 eats our [], so we need to use [ and ] instead.
31757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31758  if test "x$has_forbidden_chars" != x; then
31759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31763      # Going to short mode and back again did indeed matter. Since short mode is
31764      # case insensitive, let's make it lowercase to improve readability.
31765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31766      # Now convert it back to Unix-style (cygpath)
31767      input_path=`$CYGPATH -u "$shortmode_path"`
31768      new_path="$input_path"
31769    fi
31770  fi
31771
31772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31773  if test "x$test_cygdrive_prefix" = x; then
31774    # As a simple fix, exclude /usr/bin since it's not a real path.
31775    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31777      # a path prefixed by /cygdrive for fixpath to work.
31778      new_path="$CYGWIN_ROOT_PATH$input_path"
31779    fi
31780  fi
31781
31782  # remove trailing .exe if any
31783  new_path="${new_path/%.exe/}"
31784
31785    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31786
31787  # First separate the path from the arguments. This will split at the first
31788  # space.
31789  complete="$CC"
31790  path="${complete%% *}"
31791  tmp="$complete EOL"
31792  arguments="${tmp#* }"
31793
31794  # Input might be given as Windows format, start by converting to
31795  # unix format.
31796  new_path="$path"
31797
31798  windows_path="$new_path"
31799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31800    unix_path=`$CYGPATH -u "$windows_path"`
31801    new_path="$unix_path"
31802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31804    new_path="$unix_path"
31805  fi
31806
31807
31808  # Now try to locate executable using which
31809  new_path=`$WHICH "$new_path" 2> /dev/null`
31810
31811  if test "x$new_path" = x; then
31812    # Oops. Which didn't find the executable.
31813    # The splitting of arguments from the executable at a space might have been incorrect,
31814    # since paths with space are more likely in Windows. Give it another try with the whole
31815    # argument.
31816    path="$complete"
31817    arguments="EOL"
31818    new_path="$path"
31819
31820  windows_path="$new_path"
31821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31822    unix_path=`$CYGPATH -u "$windows_path"`
31823    new_path="$unix_path"
31824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31826    new_path="$unix_path"
31827  fi
31828
31829
31830    new_path=`$WHICH "$new_path" 2> /dev/null`
31831    # bat and cmd files are not always considered executable in MSYS causing which
31832    # to not find them
31833    if test "x$new_path" = x \
31834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31836      new_path="$path"
31837
31838  windows_path="$new_path"
31839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31840    unix_path=`$CYGPATH -u "$windows_path"`
31841    new_path="$unix_path"
31842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31844    new_path="$unix_path"
31845  fi
31846
31847    fi
31848
31849    if test "x$new_path" = x; then
31850      # It's still not found. Now this is an unrecoverable error.
31851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31852$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31853      has_space=`$ECHO "$complete" | $GREP " "`
31854      if test "x$has_space" != x; then
31855        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31856$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31857      fi
31858      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31859    fi
31860  fi
31861
31862  # Now new_path has a complete unix path to the binary
31863  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31864    # Keep paths in /bin as-is, but remove trailing .exe if any
31865    new_path="${new_path/%.exe/}"
31866    # Do not save /bin paths to all_fixpath_prefixes!
31867  else
31868    # Not in mixed or Windows style, start by that.
31869    new_path=`cmd //c echo $new_path`
31870
31871  input_path="$new_path"
31872  # Check if we need to convert this using DOS-style short mode. If the path
31873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31874  # take no chances and rewrite it.
31875  # Note: m4 eats our [], so we need to use [ and ] instead.
31876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31877  if test "x$has_forbidden_chars" != x; then
31878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31880  fi
31881
31882    # Output is in $new_path
31883
31884  windows_path="$new_path"
31885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31886    unix_path=`$CYGPATH -u "$windows_path"`
31887    new_path="$unix_path"
31888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31890    new_path="$unix_path"
31891  fi
31892
31893    # remove trailing .exe if any
31894    new_path="${new_path/%.exe/}"
31895
31896    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31897    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31898  fi
31899
31900    else
31901      # We're on a unix platform. Hooray! :)
31902      # First separate the path from the arguments. This will split at the first
31903      # space.
31904      complete="$CC"
31905      path="${complete%% *}"
31906      tmp="$complete EOL"
31907      arguments="${tmp#* }"
31908
31909      # Cannot rely on the command "which" here since it doesn't always work.
31910      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31911      if test -z "$is_absolute_path"; then
31912        # Path to executable is not absolute. Find it.
31913        IFS_save="$IFS"
31914        IFS=:
31915        for p in $PATH; do
31916          if test -f "$p/$path" && test -x "$p/$path"; then
31917            new_path="$p/$path"
31918            break
31919          fi
31920        done
31921        IFS="$IFS_save"
31922      else
31923        # This is an absolute path, we can use it without further modifications.
31924        new_path="$path"
31925      fi
31926
31927      if test "x$new_path" = x; then
31928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
31929$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
31930        has_space=`$ECHO "$complete" | $GREP " "`
31931        if test "x$has_space" != x; then
31932          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31933$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31934        fi
31935        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
31936      fi
31937    fi
31938
31939    # Now join together the path and the arguments once again
31940    if test "x$arguments" != xEOL; then
31941      new_complete="$new_path ${arguments% *}"
31942    else
31943      new_complete="$new_path"
31944    fi
31945
31946    if test "x$complete" != "x$new_complete"; then
31947      CC="$new_complete"
31948      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
31949$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
31950    fi
31951  fi
31952
31953  TEST_COMPILER="$CC"
31954  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31955  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31956  if test "x$OPENJDK_BUILD_OS" != xaix; then
31957    # FIXME: This test should not be needed anymore; we don't do that for any platform.
31958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
31959$as_echo_n "checking resolved symbolic links for CC... " >&6; }
31960
31961  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31962    # Follow a chain of symbolic links. Use readlink
31963    # where it exists, else fall back to horribly
31964    # complicated shell code.
31965    if test "x$READLINK_TESTED" != yes; then
31966      # On MacOSX there is a readlink tool with a different
31967      # purpose than the GNU readlink tool. Check the found readlink.
31968      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31969      if test "x$ISGNU" = x; then
31970        # A readlink that we do not know how to use.
31971        # Are there other non-GNU readlinks out there?
31972        READLINK_TESTED=yes
31973        READLINK=
31974      fi
31975    fi
31976
31977    if test "x$READLINK" != x; then
31978      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31979    else
31980      # Save the current directory for restoring afterwards
31981      STARTDIR=$PWD
31982      COUNTER=0
31983      sym_link_dir=`$DIRNAME $TEST_COMPILER`
31984      sym_link_file=`$BASENAME $TEST_COMPILER`
31985      cd $sym_link_dir
31986      # Use -P flag to resolve symlinks in directories.
31987      cd `$THEPWDCMD -P`
31988      sym_link_dir=`$THEPWDCMD -P`
31989      # Resolve file symlinks
31990      while test $COUNTER -lt 20; do
31991        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31992        if test "x$ISLINK" == x; then
31993          # This is not a symbolic link! We are done!
31994          break
31995        fi
31996        # Again resolve directory symlinks since the target of the just found
31997        # link could be in a different directory
31998        cd `$DIRNAME $ISLINK`
31999        sym_link_dir=`$THEPWDCMD -P`
32000        sym_link_file=`$BASENAME $ISLINK`
32001        let COUNTER=COUNTER+1
32002      done
32003      cd $STARTDIR
32004      TEST_COMPILER=$sym_link_dir/$sym_link_file
32005    fi
32006  fi
32007
32008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
32009$as_echo "$TEST_COMPILER" >&6; }
32010  fi
32011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
32012$as_echo_n "checking if CC is disguised ccache... " >&6; }
32013
32014  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
32015  if test "x$COMPILER_BASENAME" = "xccache"; then
32016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
32017$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
32018    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
32019    # We want to control ccache invocation ourselves, so ignore this cc and try
32020    # searching again.
32021
32022    # Remove the path to the fake ccache cc from the PATH
32023    RETRY_COMPILER_SAVED_PATH="$PATH"
32024    COMPILER_DIRNAME=`$DIRNAME $CC`
32025    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
32026
32027    # Try again looking for our compiler
32028    if test -n "$ac_tool_prefix"; then
32029  for ac_prog in $TOOLCHAIN_CC_BINARY
32030  do
32031    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32032set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32034$as_echo_n "checking for $ac_word... " >&6; }
32035if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
32036  $as_echo_n "(cached) " >&6
32037else
32038  if test -n "$PROPER_COMPILER_CC"; then
32039  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
32040else
32041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32042for as_dir in $PATH
32043do
32044  IFS=$as_save_IFS
32045  test -z "$as_dir" && as_dir=.
32046    for ac_exec_ext in '' $ac_executable_extensions; do
32047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32048    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
32049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32050    break 2
32051  fi
32052done
32053  done
32054IFS=$as_save_IFS
32055
32056fi
32057fi
32058PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
32059if test -n "$PROPER_COMPILER_CC"; then
32060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32061$as_echo "$PROPER_COMPILER_CC" >&6; }
32062else
32063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32064$as_echo "no" >&6; }
32065fi
32066
32067
32068    test -n "$PROPER_COMPILER_CC" && break
32069  done
32070fi
32071if test -z "$PROPER_COMPILER_CC"; then
32072  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
32073  for ac_prog in $TOOLCHAIN_CC_BINARY
32074do
32075  # Extract the first word of "$ac_prog", so it can be a program name with args.
32076set dummy $ac_prog; ac_word=$2
32077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32078$as_echo_n "checking for $ac_word... " >&6; }
32079if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
32080  $as_echo_n "(cached) " >&6
32081else
32082  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32083  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
32084else
32085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32086for as_dir in $PATH
32087do
32088  IFS=$as_save_IFS
32089  test -z "$as_dir" && as_dir=.
32090    for ac_exec_ext in '' $ac_executable_extensions; do
32091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32092    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
32093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32094    break 2
32095  fi
32096done
32097  done
32098IFS=$as_save_IFS
32099
32100fi
32101fi
32102ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
32103if test -n "$ac_ct_PROPER_COMPILER_CC"; then
32104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
32105$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
32106else
32107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32108$as_echo "no" >&6; }
32109fi
32110
32111
32112  test -n "$ac_ct_PROPER_COMPILER_CC" && break
32113done
32114
32115  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
32116    PROPER_COMPILER_CC=""
32117  else
32118    case $cross_compiling:$ac_tool_warned in
32119yes:)
32120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32122ac_tool_warned=yes ;;
32123esac
32124    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
32125  fi
32126fi
32127
32128
32129  # Only process if variable expands to non-empty
32130
32131  if test "x$PROPER_COMPILER_CC" != x; then
32132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32133
32134  # First separate the path from the arguments. This will split at the first
32135  # space.
32136  complete="$PROPER_COMPILER_CC"
32137  path="${complete%% *}"
32138  tmp="$complete EOL"
32139  arguments="${tmp#* }"
32140
32141  # Input might be given as Windows format, start by converting to
32142  # unix format.
32143  new_path=`$CYGPATH -u "$path"`
32144
32145  # Now try to locate executable using which
32146  new_path=`$WHICH "$new_path" 2> /dev/null`
32147  # bat and cmd files are not always considered executable in cygwin causing which
32148  # to not find them
32149  if test "x$new_path" = x \
32150      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32151      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32152    new_path=`$CYGPATH -u "$path"`
32153  fi
32154  if test "x$new_path" = x; then
32155    # Oops. Which didn't find the executable.
32156    # The splitting of arguments from the executable at a space might have been incorrect,
32157    # since paths with space are more likely in Windows. Give it another try with the whole
32158    # argument.
32159    path="$complete"
32160    arguments="EOL"
32161    new_path=`$CYGPATH -u "$path"`
32162    new_path=`$WHICH "$new_path" 2> /dev/null`
32163    # bat and cmd files are not always considered executable in cygwin causing which
32164    # to not find them
32165    if test "x$new_path" = x \
32166        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32167        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32168      new_path=`$CYGPATH -u "$path"`
32169    fi
32170    if test "x$new_path" = x; then
32171      # It's still not found. Now this is an unrecoverable error.
32172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32173$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32174      has_space=`$ECHO "$complete" | $GREP " "`
32175      if test "x$has_space" != x; then
32176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32178      fi
32179      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32180    fi
32181  fi
32182
32183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32186  # "foo.exe" is OK but "foo" is an error.
32187  #
32188  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32189  # It is also a way to make sure we got the proper file name for the real test later on.
32190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32191  if test "x$test_shortpath" = x; then
32192    # Short path failed, file does not exist as specified.
32193    # Try adding .exe or .cmd
32194    if test -f "${new_path}.exe"; then
32195      input_to_shortpath="${new_path}.exe"
32196    elif test -f "${new_path}.cmd"; then
32197      input_to_shortpath="${new_path}.cmd"
32198    else
32199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
32200$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
32201      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32202$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32203      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32204    fi
32205  else
32206    input_to_shortpath="$new_path"
32207  fi
32208
32209  # Call helper function which possibly converts this using DOS-style short mode.
32210  # If so, the updated path is stored in $new_path.
32211  new_path="$input_to_shortpath"
32212
32213  input_path="$input_to_shortpath"
32214  # Check if we need to convert this using DOS-style short mode. If the path
32215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32216  # take no chances and rewrite it.
32217  # Note: m4 eats our [], so we need to use [ and ] instead.
32218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32219  if test "x$has_forbidden_chars" != x; then
32220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32224      # Going to short mode and back again did indeed matter. Since short mode is
32225      # case insensitive, let's make it lowercase to improve readability.
32226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32227      # Now convert it back to Unix-style (cygpath)
32228      input_path=`$CYGPATH -u "$shortmode_path"`
32229      new_path="$input_path"
32230    fi
32231  fi
32232
32233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32234  if test "x$test_cygdrive_prefix" = x; then
32235    # As a simple fix, exclude /usr/bin since it's not a real path.
32236    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32238      # a path prefixed by /cygdrive for fixpath to work.
32239      new_path="$CYGWIN_ROOT_PATH$input_path"
32240    fi
32241  fi
32242
32243  # remove trailing .exe if any
32244  new_path="${new_path/%.exe/}"
32245
32246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32247
32248  # First separate the path from the arguments. This will split at the first
32249  # space.
32250  complete="$PROPER_COMPILER_CC"
32251  path="${complete%% *}"
32252  tmp="$complete EOL"
32253  arguments="${tmp#* }"
32254
32255  # Input might be given as Windows format, start by converting to
32256  # unix format.
32257  new_path="$path"
32258
32259  windows_path="$new_path"
32260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32261    unix_path=`$CYGPATH -u "$windows_path"`
32262    new_path="$unix_path"
32263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32265    new_path="$unix_path"
32266  fi
32267
32268
32269  # Now try to locate executable using which
32270  new_path=`$WHICH "$new_path" 2> /dev/null`
32271
32272  if test "x$new_path" = x; then
32273    # Oops. Which didn't find the executable.
32274    # The splitting of arguments from the executable at a space might have been incorrect,
32275    # since paths with space are more likely in Windows. Give it another try with the whole
32276    # argument.
32277    path="$complete"
32278    arguments="EOL"
32279    new_path="$path"
32280
32281  windows_path="$new_path"
32282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32283    unix_path=`$CYGPATH -u "$windows_path"`
32284    new_path="$unix_path"
32285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32287    new_path="$unix_path"
32288  fi
32289
32290
32291    new_path=`$WHICH "$new_path" 2> /dev/null`
32292    # bat and cmd files are not always considered executable in MSYS causing which
32293    # to not find them
32294    if test "x$new_path" = x \
32295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32297      new_path="$path"
32298
32299  windows_path="$new_path"
32300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32301    unix_path=`$CYGPATH -u "$windows_path"`
32302    new_path="$unix_path"
32303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32305    new_path="$unix_path"
32306  fi
32307
32308    fi
32309
32310    if test "x$new_path" = x; then
32311      # It's still not found. Now this is an unrecoverable error.
32312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32313$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32314      has_space=`$ECHO "$complete" | $GREP " "`
32315      if test "x$has_space" != x; then
32316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32318      fi
32319      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32320    fi
32321  fi
32322
32323  # Now new_path has a complete unix path to the binary
32324  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32325    # Keep paths in /bin as-is, but remove trailing .exe if any
32326    new_path="${new_path/%.exe/}"
32327    # Do not save /bin paths to all_fixpath_prefixes!
32328  else
32329    # Not in mixed or Windows style, start by that.
32330    new_path=`cmd //c echo $new_path`
32331
32332  input_path="$new_path"
32333  # Check if we need to convert this using DOS-style short mode. If the path
32334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32335  # take no chances and rewrite it.
32336  # Note: m4 eats our [], so we need to use [ and ] instead.
32337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32338  if test "x$has_forbidden_chars" != x; then
32339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32341  fi
32342
32343    # Output is in $new_path
32344
32345  windows_path="$new_path"
32346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32347    unix_path=`$CYGPATH -u "$windows_path"`
32348    new_path="$unix_path"
32349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32351    new_path="$unix_path"
32352  fi
32353
32354    # remove trailing .exe if any
32355    new_path="${new_path/%.exe/}"
32356
32357    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32358    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32359  fi
32360
32361    else
32362      # We're on a unix platform. Hooray! :)
32363      # First separate the path from the arguments. This will split at the first
32364      # space.
32365      complete="$PROPER_COMPILER_CC"
32366      path="${complete%% *}"
32367      tmp="$complete EOL"
32368      arguments="${tmp#* }"
32369
32370      # Cannot rely on the command "which" here since it doesn't always work.
32371      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32372      if test -z "$is_absolute_path"; then
32373        # Path to executable is not absolute. Find it.
32374        IFS_save="$IFS"
32375        IFS=:
32376        for p in $PATH; do
32377          if test -f "$p/$path" && test -x "$p/$path"; then
32378            new_path="$p/$path"
32379            break
32380          fi
32381        done
32382        IFS="$IFS_save"
32383      else
32384        # This is an absolute path, we can use it without further modifications.
32385        new_path="$path"
32386      fi
32387
32388      if test "x$new_path" = x; then
32389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
32390$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
32391        has_space=`$ECHO "$complete" | $GREP " "`
32392        if test "x$has_space" != x; then
32393          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32394$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32395        fi
32396        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
32397      fi
32398    fi
32399
32400    # Now join together the path and the arguments once again
32401    if test "x$arguments" != xEOL; then
32402      new_complete="$new_path ${arguments% *}"
32403    else
32404      new_complete="$new_path"
32405    fi
32406
32407    if test "x$complete" != "x$new_complete"; then
32408      PROPER_COMPILER_CC="$new_complete"
32409      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
32410$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
32411    fi
32412  fi
32413
32414    PATH="$RETRY_COMPILER_SAVED_PATH"
32415
32416    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
32417$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
32418
32419  if test "x$OPENJDK_BUILD_OS" != xwindows; then
32420    # Follow a chain of symbolic links. Use readlink
32421    # where it exists, else fall back to horribly
32422    # complicated shell code.
32423    if test "x$READLINK_TESTED" != yes; then
32424      # On MacOSX there is a readlink tool with a different
32425      # purpose than the GNU readlink tool. Check the found readlink.
32426      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
32427      if test "x$ISGNU" = x; then
32428        # A readlink that we do not know how to use.
32429        # Are there other non-GNU readlinks out there?
32430        READLINK_TESTED=yes
32431        READLINK=
32432      fi
32433    fi
32434
32435    if test "x$READLINK" != x; then
32436      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
32437    else
32438      # Save the current directory for restoring afterwards
32439      STARTDIR=$PWD
32440      COUNTER=0
32441      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
32442      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
32443      cd $sym_link_dir
32444      # Use -P flag to resolve symlinks in directories.
32445      cd `$THEPWDCMD -P`
32446      sym_link_dir=`$THEPWDCMD -P`
32447      # Resolve file symlinks
32448      while test $COUNTER -lt 20; do
32449        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
32450        if test "x$ISLINK" == x; then
32451          # This is not a symbolic link! We are done!
32452          break
32453        fi
32454        # Again resolve directory symlinks since the target of the just found
32455        # link could be in a different directory
32456        cd `$DIRNAME $ISLINK`
32457        sym_link_dir=`$THEPWDCMD -P`
32458        sym_link_file=`$BASENAME $ISLINK`
32459        let COUNTER=COUNTER+1
32460      done
32461      cd $STARTDIR
32462      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
32463    fi
32464  fi
32465
32466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
32467$as_echo "$PROPER_COMPILER_CC" >&6; }
32468    CC="$PROPER_COMPILER_CC"
32469  else
32470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
32471$as_echo "no, keeping CC" >&6; }
32472  fi
32473
32474
32475  COMPILER=$CC
32476  COMPILER_NAME=$COMPILER_NAME
32477
32478  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32479    # cc -V output typically looks like
32480    #     cc: Sun C 5.12 Linux_i386 2011/11/16
32481    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
32482    # Check that this is likely to be the Solaris Studio cc.
32483    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32484    if test $? -ne 0; then
32485      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32486      { $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
32487$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32488      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32489$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32490      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32491$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32492      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32493    fi
32494    # Remove usage instructions (if present), and
32495    # collapse compiler output into a single line
32496    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32497        $SED -e 's/ *[Uu]sage:.*//'`
32498    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32499        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
32500  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
32501    # xlc -qversion output typically looks like
32502    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
32503    #     Version: 11.01.0000.0015
32504    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
32505    # Check that this is likely to be the IBM XL C compiler.
32506    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
32507    if test $? -ne 0; then
32508      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32509      { $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
32510$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32511      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32512$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32513      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
32514$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
32515      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32516    fi
32517    # Collapse compiler output into a single line
32518    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32519    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32520        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
32521  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32522    # There is no specific version flag, but all output starts with a version string.
32523    # First line typically looks something like:
32524    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32525    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32526    # Check that this is likely to be Microsoft CL.EXE.
32527    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
32528    if test $? -ne 0; then
32529      { $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
32530$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32531      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32532$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32533      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32534    fi
32535    # Collapse compiler output into a single line
32536    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32537    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32538        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
32539  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
32540    # gcc --version output typically looks like
32541    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
32542    #     Copyright (C) 2013 Free Software Foundation, Inc.
32543    #     This is free software; see the source for copying conditions.  There is NO
32544    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32545    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32546    # Check that this is likely to be GCC.
32547    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
32548    if test $? -ne 0; then
32549      { $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
32550$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32551      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
32552$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
32553      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32554    fi
32555    # Remove Copyright and legalese from version string, and
32556    # collapse into a single line
32557    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
32558        $SED -e 's/ *Copyright .*//'`
32559    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32560        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
32561  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
32562    # clang --version output typically looks like
32563    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
32564    #    clang version 3.3 (tags/RELEASE_33/final)
32565    # or
32566    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
32567    #    Target: x86_64-pc-linux-gnu
32568    #    Thread model: posix
32569    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
32570    # Check that this is likely to be clang
32571    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
32572    if test $? -ne 0; then
32573      { $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
32574$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
32575      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
32576$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
32577      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32578    fi
32579    # Collapse compiler output into a single line
32580    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
32581    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
32582        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
32583  else
32584      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
32585  fi
32586  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
32587  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
32588  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
32589  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
32590
32591  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
32592$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
32593
32594
32595  # Now that we have resolved CC ourself, let autoconf have its go at it
32596  ac_ext=c
32597ac_cpp='$CPP $CPPFLAGS'
32598ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32599ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32600ac_compiler_gnu=$ac_cv_c_compiler_gnu
32601if test -n "$ac_tool_prefix"; then
32602  for ac_prog in $CC
32603  do
32604    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32605set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32607$as_echo_n "checking for $ac_word... " >&6; }
32608if ${ac_cv_prog_CC+:} false; then :
32609  $as_echo_n "(cached) " >&6
32610else
32611  if test -n "$CC"; then
32612  ac_cv_prog_CC="$CC" # Let the user override the test.
32613else
32614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32615for as_dir in $PATH
32616do
32617  IFS=$as_save_IFS
32618  test -z "$as_dir" && as_dir=.
32619    for ac_exec_ext in '' $ac_executable_extensions; do
32620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32621    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
32622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32623    break 2
32624  fi
32625done
32626  done
32627IFS=$as_save_IFS
32628
32629fi
32630fi
32631CC=$ac_cv_prog_CC
32632if test -n "$CC"; then
32633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
32634$as_echo "$CC" >&6; }
32635else
32636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32637$as_echo "no" >&6; }
32638fi
32639
32640
32641    test -n "$CC" && break
32642  done
32643fi
32644if test -z "$CC"; then
32645  ac_ct_CC=$CC
32646  for ac_prog in $CC
32647do
32648  # Extract the first word of "$ac_prog", so it can be a program name with args.
32649set dummy $ac_prog; ac_word=$2
32650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32651$as_echo_n "checking for $ac_word... " >&6; }
32652if ${ac_cv_prog_ac_ct_CC+:} false; then :
32653  $as_echo_n "(cached) " >&6
32654else
32655  if test -n "$ac_ct_CC"; then
32656  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
32657else
32658as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32659for as_dir in $PATH
32660do
32661  IFS=$as_save_IFS
32662  test -z "$as_dir" && as_dir=.
32663    for ac_exec_ext in '' $ac_executable_extensions; do
32664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32665    ac_cv_prog_ac_ct_CC="$ac_prog"
32666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32667    break 2
32668  fi
32669done
32670  done
32671IFS=$as_save_IFS
32672
32673fi
32674fi
32675ac_ct_CC=$ac_cv_prog_ac_ct_CC
32676if test -n "$ac_ct_CC"; then
32677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
32678$as_echo "$ac_ct_CC" >&6; }
32679else
32680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32681$as_echo "no" >&6; }
32682fi
32683
32684
32685  test -n "$ac_ct_CC" && break
32686done
32687
32688  if test "x$ac_ct_CC" = x; then
32689    CC=""
32690  else
32691    case $cross_compiling:$ac_tool_warned in
32692yes:)
32693{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32694$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32695ac_tool_warned=yes ;;
32696esac
32697    CC=$ac_ct_CC
32698  fi
32699fi
32700
32701
32702test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32704as_fn_error $? "no acceptable C compiler found in \$PATH
32705See \`config.log' for more details" "$LINENO" 5; }
32706
32707# Provide some information about the compiler.
32708$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
32709set X $ac_compile
32710ac_compiler=$2
32711for ac_option in --version -v -V -qversion; do
32712  { { ac_try="$ac_compiler $ac_option >&5"
32713case "(($ac_try" in
32714  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32715  *) ac_try_echo=$ac_try;;
32716esac
32717eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32718$as_echo "$ac_try_echo"; } >&5
32719  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32720  ac_status=$?
32721  if test -s conftest.err; then
32722    sed '10a\
32723... rest of stderr output deleted ...
32724         10q' conftest.err >conftest.er1
32725    cat conftest.er1 >&5
32726  fi
32727  rm -f conftest.er1 conftest.err
32728  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32729  test $ac_status = 0; }
32730done
32731
32732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32733/* end confdefs.h.  */
32734
32735int
32736main ()
32737{
32738
32739  ;
32740  return 0;
32741}
32742_ACEOF
32743ac_clean_files_save=$ac_clean_files
32744ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
32745# Try to create an executable without -o first, disregard a.out.
32746# It will help us diagnose broken compilers, and finding out an intuition
32747# of exeext.
32748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
32749$as_echo_n "checking whether the C compiler works... " >&6; }
32750ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
32751
32752# The possible output files:
32753ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
32754
32755ac_rmfiles=
32756for ac_file in $ac_files
32757do
32758  case $ac_file in
32759    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32760    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
32761  esac
32762done
32763rm -f $ac_rmfiles
32764
32765if { { ac_try="$ac_link_default"
32766case "(($ac_try" in
32767  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32768  *) ac_try_echo=$ac_try;;
32769esac
32770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32771$as_echo "$ac_try_echo"; } >&5
32772  (eval "$ac_link_default") 2>&5
32773  ac_status=$?
32774  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32775  test $ac_status = 0; }; then :
32776  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
32777# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
32778# in a Makefile.  We should not override ac_cv_exeext if it was cached,
32779# so that the user can short-circuit this test for compilers unknown to
32780# Autoconf.
32781for ac_file in $ac_files ''
32782do
32783  test -f "$ac_file" || continue
32784  case $ac_file in
32785    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
32786	;;
32787    [ab].out )
32788	# We found the default executable, but exeext='' is most
32789	# certainly right.
32790	break;;
32791    *.* )
32792	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
32793	then :; else
32794	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32795	fi
32796	# We set ac_cv_exeext here because the later test for it is not
32797	# safe: cross compilers may not add the suffix if given an `-o'
32798	# argument, so we may need to know it at that point already.
32799	# Even if this section looks crufty: it has the advantage of
32800	# actually working.
32801	break;;
32802    * )
32803	break;;
32804  esac
32805done
32806test "$ac_cv_exeext" = no && ac_cv_exeext=
32807
32808else
32809  ac_file=''
32810fi
32811if test -z "$ac_file"; then :
32812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32813$as_echo "no" >&6; }
32814$as_echo "$as_me: failed program was:" >&5
32815sed 's/^/| /' conftest.$ac_ext >&5
32816
32817{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32819as_fn_error 77 "C compiler cannot create executables
32820See \`config.log' for more details" "$LINENO" 5; }
32821else
32822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32823$as_echo "yes" >&6; }
32824fi
32825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
32826$as_echo_n "checking for C compiler default output file name... " >&6; }
32827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
32828$as_echo "$ac_file" >&6; }
32829ac_exeext=$ac_cv_exeext
32830
32831rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
32832ac_clean_files=$ac_clean_files_save
32833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
32834$as_echo_n "checking for suffix of executables... " >&6; }
32835if { { ac_try="$ac_link"
32836case "(($ac_try" in
32837  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32838  *) ac_try_echo=$ac_try;;
32839esac
32840eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32841$as_echo "$ac_try_echo"; } >&5
32842  (eval "$ac_link") 2>&5
32843  ac_status=$?
32844  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32845  test $ac_status = 0; }; then :
32846  # If both `conftest.exe' and `conftest' are `present' (well, observable)
32847# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
32848# work properly (i.e., refer to `conftest.exe'), while it won't with
32849# `rm'.
32850for ac_file in conftest.exe conftest conftest.*; do
32851  test -f "$ac_file" || continue
32852  case $ac_file in
32853    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
32854    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
32855	  break;;
32856    * ) break;;
32857  esac
32858done
32859else
32860  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32862as_fn_error $? "cannot compute suffix of executables: cannot compile and link
32863See \`config.log' for more details" "$LINENO" 5; }
32864fi
32865rm -f conftest conftest$ac_cv_exeext
32866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
32867$as_echo "$ac_cv_exeext" >&6; }
32868
32869rm -f conftest.$ac_ext
32870EXEEXT=$ac_cv_exeext
32871ac_exeext=$EXEEXT
32872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32873/* end confdefs.h.  */
32874#include <stdio.h>
32875int
32876main ()
32877{
32878FILE *f = fopen ("conftest.out", "w");
32879 return ferror (f) || fclose (f) != 0;
32880
32881  ;
32882  return 0;
32883}
32884_ACEOF
32885ac_clean_files="$ac_clean_files conftest.out"
32886# Check that the compiler produces executables we can run.  If not, either
32887# the compiler is broken, or we cross compile.
32888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
32889$as_echo_n "checking whether we are cross compiling... " >&6; }
32890if test "$cross_compiling" != yes; then
32891  { { ac_try="$ac_link"
32892case "(($ac_try" in
32893  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32894  *) ac_try_echo=$ac_try;;
32895esac
32896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32897$as_echo "$ac_try_echo"; } >&5
32898  (eval "$ac_link") 2>&5
32899  ac_status=$?
32900  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32901  test $ac_status = 0; }
32902  if { ac_try='./conftest$ac_cv_exeext'
32903  { { case "(($ac_try" in
32904  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32905  *) ac_try_echo=$ac_try;;
32906esac
32907eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32908$as_echo "$ac_try_echo"; } >&5
32909  (eval "$ac_try") 2>&5
32910  ac_status=$?
32911  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32912  test $ac_status = 0; }; }; then
32913    cross_compiling=no
32914  else
32915    if test "$cross_compiling" = maybe; then
32916	cross_compiling=yes
32917    else
32918	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32920as_fn_error $? "cannot run C compiled programs.
32921If you meant to cross compile, use \`--host'.
32922See \`config.log' for more details" "$LINENO" 5; }
32923    fi
32924  fi
32925fi
32926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
32927$as_echo "$cross_compiling" >&6; }
32928
32929rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
32930ac_clean_files=$ac_clean_files_save
32931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
32932$as_echo_n "checking for suffix of object files... " >&6; }
32933if ${ac_cv_objext+:} false; then :
32934  $as_echo_n "(cached) " >&6
32935else
32936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32937/* end confdefs.h.  */
32938
32939int
32940main ()
32941{
32942
32943  ;
32944  return 0;
32945}
32946_ACEOF
32947rm -f conftest.o conftest.obj
32948if { { ac_try="$ac_compile"
32949case "(($ac_try" in
32950  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32951  *) ac_try_echo=$ac_try;;
32952esac
32953eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32954$as_echo "$ac_try_echo"; } >&5
32955  (eval "$ac_compile") 2>&5
32956  ac_status=$?
32957  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32958  test $ac_status = 0; }; then :
32959  for ac_file in conftest.o conftest.obj conftest.*; do
32960  test -f "$ac_file" || continue;
32961  case $ac_file in
32962    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
32963    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
32964       break;;
32965  esac
32966done
32967else
32968  $as_echo "$as_me: failed program was:" >&5
32969sed 's/^/| /' conftest.$ac_ext >&5
32970
32971{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32973as_fn_error $? "cannot compute suffix of object files: cannot compile
32974See \`config.log' for more details" "$LINENO" 5; }
32975fi
32976rm -f conftest.$ac_cv_objext conftest.$ac_ext
32977fi
32978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
32979$as_echo "$ac_cv_objext" >&6; }
32980OBJEXT=$ac_cv_objext
32981ac_objext=$OBJEXT
32982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
32983$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
32984if ${ac_cv_c_compiler_gnu+:} false; then :
32985  $as_echo_n "(cached) " >&6
32986else
32987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32988/* end confdefs.h.  */
32989
32990int
32991main ()
32992{
32993#ifndef __GNUC__
32994       choke me
32995#endif
32996
32997  ;
32998  return 0;
32999}
33000_ACEOF
33001if ac_fn_c_try_compile "$LINENO"; then :
33002  ac_compiler_gnu=yes
33003else
33004  ac_compiler_gnu=no
33005fi
33006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33007ac_cv_c_compiler_gnu=$ac_compiler_gnu
33008
33009fi
33010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33011$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33012if test $ac_compiler_gnu = yes; then
33013  GCC=yes
33014else
33015  GCC=
33016fi
33017ac_test_CFLAGS=${CFLAGS+set}
33018ac_save_CFLAGS=$CFLAGS
33019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33020$as_echo_n "checking whether $CC accepts -g... " >&6; }
33021if ${ac_cv_prog_cc_g+:} false; then :
33022  $as_echo_n "(cached) " >&6
33023else
33024  ac_save_c_werror_flag=$ac_c_werror_flag
33025   ac_c_werror_flag=yes
33026   ac_cv_prog_cc_g=no
33027   CFLAGS="-g"
33028   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33029/* end confdefs.h.  */
33030
33031int
33032main ()
33033{
33034
33035  ;
33036  return 0;
33037}
33038_ACEOF
33039if ac_fn_c_try_compile "$LINENO"; then :
33040  ac_cv_prog_cc_g=yes
33041else
33042  CFLAGS=""
33043      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33044/* end confdefs.h.  */
33045
33046int
33047main ()
33048{
33049
33050  ;
33051  return 0;
33052}
33053_ACEOF
33054if ac_fn_c_try_compile "$LINENO"; then :
33055
33056else
33057  ac_c_werror_flag=$ac_save_c_werror_flag
33058	 CFLAGS="-g"
33059	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33060/* end confdefs.h.  */
33061
33062int
33063main ()
33064{
33065
33066  ;
33067  return 0;
33068}
33069_ACEOF
33070if ac_fn_c_try_compile "$LINENO"; then :
33071  ac_cv_prog_cc_g=yes
33072fi
33073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33074fi
33075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33076fi
33077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33078   ac_c_werror_flag=$ac_save_c_werror_flag
33079fi
33080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33081$as_echo "$ac_cv_prog_cc_g" >&6; }
33082if test "$ac_test_CFLAGS" = set; then
33083  CFLAGS=$ac_save_CFLAGS
33084elif test $ac_cv_prog_cc_g = yes; then
33085  if test "$GCC" = yes; then
33086    CFLAGS="-g -O2"
33087  else
33088    CFLAGS="-g"
33089  fi
33090else
33091  if test "$GCC" = yes; then
33092    CFLAGS="-O2"
33093  else
33094    CFLAGS=
33095  fi
33096fi
33097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33098$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33099if ${ac_cv_prog_cc_c89+:} false; then :
33100  $as_echo_n "(cached) " >&6
33101else
33102  ac_cv_prog_cc_c89=no
33103ac_save_CC=$CC
33104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33105/* end confdefs.h.  */
33106#include <stdarg.h>
33107#include <stdio.h>
33108struct stat;
33109/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33110struct buf { int x; };
33111FILE * (*rcsopen) (struct buf *, struct stat *, int);
33112static char *e (p, i)
33113     char **p;
33114     int i;
33115{
33116  return p[i];
33117}
33118static char *f (char * (*g) (char **, int), char **p, ...)
33119{
33120  char *s;
33121  va_list v;
33122  va_start (v,p);
33123  s = g (p, va_arg (v,int));
33124  va_end (v);
33125  return s;
33126}
33127
33128/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33129   function prototypes and stuff, but not '\xHH' hex character constants.
33130   These don't provoke an error unfortunately, instead are silently treated
33131   as 'x'.  The following induces an error, until -std is added to get
33132   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33133   array size at least.  It's necessary to write '\x00'==0 to get something
33134   that's true only with -std.  */
33135int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33136
33137/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33138   inside strings and character constants.  */
33139#define FOO(x) 'x'
33140int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33141
33142int test (int i, double x);
33143struct s1 {int (*f) (int a);};
33144struct s2 {int (*f) (double a);};
33145int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33146int argc;
33147char **argv;
33148int
33149main ()
33150{
33151return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33152  ;
33153  return 0;
33154}
33155_ACEOF
33156for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33157	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33158do
33159  CC="$ac_save_CC $ac_arg"
33160  if ac_fn_c_try_compile "$LINENO"; then :
33161  ac_cv_prog_cc_c89=$ac_arg
33162fi
33163rm -f core conftest.err conftest.$ac_objext
33164  test "x$ac_cv_prog_cc_c89" != "xno" && break
33165done
33166rm -f conftest.$ac_ext
33167CC=$ac_save_CC
33168
33169fi
33170# AC_CACHE_VAL
33171case "x$ac_cv_prog_cc_c89" in
33172  x)
33173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33174$as_echo "none needed" >&6; } ;;
33175  xno)
33176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33177$as_echo "unsupported" >&6; } ;;
33178  *)
33179    CC="$CC $ac_cv_prog_cc_c89"
33180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33181$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33182esac
33183if test "x$ac_cv_prog_cc_c89" != xno; then :
33184
33185fi
33186
33187ac_ext=cpp
33188ac_cpp='$CXXCPP $CPPFLAGS'
33189ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33190ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33191ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33192
33193
33194
33195  COMPILER_NAME=C++
33196  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33197
33198  if test "x$CXX" != x; then
33199    # User has supplied compiler name already, always let that override.
33200    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33201$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33202    if test "x`basename $CXX`" = "x$CXX"; then
33203      # A command without a complete path is provided, search $PATH.
33204
33205      for ac_prog in $CXX
33206do
33207  # Extract the first word of "$ac_prog", so it can be a program name with args.
33208set dummy $ac_prog; ac_word=$2
33209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33210$as_echo_n "checking for $ac_word... " >&6; }
33211if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33212  $as_echo_n "(cached) " >&6
33213else
33214  case $POTENTIAL_CXX in
33215  [\\/]* | ?:[\\/]*)
33216  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33217  ;;
33218  *)
33219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33220for as_dir in $PATH
33221do
33222  IFS=$as_save_IFS
33223  test -z "$as_dir" && as_dir=.
33224    for ac_exec_ext in '' $ac_executable_extensions; do
33225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33226    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33228    break 2
33229  fi
33230done
33231  done
33232IFS=$as_save_IFS
33233
33234  ;;
33235esac
33236fi
33237POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33238if test -n "$POTENTIAL_CXX"; then
33239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33240$as_echo "$POTENTIAL_CXX" >&6; }
33241else
33242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33243$as_echo "no" >&6; }
33244fi
33245
33246
33247  test -n "$POTENTIAL_CXX" && break
33248done
33249
33250      if test "x$POTENTIAL_CXX" != x; then
33251        CXX=$POTENTIAL_CXX
33252      else
33253        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33254      fi
33255    else
33256      # Otherwise it might already be a complete path
33257      if test ! -x "$CXX"; then
33258        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33259      fi
33260    fi
33261  else
33262    # No user supplied value. Locate compiler ourselves.
33263
33264    # If we are cross compiling, assume cross compilation tools follows the
33265    # cross compilation standard where they are prefixed with the autoconf
33266    # standard name for the target. For example the binary
33267    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33268    # If we are not cross compiling, then the default compiler name will be
33269    # used.
33270
33271    CXX=
33272    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33273    # before checking the rest of the PATH.
33274    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33275    # step, this should not be necessary.
33276    if test -n "$TOOLCHAIN_PATH"; then
33277      PATH_save="$PATH"
33278      PATH="$TOOLCHAIN_PATH"
33279      for ac_prog in $SEARCH_LIST
33280do
33281  # Extract the first word of "$ac_prog", so it can be a program name with args.
33282set dummy $ac_prog; ac_word=$2
33283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33284$as_echo_n "checking for $ac_word... " >&6; }
33285if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33286  $as_echo_n "(cached) " >&6
33287else
33288  case $TOOLCHAIN_PATH_CXX in
33289  [\\/]* | ?:[\\/]*)
33290  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33291  ;;
33292  *)
33293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33294for as_dir in $PATH
33295do
33296  IFS=$as_save_IFS
33297  test -z "$as_dir" && as_dir=.
33298    for ac_exec_ext in '' $ac_executable_extensions; do
33299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33300    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33302    break 2
33303  fi
33304done
33305  done
33306IFS=$as_save_IFS
33307
33308  ;;
33309esac
33310fi
33311TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33312if test -n "$TOOLCHAIN_PATH_CXX"; then
33313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33314$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33315else
33316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33317$as_echo "no" >&6; }
33318fi
33319
33320
33321  test -n "$TOOLCHAIN_PATH_CXX" && break
33322done
33323
33324      CXX=$TOOLCHAIN_PATH_CXX
33325      PATH="$PATH_save"
33326    fi
33327
33328    # AC_PATH_PROGS can't be run multiple times with the same variable,
33329    # so create a new name for this run.
33330    if test "x$CXX" = x; then
33331      for ac_prog in $SEARCH_LIST
33332do
33333  # Extract the first word of "$ac_prog", so it can be a program name with args.
33334set dummy $ac_prog; ac_word=$2
33335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33336$as_echo_n "checking for $ac_word... " >&6; }
33337if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33338  $as_echo_n "(cached) " >&6
33339else
33340  case $POTENTIAL_CXX in
33341  [\\/]* | ?:[\\/]*)
33342  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33343  ;;
33344  *)
33345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33346for as_dir in $PATH
33347do
33348  IFS=$as_save_IFS
33349  test -z "$as_dir" && as_dir=.
33350    for ac_exec_ext in '' $ac_executable_extensions; do
33351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33352    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33354    break 2
33355  fi
33356done
33357  done
33358IFS=$as_save_IFS
33359
33360  ;;
33361esac
33362fi
33363POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33364if test -n "$POTENTIAL_CXX"; then
33365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33366$as_echo "$POTENTIAL_CXX" >&6; }
33367else
33368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33369$as_echo "no" >&6; }
33370fi
33371
33372
33373  test -n "$POTENTIAL_CXX" && break
33374done
33375
33376      CXX=$POTENTIAL_CXX
33377    fi
33378
33379    if test "x$CXX" = x; then
33380
33381  # Print a helpful message on how to acquire the necessary build dependency.
33382  # devkit is the help tag: freetype, cups, alsa etc
33383  MISSING_DEPENDENCY=devkit
33384
33385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33386    cygwin_help $MISSING_DEPENDENCY
33387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33388    msys_help $MISSING_DEPENDENCY
33389  else
33390    PKGHANDLER_COMMAND=
33391
33392    case $PKGHANDLER in
33393      apt-get)
33394        apt_help     $MISSING_DEPENDENCY ;;
33395      yum)
33396        yum_help     $MISSING_DEPENDENCY ;;
33397      port)
33398        port_help    $MISSING_DEPENDENCY ;;
33399      pkgutil)
33400        pkgutil_help $MISSING_DEPENDENCY ;;
33401      pkgadd)
33402        pkgadd_help  $MISSING_DEPENDENCY ;;
33403    esac
33404
33405    if test "x$PKGHANDLER_COMMAND" != x; then
33406      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33407    fi
33408  fi
33409
33410      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33411    fi
33412  fi
33413
33414  # Now we have a compiler binary in CXX. Make sure it's okay.
33415
33416  # Only process if variable expands to non-empty
33417
33418  if test "x$CXX" != x; then
33419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33420
33421  # First separate the path from the arguments. This will split at the first
33422  # space.
33423  complete="$CXX"
33424  path="${complete%% *}"
33425  tmp="$complete EOL"
33426  arguments="${tmp#* }"
33427
33428  # Input might be given as Windows format, start by converting to
33429  # unix format.
33430  new_path=`$CYGPATH -u "$path"`
33431
33432  # Now try to locate executable using which
33433  new_path=`$WHICH "$new_path" 2> /dev/null`
33434  # bat and cmd files are not always considered executable in cygwin causing which
33435  # to not find them
33436  if test "x$new_path" = x \
33437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33439    new_path=`$CYGPATH -u "$path"`
33440  fi
33441  if test "x$new_path" = x; then
33442    # Oops. Which didn't find the executable.
33443    # The splitting of arguments from the executable at a space might have been incorrect,
33444    # since paths with space are more likely in Windows. Give it another try with the whole
33445    # argument.
33446    path="$complete"
33447    arguments="EOL"
33448    new_path=`$CYGPATH -u "$path"`
33449    new_path=`$WHICH "$new_path" 2> /dev/null`
33450    # bat and cmd files are not always considered executable in cygwin causing which
33451    # to not find them
33452    if test "x$new_path" = x \
33453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33455      new_path=`$CYGPATH -u "$path"`
33456    fi
33457    if test "x$new_path" = x; then
33458      # It's still not found. Now this is an unrecoverable error.
33459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33460$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33461      has_space=`$ECHO "$complete" | $GREP " "`
33462      if test "x$has_space" != x; then
33463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33465      fi
33466      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33467    fi
33468  fi
33469
33470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33473  # "foo.exe" is OK but "foo" is an error.
33474  #
33475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33476  # It is also a way to make sure we got the proper file name for the real test later on.
33477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33478  if test "x$test_shortpath" = x; then
33479    # Short path failed, file does not exist as specified.
33480    # Try adding .exe or .cmd
33481    if test -f "${new_path}.exe"; then
33482      input_to_shortpath="${new_path}.exe"
33483    elif test -f "${new_path}.cmd"; then
33484      input_to_shortpath="${new_path}.cmd"
33485    else
33486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
33487$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
33488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33490      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33491    fi
33492  else
33493    input_to_shortpath="$new_path"
33494  fi
33495
33496  # Call helper function which possibly converts this using DOS-style short mode.
33497  # If so, the updated path is stored in $new_path.
33498  new_path="$input_to_shortpath"
33499
33500  input_path="$input_to_shortpath"
33501  # Check if we need to convert this using DOS-style short mode. If the path
33502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33503  # take no chances and rewrite it.
33504  # Note: m4 eats our [], so we need to use [ and ] instead.
33505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33506  if test "x$has_forbidden_chars" != x; then
33507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33511      # Going to short mode and back again did indeed matter. Since short mode is
33512      # case insensitive, let's make it lowercase to improve readability.
33513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33514      # Now convert it back to Unix-style (cygpath)
33515      input_path=`$CYGPATH -u "$shortmode_path"`
33516      new_path="$input_path"
33517    fi
33518  fi
33519
33520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33521  if test "x$test_cygdrive_prefix" = x; then
33522    # As a simple fix, exclude /usr/bin since it's not a real path.
33523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33525      # a path prefixed by /cygdrive for fixpath to work.
33526      new_path="$CYGWIN_ROOT_PATH$input_path"
33527    fi
33528  fi
33529
33530  # remove trailing .exe if any
33531  new_path="${new_path/%.exe/}"
33532
33533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33534
33535  # First separate the path from the arguments. This will split at the first
33536  # space.
33537  complete="$CXX"
33538  path="${complete%% *}"
33539  tmp="$complete EOL"
33540  arguments="${tmp#* }"
33541
33542  # Input might be given as Windows format, start by converting to
33543  # unix format.
33544  new_path="$path"
33545
33546  windows_path="$new_path"
33547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33548    unix_path=`$CYGPATH -u "$windows_path"`
33549    new_path="$unix_path"
33550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33552    new_path="$unix_path"
33553  fi
33554
33555
33556  # Now try to locate executable using which
33557  new_path=`$WHICH "$new_path" 2> /dev/null`
33558
33559  if test "x$new_path" = x; then
33560    # Oops. Which didn't find the executable.
33561    # The splitting of arguments from the executable at a space might have been incorrect,
33562    # since paths with space are more likely in Windows. Give it another try with the whole
33563    # argument.
33564    path="$complete"
33565    arguments="EOL"
33566    new_path="$path"
33567
33568  windows_path="$new_path"
33569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33570    unix_path=`$CYGPATH -u "$windows_path"`
33571    new_path="$unix_path"
33572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33574    new_path="$unix_path"
33575  fi
33576
33577
33578    new_path=`$WHICH "$new_path" 2> /dev/null`
33579    # bat and cmd files are not always considered executable in MSYS causing which
33580    # to not find them
33581    if test "x$new_path" = x \
33582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33584      new_path="$path"
33585
33586  windows_path="$new_path"
33587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33588    unix_path=`$CYGPATH -u "$windows_path"`
33589    new_path="$unix_path"
33590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33592    new_path="$unix_path"
33593  fi
33594
33595    fi
33596
33597    if test "x$new_path" = x; then
33598      # It's still not found. Now this is an unrecoverable error.
33599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33600$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33601      has_space=`$ECHO "$complete" | $GREP " "`
33602      if test "x$has_space" != x; then
33603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33605      fi
33606      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33607    fi
33608  fi
33609
33610  # Now new_path has a complete unix path to the binary
33611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33612    # Keep paths in /bin as-is, but remove trailing .exe if any
33613    new_path="${new_path/%.exe/}"
33614    # Do not save /bin paths to all_fixpath_prefixes!
33615  else
33616    # Not in mixed or Windows style, start by that.
33617    new_path=`cmd //c echo $new_path`
33618
33619  input_path="$new_path"
33620  # Check if we need to convert this using DOS-style short mode. If the path
33621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33622  # take no chances and rewrite it.
33623  # Note: m4 eats our [], so we need to use [ and ] instead.
33624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33625  if test "x$has_forbidden_chars" != x; then
33626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33628  fi
33629
33630    # Output is in $new_path
33631
33632  windows_path="$new_path"
33633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33634    unix_path=`$CYGPATH -u "$windows_path"`
33635    new_path="$unix_path"
33636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33638    new_path="$unix_path"
33639  fi
33640
33641    # remove trailing .exe if any
33642    new_path="${new_path/%.exe/}"
33643
33644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33646  fi
33647
33648    else
33649      # We're on a unix platform. Hooray! :)
33650      # First separate the path from the arguments. This will split at the first
33651      # space.
33652      complete="$CXX"
33653      path="${complete%% *}"
33654      tmp="$complete EOL"
33655      arguments="${tmp#* }"
33656
33657      # Cannot rely on the command "which" here since it doesn't always work.
33658      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33659      if test -z "$is_absolute_path"; then
33660        # Path to executable is not absolute. Find it.
33661        IFS_save="$IFS"
33662        IFS=:
33663        for p in $PATH; do
33664          if test -f "$p/$path" && test -x "$p/$path"; then
33665            new_path="$p/$path"
33666            break
33667          fi
33668        done
33669        IFS="$IFS_save"
33670      else
33671        # This is an absolute path, we can use it without further modifications.
33672        new_path="$path"
33673      fi
33674
33675      if test "x$new_path" = x; then
33676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
33677$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
33678        has_space=`$ECHO "$complete" | $GREP " "`
33679        if test "x$has_space" != x; then
33680          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33682        fi
33683        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
33684      fi
33685    fi
33686
33687    # Now join together the path and the arguments once again
33688    if test "x$arguments" != xEOL; then
33689      new_complete="$new_path ${arguments% *}"
33690    else
33691      new_complete="$new_path"
33692    fi
33693
33694    if test "x$complete" != "x$new_complete"; then
33695      CXX="$new_complete"
33696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
33697$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
33698    fi
33699  fi
33700
33701  TEST_COMPILER="$CXX"
33702  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
33703  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
33704  if test "x$OPENJDK_BUILD_OS" != xaix; then
33705    # FIXME: This test should not be needed anymore; we don't do that for any platform.
33706    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
33707$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
33708
33709  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33710    # Follow a chain of symbolic links. Use readlink
33711    # where it exists, else fall back to horribly
33712    # complicated shell code.
33713    if test "x$READLINK_TESTED" != yes; then
33714      # On MacOSX there is a readlink tool with a different
33715      # purpose than the GNU readlink tool. Check the found readlink.
33716      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33717      if test "x$ISGNU" = x; then
33718        # A readlink that we do not know how to use.
33719        # Are there other non-GNU readlinks out there?
33720        READLINK_TESTED=yes
33721        READLINK=
33722      fi
33723    fi
33724
33725    if test "x$READLINK" != x; then
33726      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
33727    else
33728      # Save the current directory for restoring afterwards
33729      STARTDIR=$PWD
33730      COUNTER=0
33731      sym_link_dir=`$DIRNAME $TEST_COMPILER`
33732      sym_link_file=`$BASENAME $TEST_COMPILER`
33733      cd $sym_link_dir
33734      # Use -P flag to resolve symlinks in directories.
33735      cd `$THEPWDCMD -P`
33736      sym_link_dir=`$THEPWDCMD -P`
33737      # Resolve file symlinks
33738      while test $COUNTER -lt 20; do
33739        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33740        if test "x$ISLINK" == x; then
33741          # This is not a symbolic link! We are done!
33742          break
33743        fi
33744        # Again resolve directory symlinks since the target of the just found
33745        # link could be in a different directory
33746        cd `$DIRNAME $ISLINK`
33747        sym_link_dir=`$THEPWDCMD -P`
33748        sym_link_file=`$BASENAME $ISLINK`
33749        let COUNTER=COUNTER+1
33750      done
33751      cd $STARTDIR
33752      TEST_COMPILER=$sym_link_dir/$sym_link_file
33753    fi
33754  fi
33755
33756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
33757$as_echo "$TEST_COMPILER" >&6; }
33758  fi
33759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
33760$as_echo_n "checking if CXX is disguised ccache... " >&6; }
33761
33762  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
33763  if test "x$COMPILER_BASENAME" = "xccache"; then
33764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
33765$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
33766    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
33767    # We want to control ccache invocation ourselves, so ignore this cc and try
33768    # searching again.
33769
33770    # Remove the path to the fake ccache cc from the PATH
33771    RETRY_COMPILER_SAVED_PATH="$PATH"
33772    COMPILER_DIRNAME=`$DIRNAME $CXX`
33773    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
33774
33775    # Try again looking for our compiler
33776    if test -n "$ac_tool_prefix"; then
33777  for ac_prog in $TOOLCHAIN_CXX_BINARY
33778  do
33779    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33780set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33782$as_echo_n "checking for $ac_word... " >&6; }
33783if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
33784  $as_echo_n "(cached) " >&6
33785else
33786  if test -n "$PROPER_COMPILER_CXX"; then
33787  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
33788else
33789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33790for as_dir in $PATH
33791do
33792  IFS=$as_save_IFS
33793  test -z "$as_dir" && as_dir=.
33794    for ac_exec_ext in '' $ac_executable_extensions; do
33795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33796    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
33797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33798    break 2
33799  fi
33800done
33801  done
33802IFS=$as_save_IFS
33803
33804fi
33805fi
33806PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
33807if test -n "$PROPER_COMPILER_CXX"; then
33808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
33809$as_echo "$PROPER_COMPILER_CXX" >&6; }
33810else
33811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33812$as_echo "no" >&6; }
33813fi
33814
33815
33816    test -n "$PROPER_COMPILER_CXX" && break
33817  done
33818fi
33819if test -z "$PROPER_COMPILER_CXX"; then
33820  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
33821  for ac_prog in $TOOLCHAIN_CXX_BINARY
33822do
33823  # Extract the first word of "$ac_prog", so it can be a program name with args.
33824set dummy $ac_prog; ac_word=$2
33825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33826$as_echo_n "checking for $ac_word... " >&6; }
33827if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
33828  $as_echo_n "(cached) " >&6
33829else
33830  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33831  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
33832else
33833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33834for as_dir in $PATH
33835do
33836  IFS=$as_save_IFS
33837  test -z "$as_dir" && as_dir=.
33838    for ac_exec_ext in '' $ac_executable_extensions; do
33839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33840    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
33841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33842    break 2
33843  fi
33844done
33845  done
33846IFS=$as_save_IFS
33847
33848fi
33849fi
33850ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
33851if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
33852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
33853$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
33854else
33855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33856$as_echo "no" >&6; }
33857fi
33858
33859
33860  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
33861done
33862
33863  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
33864    PROPER_COMPILER_CXX=""
33865  else
33866    case $cross_compiling:$ac_tool_warned in
33867yes:)
33868{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33869$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33870ac_tool_warned=yes ;;
33871esac
33872    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
33873  fi
33874fi
33875
33876
33877  # Only process if variable expands to non-empty
33878
33879  if test "x$PROPER_COMPILER_CXX" != x; then
33880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33881
33882  # First separate the path from the arguments. This will split at the first
33883  # space.
33884  complete="$PROPER_COMPILER_CXX"
33885  path="${complete%% *}"
33886  tmp="$complete EOL"
33887  arguments="${tmp#* }"
33888
33889  # Input might be given as Windows format, start by converting to
33890  # unix format.
33891  new_path=`$CYGPATH -u "$path"`
33892
33893  # Now try to locate executable using which
33894  new_path=`$WHICH "$new_path" 2> /dev/null`
33895  # bat and cmd files are not always considered executable in cygwin causing which
33896  # to not find them
33897  if test "x$new_path" = x \
33898      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33899      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33900    new_path=`$CYGPATH -u "$path"`
33901  fi
33902  if test "x$new_path" = x; then
33903    # Oops. Which didn't find the executable.
33904    # The splitting of arguments from the executable at a space might have been incorrect,
33905    # since paths with space are more likely in Windows. Give it another try with the whole
33906    # argument.
33907    path="$complete"
33908    arguments="EOL"
33909    new_path=`$CYGPATH -u "$path"`
33910    new_path=`$WHICH "$new_path" 2> /dev/null`
33911    # bat and cmd files are not always considered executable in cygwin causing which
33912    # to not find them
33913    if test "x$new_path" = x \
33914        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33915        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33916      new_path=`$CYGPATH -u "$path"`
33917    fi
33918    if test "x$new_path" = x; then
33919      # It's still not found. Now this is an unrecoverable error.
33920      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
33921$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
33922      has_space=`$ECHO "$complete" | $GREP " "`
33923      if test "x$has_space" != x; then
33924        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33925$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33926      fi
33927      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33928    fi
33929  fi
33930
33931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33934  # "foo.exe" is OK but "foo" is an error.
33935  #
33936  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33937  # It is also a way to make sure we got the proper file name for the real test later on.
33938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33939  if test "x$test_shortpath" = x; then
33940    # Short path failed, file does not exist as specified.
33941    # Try adding .exe or .cmd
33942    if test -f "${new_path}.exe"; then
33943      input_to_shortpath="${new_path}.exe"
33944    elif test -f "${new_path}.cmd"; then
33945      input_to_shortpath="${new_path}.cmd"
33946    else
33947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
33948$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
33949      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33950$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33951      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
33952    fi
33953  else
33954    input_to_shortpath="$new_path"
33955  fi
33956
33957  # Call helper function which possibly converts this using DOS-style short mode.
33958  # If so, the updated path is stored in $new_path.
33959  new_path="$input_to_shortpath"
33960
33961  input_path="$input_to_shortpath"
33962  # Check if we need to convert this using DOS-style short mode. If the path
33963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33964  # take no chances and rewrite it.
33965  # Note: m4 eats our [], so we need to use [ and ] instead.
33966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33967  if test "x$has_forbidden_chars" != x; then
33968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33972      # Going to short mode and back again did indeed matter. Since short mode is
33973      # case insensitive, let's make it lowercase to improve readability.
33974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33975      # Now convert it back to Unix-style (cygpath)
33976      input_path=`$CYGPATH -u "$shortmode_path"`
33977      new_path="$input_path"
33978    fi
33979  fi
33980
33981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33982  if test "x$test_cygdrive_prefix" = x; then
33983    # As a simple fix, exclude /usr/bin since it's not a real path.
33984    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33986      # a path prefixed by /cygdrive for fixpath to work.
33987      new_path="$CYGWIN_ROOT_PATH$input_path"
33988    fi
33989  fi
33990
33991  # remove trailing .exe if any
33992  new_path="${new_path/%.exe/}"
33993
33994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33995
33996  # First separate the path from the arguments. This will split at the first
33997  # space.
33998  complete="$PROPER_COMPILER_CXX"
33999  path="${complete%% *}"
34000  tmp="$complete EOL"
34001  arguments="${tmp#* }"
34002
34003  # Input might be given as Windows format, start by converting to
34004  # unix format.
34005  new_path="$path"
34006
34007  windows_path="$new_path"
34008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34009    unix_path=`$CYGPATH -u "$windows_path"`
34010    new_path="$unix_path"
34011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34013    new_path="$unix_path"
34014  fi
34015
34016
34017  # Now try to locate executable using which
34018  new_path=`$WHICH "$new_path" 2> /dev/null`
34019
34020  if test "x$new_path" = x; then
34021    # Oops. Which didn't find the executable.
34022    # The splitting of arguments from the executable at a space might have been incorrect,
34023    # since paths with space are more likely in Windows. Give it another try with the whole
34024    # argument.
34025    path="$complete"
34026    arguments="EOL"
34027    new_path="$path"
34028
34029  windows_path="$new_path"
34030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34031    unix_path=`$CYGPATH -u "$windows_path"`
34032    new_path="$unix_path"
34033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34035    new_path="$unix_path"
34036  fi
34037
34038
34039    new_path=`$WHICH "$new_path" 2> /dev/null`
34040    # bat and cmd files are not always considered executable in MSYS causing which
34041    # to not find them
34042    if test "x$new_path" = x \
34043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34045      new_path="$path"
34046
34047  windows_path="$new_path"
34048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34049    unix_path=`$CYGPATH -u "$windows_path"`
34050    new_path="$unix_path"
34051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34053    new_path="$unix_path"
34054  fi
34055
34056    fi
34057
34058    if test "x$new_path" = x; then
34059      # It's still not found. Now this is an unrecoverable error.
34060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34061$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34062      has_space=`$ECHO "$complete" | $GREP " "`
34063      if test "x$has_space" != x; then
34064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34066      fi
34067      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34068    fi
34069  fi
34070
34071  # Now new_path has a complete unix path to the binary
34072  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34073    # Keep paths in /bin as-is, but remove trailing .exe if any
34074    new_path="${new_path/%.exe/}"
34075    # Do not save /bin paths to all_fixpath_prefixes!
34076  else
34077    # Not in mixed or Windows style, start by that.
34078    new_path=`cmd //c echo $new_path`
34079
34080  input_path="$new_path"
34081  # Check if we need to convert this using DOS-style short mode. If the path
34082  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34083  # take no chances and rewrite it.
34084  # Note: m4 eats our [], so we need to use [ and ] instead.
34085  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34086  if test "x$has_forbidden_chars" != x; then
34087    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34088    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34089  fi
34090
34091    # Output is in $new_path
34092
34093  windows_path="$new_path"
34094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34095    unix_path=`$CYGPATH -u "$windows_path"`
34096    new_path="$unix_path"
34097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34099    new_path="$unix_path"
34100  fi
34101
34102    # remove trailing .exe if any
34103    new_path="${new_path/%.exe/}"
34104
34105    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34106    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34107  fi
34108
34109    else
34110      # We're on a unix platform. Hooray! :)
34111      # First separate the path from the arguments. This will split at the first
34112      # space.
34113      complete="$PROPER_COMPILER_CXX"
34114      path="${complete%% *}"
34115      tmp="$complete EOL"
34116      arguments="${tmp#* }"
34117
34118      # Cannot rely on the command "which" here since it doesn't always work.
34119      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34120      if test -z "$is_absolute_path"; then
34121        # Path to executable is not absolute. Find it.
34122        IFS_save="$IFS"
34123        IFS=:
34124        for p in $PATH; do
34125          if test -f "$p/$path" && test -x "$p/$path"; then
34126            new_path="$p/$path"
34127            break
34128          fi
34129        done
34130        IFS="$IFS_save"
34131      else
34132        # This is an absolute path, we can use it without further modifications.
34133        new_path="$path"
34134      fi
34135
34136      if test "x$new_path" = x; then
34137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
34138$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
34139        has_space=`$ECHO "$complete" | $GREP " "`
34140        if test "x$has_space" != x; then
34141          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34142$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34143        fi
34144        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
34145      fi
34146    fi
34147
34148    # Now join together the path and the arguments once again
34149    if test "x$arguments" != xEOL; then
34150      new_complete="$new_path ${arguments% *}"
34151    else
34152      new_complete="$new_path"
34153    fi
34154
34155    if test "x$complete" != "x$new_complete"; then
34156      PROPER_COMPILER_CXX="$new_complete"
34157      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
34158$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
34159    fi
34160  fi
34161
34162    PATH="$RETRY_COMPILER_SAVED_PATH"
34163
34164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
34165$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
34166
34167  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34168    # Follow a chain of symbolic links. Use readlink
34169    # where it exists, else fall back to horribly
34170    # complicated shell code.
34171    if test "x$READLINK_TESTED" != yes; then
34172      # On MacOSX there is a readlink tool with a different
34173      # purpose than the GNU readlink tool. Check the found readlink.
34174      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34175      if test "x$ISGNU" = x; then
34176        # A readlink that we do not know how to use.
34177        # Are there other non-GNU readlinks out there?
34178        READLINK_TESTED=yes
34179        READLINK=
34180      fi
34181    fi
34182
34183    if test "x$READLINK" != x; then
34184      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
34185    else
34186      # Save the current directory for restoring afterwards
34187      STARTDIR=$PWD
34188      COUNTER=0
34189      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
34190      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
34191      cd $sym_link_dir
34192      # Use -P flag to resolve symlinks in directories.
34193      cd `$THEPWDCMD -P`
34194      sym_link_dir=`$THEPWDCMD -P`
34195      # Resolve file symlinks
34196      while test $COUNTER -lt 20; do
34197        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34198        if test "x$ISLINK" == x; then
34199          # This is not a symbolic link! We are done!
34200          break
34201        fi
34202        # Again resolve directory symlinks since the target of the just found
34203        # link could be in a different directory
34204        cd `$DIRNAME $ISLINK`
34205        sym_link_dir=`$THEPWDCMD -P`
34206        sym_link_file=`$BASENAME $ISLINK`
34207        let COUNTER=COUNTER+1
34208      done
34209      cd $STARTDIR
34210      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
34211    fi
34212  fi
34213
34214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
34215$as_echo "$PROPER_COMPILER_CXX" >&6; }
34216    CXX="$PROPER_COMPILER_CXX"
34217  else
34218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
34219$as_echo "no, keeping CXX" >&6; }
34220  fi
34221
34222
34223  COMPILER=$CXX
34224  COMPILER_NAME=$COMPILER_NAME
34225
34226  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34227    # cc -V output typically looks like
34228    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34229    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34230    # Check that this is likely to be the Solaris Studio cc.
34231    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34232    if test $? -ne 0; then
34233      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34234      { $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
34235$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34236      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34237$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34238      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34239$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34240      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34241    fi
34242    # Remove usage instructions (if present), and
34243    # collapse compiler output into a single line
34244    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34245        $SED -e 's/ *[Uu]sage:.*//'`
34246    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34247        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34248  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34249    # xlc -qversion output typically looks like
34250    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34251    #     Version: 11.01.0000.0015
34252    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34253    # Check that this is likely to be the IBM XL C compiler.
34254    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34255    if test $? -ne 0; then
34256      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34257      { $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
34258$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34259      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34260$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34261      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34262$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34263      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34264    fi
34265    # Collapse compiler output into a single line
34266    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34267    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34268        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34269  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34270    # There is no specific version flag, but all output starts with a version string.
34271    # First line typically looks something like:
34272    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34273    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34274    # Check that this is likely to be Microsoft CL.EXE.
34275    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34276    if test $? -ne 0; then
34277      { $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
34278$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34279      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34280$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34281      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34282    fi
34283    # Collapse compiler output into a single line
34284    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34285    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34286        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34287  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34288    # gcc --version output typically looks like
34289    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34290    #     Copyright (C) 2013 Free Software Foundation, Inc.
34291    #     This is free software; see the source for copying conditions.  There is NO
34292    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34293    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34294    # Check that this is likely to be GCC.
34295    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34296    if test $? -ne 0; then
34297      { $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
34298$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34299      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34300$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34301      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34302    fi
34303    # Remove Copyright and legalese from version string, and
34304    # collapse into a single line
34305    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34306        $SED -e 's/ *Copyright .*//'`
34307    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34308        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
34309  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34310    # clang --version output typically looks like
34311    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34312    #    clang version 3.3 (tags/RELEASE_33/final)
34313    # or
34314    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34315    #    Target: x86_64-pc-linux-gnu
34316    #    Thread model: posix
34317    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34318    # Check that this is likely to be clang
34319    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34320    if test $? -ne 0; then
34321      { $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
34322$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34323      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34324$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34325      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34326    fi
34327    # Collapse compiler output into a single line
34328    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34329    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34330        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
34331  else
34332      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34333  fi
34334  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34335  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34336  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34337  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34338
34339  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34340$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34341
34342
34343  # Now that we have resolved CXX ourself, let autoconf have its go at it
34344  ac_ext=cpp
34345ac_cpp='$CXXCPP $CPPFLAGS'
34346ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34347ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34348ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34349if test -z "$CXX"; then
34350  if test -n "$CCC"; then
34351    CXX=$CCC
34352  else
34353    if test -n "$ac_tool_prefix"; then
34354  for ac_prog in $CXX
34355  do
34356    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34357set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34359$as_echo_n "checking for $ac_word... " >&6; }
34360if ${ac_cv_prog_CXX+:} false; then :
34361  $as_echo_n "(cached) " >&6
34362else
34363  if test -n "$CXX"; then
34364  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34365else
34366as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34367for as_dir in $PATH
34368do
34369  IFS=$as_save_IFS
34370  test -z "$as_dir" && as_dir=.
34371    for ac_exec_ext in '' $ac_executable_extensions; do
34372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34373    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34375    break 2
34376  fi
34377done
34378  done
34379IFS=$as_save_IFS
34380
34381fi
34382fi
34383CXX=$ac_cv_prog_CXX
34384if test -n "$CXX"; then
34385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34386$as_echo "$CXX" >&6; }
34387else
34388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34389$as_echo "no" >&6; }
34390fi
34391
34392
34393    test -n "$CXX" && break
34394  done
34395fi
34396if test -z "$CXX"; then
34397  ac_ct_CXX=$CXX
34398  for ac_prog in $CXX
34399do
34400  # Extract the first word of "$ac_prog", so it can be a program name with args.
34401set dummy $ac_prog; ac_word=$2
34402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34403$as_echo_n "checking for $ac_word... " >&6; }
34404if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34405  $as_echo_n "(cached) " >&6
34406else
34407  if test -n "$ac_ct_CXX"; then
34408  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34409else
34410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34411for as_dir in $PATH
34412do
34413  IFS=$as_save_IFS
34414  test -z "$as_dir" && as_dir=.
34415    for ac_exec_ext in '' $ac_executable_extensions; do
34416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34417    ac_cv_prog_ac_ct_CXX="$ac_prog"
34418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34419    break 2
34420  fi
34421done
34422  done
34423IFS=$as_save_IFS
34424
34425fi
34426fi
34427ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34428if test -n "$ac_ct_CXX"; then
34429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34430$as_echo "$ac_ct_CXX" >&6; }
34431else
34432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34433$as_echo "no" >&6; }
34434fi
34435
34436
34437  test -n "$ac_ct_CXX" && break
34438done
34439
34440  if test "x$ac_ct_CXX" = x; then
34441    CXX="g++"
34442  else
34443    case $cross_compiling:$ac_tool_warned in
34444yes:)
34445{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34446$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34447ac_tool_warned=yes ;;
34448esac
34449    CXX=$ac_ct_CXX
34450  fi
34451fi
34452
34453  fi
34454fi
34455# Provide some information about the compiler.
34456$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34457set X $ac_compile
34458ac_compiler=$2
34459for ac_option in --version -v -V -qversion; do
34460  { { ac_try="$ac_compiler $ac_option >&5"
34461case "(($ac_try" in
34462  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34463  *) ac_try_echo=$ac_try;;
34464esac
34465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34466$as_echo "$ac_try_echo"; } >&5
34467  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34468  ac_status=$?
34469  if test -s conftest.err; then
34470    sed '10a\
34471... rest of stderr output deleted ...
34472         10q' conftest.err >conftest.er1
34473    cat conftest.er1 >&5
34474  fi
34475  rm -f conftest.er1 conftest.err
34476  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34477  test $ac_status = 0; }
34478done
34479
34480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34481$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34482if ${ac_cv_cxx_compiler_gnu+:} false; then :
34483  $as_echo_n "(cached) " >&6
34484else
34485  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34486/* end confdefs.h.  */
34487
34488int
34489main ()
34490{
34491#ifndef __GNUC__
34492       choke me
34493#endif
34494
34495  ;
34496  return 0;
34497}
34498_ACEOF
34499if ac_fn_cxx_try_compile "$LINENO"; then :
34500  ac_compiler_gnu=yes
34501else
34502  ac_compiler_gnu=no
34503fi
34504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34505ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34506
34507fi
34508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34509$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34510if test $ac_compiler_gnu = yes; then
34511  GXX=yes
34512else
34513  GXX=
34514fi
34515ac_test_CXXFLAGS=${CXXFLAGS+set}
34516ac_save_CXXFLAGS=$CXXFLAGS
34517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34518$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34519if ${ac_cv_prog_cxx_g+:} false; then :
34520  $as_echo_n "(cached) " >&6
34521else
34522  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34523   ac_cxx_werror_flag=yes
34524   ac_cv_prog_cxx_g=no
34525   CXXFLAGS="-g"
34526   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34527/* end confdefs.h.  */
34528
34529int
34530main ()
34531{
34532
34533  ;
34534  return 0;
34535}
34536_ACEOF
34537if ac_fn_cxx_try_compile "$LINENO"; then :
34538  ac_cv_prog_cxx_g=yes
34539else
34540  CXXFLAGS=""
34541      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34542/* end confdefs.h.  */
34543
34544int
34545main ()
34546{
34547
34548  ;
34549  return 0;
34550}
34551_ACEOF
34552if ac_fn_cxx_try_compile "$LINENO"; then :
34553
34554else
34555  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34556	 CXXFLAGS="-g"
34557	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34558/* end confdefs.h.  */
34559
34560int
34561main ()
34562{
34563
34564  ;
34565  return 0;
34566}
34567_ACEOF
34568if ac_fn_cxx_try_compile "$LINENO"; then :
34569  ac_cv_prog_cxx_g=yes
34570fi
34571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34572fi
34573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34574fi
34575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34576   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34577fi
34578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34579$as_echo "$ac_cv_prog_cxx_g" >&6; }
34580if test "$ac_test_CXXFLAGS" = set; then
34581  CXXFLAGS=$ac_save_CXXFLAGS
34582elif test $ac_cv_prog_cxx_g = yes; then
34583  if test "$GXX" = yes; then
34584    CXXFLAGS="-g -O2"
34585  else
34586    CXXFLAGS="-g"
34587  fi
34588else
34589  if test "$GXX" = yes; then
34590    CXXFLAGS="-O2"
34591  else
34592    CXXFLAGS=
34593  fi
34594fi
34595ac_ext=cpp
34596ac_cpp='$CXXCPP $CPPFLAGS'
34597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34600
34601
34602  #
34603  # Setup the preprocessor (CPP and CXXCPP)
34604  #
34605  ac_ext=c
34606ac_cpp='$CPP $CPPFLAGS'
34607ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34608ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34609ac_compiler_gnu=$ac_cv_c_compiler_gnu
34610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34611$as_echo_n "checking how to run the C preprocessor... " >&6; }
34612# On Suns, sometimes $CPP names a directory.
34613if test -n "$CPP" && test -d "$CPP"; then
34614  CPP=
34615fi
34616if test -z "$CPP"; then
34617  if ${ac_cv_prog_CPP+:} false; then :
34618  $as_echo_n "(cached) " >&6
34619else
34620      # Double quotes because CPP needs to be expanded
34621    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34622    do
34623      ac_preproc_ok=false
34624for ac_c_preproc_warn_flag in '' yes
34625do
34626  # Use a header file that comes with gcc, so configuring glibc
34627  # with a fresh cross-compiler works.
34628  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34629  # <limits.h> exists even on freestanding compilers.
34630  # On the NeXT, cc -E runs the code through the compiler's parser,
34631  # not just through cpp. "Syntax error" is here to catch this case.
34632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34633/* end confdefs.h.  */
34634#ifdef __STDC__
34635# include <limits.h>
34636#else
34637# include <assert.h>
34638#endif
34639		     Syntax error
34640_ACEOF
34641if ac_fn_c_try_cpp "$LINENO"; then :
34642
34643else
34644  # Broken: fails on valid input.
34645continue
34646fi
34647rm -f conftest.err conftest.i conftest.$ac_ext
34648
34649  # OK, works on sane cases.  Now check whether nonexistent headers
34650  # can be detected and how.
34651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34652/* end confdefs.h.  */
34653#include <ac_nonexistent.h>
34654_ACEOF
34655if ac_fn_c_try_cpp "$LINENO"; then :
34656  # Broken: success on invalid input.
34657continue
34658else
34659  # Passes both tests.
34660ac_preproc_ok=:
34661break
34662fi
34663rm -f conftest.err conftest.i conftest.$ac_ext
34664
34665done
34666# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34667rm -f conftest.i conftest.err conftest.$ac_ext
34668if $ac_preproc_ok; then :
34669  break
34670fi
34671
34672    done
34673    ac_cv_prog_CPP=$CPP
34674
34675fi
34676  CPP=$ac_cv_prog_CPP
34677else
34678  ac_cv_prog_CPP=$CPP
34679fi
34680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34681$as_echo "$CPP" >&6; }
34682ac_preproc_ok=false
34683for ac_c_preproc_warn_flag in '' yes
34684do
34685  # Use a header file that comes with gcc, so configuring glibc
34686  # with a fresh cross-compiler works.
34687  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34688  # <limits.h> exists even on freestanding compilers.
34689  # On the NeXT, cc -E runs the code through the compiler's parser,
34690  # not just through cpp. "Syntax error" is here to catch this case.
34691  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34692/* end confdefs.h.  */
34693#ifdef __STDC__
34694# include <limits.h>
34695#else
34696# include <assert.h>
34697#endif
34698		     Syntax error
34699_ACEOF
34700if ac_fn_c_try_cpp "$LINENO"; then :
34701
34702else
34703  # Broken: fails on valid input.
34704continue
34705fi
34706rm -f conftest.err conftest.i conftest.$ac_ext
34707
34708  # OK, works on sane cases.  Now check whether nonexistent headers
34709  # can be detected and how.
34710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34711/* end confdefs.h.  */
34712#include <ac_nonexistent.h>
34713_ACEOF
34714if ac_fn_c_try_cpp "$LINENO"; then :
34715  # Broken: success on invalid input.
34716continue
34717else
34718  # Passes both tests.
34719ac_preproc_ok=:
34720break
34721fi
34722rm -f conftest.err conftest.i conftest.$ac_ext
34723
34724done
34725# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34726rm -f conftest.i conftest.err conftest.$ac_ext
34727if $ac_preproc_ok; then :
34728
34729else
34730  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34732as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
34733See \`config.log' for more details" "$LINENO" 5; }
34734fi
34735
34736ac_ext=cpp
34737ac_cpp='$CXXCPP $CPPFLAGS'
34738ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34739ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34740ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34741
34742
34743  # Only process if variable expands to non-empty
34744
34745  if test "x$CPP" != x; then
34746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34747
34748  # First separate the path from the arguments. This will split at the first
34749  # space.
34750  complete="$CPP"
34751  path="${complete%% *}"
34752  tmp="$complete EOL"
34753  arguments="${tmp#* }"
34754
34755  # Input might be given as Windows format, start by converting to
34756  # unix format.
34757  new_path=`$CYGPATH -u "$path"`
34758
34759  # Now try to locate executable using which
34760  new_path=`$WHICH "$new_path" 2> /dev/null`
34761  # bat and cmd files are not always considered executable in cygwin causing which
34762  # to not find them
34763  if test "x$new_path" = x \
34764      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34765      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34766    new_path=`$CYGPATH -u "$path"`
34767  fi
34768  if test "x$new_path" = x; then
34769    # Oops. Which didn't find the executable.
34770    # The splitting of arguments from the executable at a space might have been incorrect,
34771    # since paths with space are more likely in Windows. Give it another try with the whole
34772    # argument.
34773    path="$complete"
34774    arguments="EOL"
34775    new_path=`$CYGPATH -u "$path"`
34776    new_path=`$WHICH "$new_path" 2> /dev/null`
34777    # bat and cmd files are not always considered executable in cygwin causing which
34778    # to not find them
34779    if test "x$new_path" = x \
34780        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34781        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34782      new_path=`$CYGPATH -u "$path"`
34783    fi
34784    if test "x$new_path" = x; then
34785      # It's still not found. Now this is an unrecoverable error.
34786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34787$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34788      has_space=`$ECHO "$complete" | $GREP " "`
34789      if test "x$has_space" != x; then
34790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34792      fi
34793      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34794    fi
34795  fi
34796
34797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34800  # "foo.exe" is OK but "foo" is an error.
34801  #
34802  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34803  # It is also a way to make sure we got the proper file name for the real test later on.
34804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34805  if test "x$test_shortpath" = x; then
34806    # Short path failed, file does not exist as specified.
34807    # Try adding .exe or .cmd
34808    if test -f "${new_path}.exe"; then
34809      input_to_shortpath="${new_path}.exe"
34810    elif test -f "${new_path}.cmd"; then
34811      input_to_shortpath="${new_path}.cmd"
34812    else
34813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
34814$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
34815      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34816$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34817      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34818    fi
34819  else
34820    input_to_shortpath="$new_path"
34821  fi
34822
34823  # Call helper function which possibly converts this using DOS-style short mode.
34824  # If so, the updated path is stored in $new_path.
34825  new_path="$input_to_shortpath"
34826
34827  input_path="$input_to_shortpath"
34828  # Check if we need to convert this using DOS-style short mode. If the path
34829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34830  # take no chances and rewrite it.
34831  # Note: m4 eats our [], so we need to use [ and ] instead.
34832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34833  if test "x$has_forbidden_chars" != x; then
34834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34838      # Going to short mode and back again did indeed matter. Since short mode is
34839      # case insensitive, let's make it lowercase to improve readability.
34840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34841      # Now convert it back to Unix-style (cygpath)
34842      input_path=`$CYGPATH -u "$shortmode_path"`
34843      new_path="$input_path"
34844    fi
34845  fi
34846
34847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34848  if test "x$test_cygdrive_prefix" = x; then
34849    # As a simple fix, exclude /usr/bin since it's not a real path.
34850    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34852      # a path prefixed by /cygdrive for fixpath to work.
34853      new_path="$CYGWIN_ROOT_PATH$input_path"
34854    fi
34855  fi
34856
34857  # remove trailing .exe if any
34858  new_path="${new_path/%.exe/}"
34859
34860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34861
34862  # First separate the path from the arguments. This will split at the first
34863  # space.
34864  complete="$CPP"
34865  path="${complete%% *}"
34866  tmp="$complete EOL"
34867  arguments="${tmp#* }"
34868
34869  # Input might be given as Windows format, start by converting to
34870  # unix format.
34871  new_path="$path"
34872
34873  windows_path="$new_path"
34874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34875    unix_path=`$CYGPATH -u "$windows_path"`
34876    new_path="$unix_path"
34877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34879    new_path="$unix_path"
34880  fi
34881
34882
34883  # Now try to locate executable using which
34884  new_path=`$WHICH "$new_path" 2> /dev/null`
34885
34886  if test "x$new_path" = x; then
34887    # Oops. Which didn't find the executable.
34888    # The splitting of arguments from the executable at a space might have been incorrect,
34889    # since paths with space are more likely in Windows. Give it another try with the whole
34890    # argument.
34891    path="$complete"
34892    arguments="EOL"
34893    new_path="$path"
34894
34895  windows_path="$new_path"
34896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34897    unix_path=`$CYGPATH -u "$windows_path"`
34898    new_path="$unix_path"
34899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34901    new_path="$unix_path"
34902  fi
34903
34904
34905    new_path=`$WHICH "$new_path" 2> /dev/null`
34906    # bat and cmd files are not always considered executable in MSYS causing which
34907    # to not find them
34908    if test "x$new_path" = x \
34909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34911      new_path="$path"
34912
34913  windows_path="$new_path"
34914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34915    unix_path=`$CYGPATH -u "$windows_path"`
34916    new_path="$unix_path"
34917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34919    new_path="$unix_path"
34920  fi
34921
34922    fi
34923
34924    if test "x$new_path" = x; then
34925      # It's still not found. Now this is an unrecoverable error.
34926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
34927$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
34928      has_space=`$ECHO "$complete" | $GREP " "`
34929      if test "x$has_space" != x; then
34930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34932      fi
34933      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
34934    fi
34935  fi
34936
34937  # Now new_path has a complete unix path to the binary
34938  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34939    # Keep paths in /bin as-is, but remove trailing .exe if any
34940    new_path="${new_path/%.exe/}"
34941    # Do not save /bin paths to all_fixpath_prefixes!
34942  else
34943    # Not in mixed or Windows style, start by that.
34944    new_path=`cmd //c echo $new_path`
34945
34946  input_path="$new_path"
34947  # Check if we need to convert this using DOS-style short mode. If the path
34948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34949  # take no chances and rewrite it.
34950  # Note: m4 eats our [], so we need to use [ and ] instead.
34951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34952  if test "x$has_forbidden_chars" != x; then
34953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34955  fi
34956
34957    # Output is in $new_path
34958
34959  windows_path="$new_path"
34960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34961    unix_path=`$CYGPATH -u "$windows_path"`
34962    new_path="$unix_path"
34963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34965    new_path="$unix_path"
34966  fi
34967
34968    # remove trailing .exe if any
34969    new_path="${new_path/%.exe/}"
34970
34971    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34972    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34973  fi
34974
34975    else
34976      # We're on a unix platform. Hooray! :)
34977      # First separate the path from the arguments. This will split at the first
34978      # space.
34979      complete="$CPP"
34980      path="${complete%% *}"
34981      tmp="$complete EOL"
34982      arguments="${tmp#* }"
34983
34984      # Cannot rely on the command "which" here since it doesn't always work.
34985      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34986      if test -z "$is_absolute_path"; then
34987        # Path to executable is not absolute. Find it.
34988        IFS_save="$IFS"
34989        IFS=:
34990        for p in $PATH; do
34991          if test -f "$p/$path" && test -x "$p/$path"; then
34992            new_path="$p/$path"
34993            break
34994          fi
34995        done
34996        IFS="$IFS_save"
34997      else
34998        # This is an absolute path, we can use it without further modifications.
34999        new_path="$path"
35000      fi
35001
35002      if test "x$new_path" = x; then
35003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35004$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35005        has_space=`$ECHO "$complete" | $GREP " "`
35006        if test "x$has_space" != x; then
35007          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35008$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35009        fi
35010        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35011      fi
35012    fi
35013
35014    # Now join together the path and the arguments once again
35015    if test "x$arguments" != xEOL; then
35016      new_complete="$new_path ${arguments% *}"
35017    else
35018      new_complete="$new_path"
35019    fi
35020
35021    if test "x$complete" != "x$new_complete"; then
35022      CPP="$new_complete"
35023      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35024$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35025    fi
35026  fi
35027
35028  ac_ext=cpp
35029ac_cpp='$CXXCPP $CPPFLAGS'
35030ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35031ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35032ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35034$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35035if test -z "$CXXCPP"; then
35036  if ${ac_cv_prog_CXXCPP+:} false; then :
35037  $as_echo_n "(cached) " >&6
35038else
35039      # Double quotes because CXXCPP needs to be expanded
35040    for CXXCPP in "$CXX -E" "/lib/cpp"
35041    do
35042      ac_preproc_ok=false
35043for ac_cxx_preproc_warn_flag in '' yes
35044do
35045  # Use a header file that comes with gcc, so configuring glibc
35046  # with a fresh cross-compiler works.
35047  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35048  # <limits.h> exists even on freestanding compilers.
35049  # On the NeXT, cc -E runs the code through the compiler's parser,
35050  # not just through cpp. "Syntax error" is here to catch this case.
35051  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35052/* end confdefs.h.  */
35053#ifdef __STDC__
35054# include <limits.h>
35055#else
35056# include <assert.h>
35057#endif
35058		     Syntax error
35059_ACEOF
35060if ac_fn_cxx_try_cpp "$LINENO"; then :
35061
35062else
35063  # Broken: fails on valid input.
35064continue
35065fi
35066rm -f conftest.err conftest.i conftest.$ac_ext
35067
35068  # OK, works on sane cases.  Now check whether nonexistent headers
35069  # can be detected and how.
35070  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35071/* end confdefs.h.  */
35072#include <ac_nonexistent.h>
35073_ACEOF
35074if ac_fn_cxx_try_cpp "$LINENO"; then :
35075  # Broken: success on invalid input.
35076continue
35077else
35078  # Passes both tests.
35079ac_preproc_ok=:
35080break
35081fi
35082rm -f conftest.err conftest.i conftest.$ac_ext
35083
35084done
35085# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35086rm -f conftest.i conftest.err conftest.$ac_ext
35087if $ac_preproc_ok; then :
35088  break
35089fi
35090
35091    done
35092    ac_cv_prog_CXXCPP=$CXXCPP
35093
35094fi
35095  CXXCPP=$ac_cv_prog_CXXCPP
35096else
35097  ac_cv_prog_CXXCPP=$CXXCPP
35098fi
35099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35100$as_echo "$CXXCPP" >&6; }
35101ac_preproc_ok=false
35102for ac_cxx_preproc_warn_flag in '' yes
35103do
35104  # Use a header file that comes with gcc, so configuring glibc
35105  # with a fresh cross-compiler works.
35106  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35107  # <limits.h> exists even on freestanding compilers.
35108  # On the NeXT, cc -E runs the code through the compiler's parser,
35109  # not just through cpp. "Syntax error" is here to catch this case.
35110  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35111/* end confdefs.h.  */
35112#ifdef __STDC__
35113# include <limits.h>
35114#else
35115# include <assert.h>
35116#endif
35117		     Syntax error
35118_ACEOF
35119if ac_fn_cxx_try_cpp "$LINENO"; then :
35120
35121else
35122  # Broken: fails on valid input.
35123continue
35124fi
35125rm -f conftest.err conftest.i conftest.$ac_ext
35126
35127  # OK, works on sane cases.  Now check whether nonexistent headers
35128  # can be detected and how.
35129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35130/* end confdefs.h.  */
35131#include <ac_nonexistent.h>
35132_ACEOF
35133if ac_fn_cxx_try_cpp "$LINENO"; then :
35134  # Broken: success on invalid input.
35135continue
35136else
35137  # Passes both tests.
35138ac_preproc_ok=:
35139break
35140fi
35141rm -f conftest.err conftest.i conftest.$ac_ext
35142
35143done
35144# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35145rm -f conftest.i conftest.err conftest.$ac_ext
35146if $ac_preproc_ok; then :
35147
35148else
35149  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35151as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35152See \`config.log' for more details" "$LINENO" 5; }
35153fi
35154
35155ac_ext=cpp
35156ac_cpp='$CXXCPP $CPPFLAGS'
35157ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35158ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35159ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35160
35161
35162  # Only process if variable expands to non-empty
35163
35164  if test "x$CXXCPP" != x; then
35165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35166
35167  # First separate the path from the arguments. This will split at the first
35168  # space.
35169  complete="$CXXCPP"
35170  path="${complete%% *}"
35171  tmp="$complete EOL"
35172  arguments="${tmp#* }"
35173
35174  # Input might be given as Windows format, start by converting to
35175  # unix format.
35176  new_path=`$CYGPATH -u "$path"`
35177
35178  # Now try to locate executable using which
35179  new_path=`$WHICH "$new_path" 2> /dev/null`
35180  # bat and cmd files are not always considered executable in cygwin causing which
35181  # to not find them
35182  if test "x$new_path" = x \
35183      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35184      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35185    new_path=`$CYGPATH -u "$path"`
35186  fi
35187  if test "x$new_path" = x; then
35188    # Oops. Which didn't find the executable.
35189    # The splitting of arguments from the executable at a space might have been incorrect,
35190    # since paths with space are more likely in Windows. Give it another try with the whole
35191    # argument.
35192    path="$complete"
35193    arguments="EOL"
35194    new_path=`$CYGPATH -u "$path"`
35195    new_path=`$WHICH "$new_path" 2> /dev/null`
35196    # bat and cmd files are not always considered executable in cygwin causing which
35197    # to not find them
35198    if test "x$new_path" = x \
35199        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35200        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35201      new_path=`$CYGPATH -u "$path"`
35202    fi
35203    if test "x$new_path" = x; then
35204      # It's still not found. Now this is an unrecoverable error.
35205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35206$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35207      has_space=`$ECHO "$complete" | $GREP " "`
35208      if test "x$has_space" != x; then
35209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35211      fi
35212      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35213    fi
35214  fi
35215
35216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35219  # "foo.exe" is OK but "foo" is an error.
35220  #
35221  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35222  # It is also a way to make sure we got the proper file name for the real test later on.
35223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35224  if test "x$test_shortpath" = x; then
35225    # Short path failed, file does not exist as specified.
35226    # Try adding .exe or .cmd
35227    if test -f "${new_path}.exe"; then
35228      input_to_shortpath="${new_path}.exe"
35229    elif test -f "${new_path}.cmd"; then
35230      input_to_shortpath="${new_path}.cmd"
35231    else
35232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35233$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35234      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35235$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35236      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35237    fi
35238  else
35239    input_to_shortpath="$new_path"
35240  fi
35241
35242  # Call helper function which possibly converts this using DOS-style short mode.
35243  # If so, the updated path is stored in $new_path.
35244  new_path="$input_to_shortpath"
35245
35246  input_path="$input_to_shortpath"
35247  # Check if we need to convert this using DOS-style short mode. If the path
35248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35249  # take no chances and rewrite it.
35250  # Note: m4 eats our [], so we need to use [ and ] instead.
35251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35252  if test "x$has_forbidden_chars" != x; then
35253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35257      # Going to short mode and back again did indeed matter. Since short mode is
35258      # case insensitive, let's make it lowercase to improve readability.
35259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35260      # Now convert it back to Unix-style (cygpath)
35261      input_path=`$CYGPATH -u "$shortmode_path"`
35262      new_path="$input_path"
35263    fi
35264  fi
35265
35266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35267  if test "x$test_cygdrive_prefix" = x; then
35268    # As a simple fix, exclude /usr/bin since it's not a real path.
35269    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35271      # a path prefixed by /cygdrive for fixpath to work.
35272      new_path="$CYGWIN_ROOT_PATH$input_path"
35273    fi
35274  fi
35275
35276  # remove trailing .exe if any
35277  new_path="${new_path/%.exe/}"
35278
35279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35280
35281  # First separate the path from the arguments. This will split at the first
35282  # space.
35283  complete="$CXXCPP"
35284  path="${complete%% *}"
35285  tmp="$complete EOL"
35286  arguments="${tmp#* }"
35287
35288  # Input might be given as Windows format, start by converting to
35289  # unix format.
35290  new_path="$path"
35291
35292  windows_path="$new_path"
35293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35294    unix_path=`$CYGPATH -u "$windows_path"`
35295    new_path="$unix_path"
35296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35298    new_path="$unix_path"
35299  fi
35300
35301
35302  # Now try to locate executable using which
35303  new_path=`$WHICH "$new_path" 2> /dev/null`
35304
35305  if test "x$new_path" = x; then
35306    # Oops. Which didn't find the executable.
35307    # The splitting of arguments from the executable at a space might have been incorrect,
35308    # since paths with space are more likely in Windows. Give it another try with the whole
35309    # argument.
35310    path="$complete"
35311    arguments="EOL"
35312    new_path="$path"
35313
35314  windows_path="$new_path"
35315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35316    unix_path=`$CYGPATH -u "$windows_path"`
35317    new_path="$unix_path"
35318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35320    new_path="$unix_path"
35321  fi
35322
35323
35324    new_path=`$WHICH "$new_path" 2> /dev/null`
35325    # bat and cmd files are not always considered executable in MSYS causing which
35326    # to not find them
35327    if test "x$new_path" = x \
35328        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35329        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35330      new_path="$path"
35331
35332  windows_path="$new_path"
35333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35334    unix_path=`$CYGPATH -u "$windows_path"`
35335    new_path="$unix_path"
35336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35338    new_path="$unix_path"
35339  fi
35340
35341    fi
35342
35343    if test "x$new_path" = x; then
35344      # It's still not found. Now this is an unrecoverable error.
35345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35346$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35347      has_space=`$ECHO "$complete" | $GREP " "`
35348      if test "x$has_space" != x; then
35349        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35350$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35351      fi
35352      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35353    fi
35354  fi
35355
35356  # Now new_path has a complete unix path to the binary
35357  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35358    # Keep paths in /bin as-is, but remove trailing .exe if any
35359    new_path="${new_path/%.exe/}"
35360    # Do not save /bin paths to all_fixpath_prefixes!
35361  else
35362    # Not in mixed or Windows style, start by that.
35363    new_path=`cmd //c echo $new_path`
35364
35365  input_path="$new_path"
35366  # Check if we need to convert this using DOS-style short mode. If the path
35367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35368  # take no chances and rewrite it.
35369  # Note: m4 eats our [], so we need to use [ and ] instead.
35370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35371  if test "x$has_forbidden_chars" != x; then
35372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35374  fi
35375
35376    # Output is in $new_path
35377
35378  windows_path="$new_path"
35379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35380    unix_path=`$CYGPATH -u "$windows_path"`
35381    new_path="$unix_path"
35382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35384    new_path="$unix_path"
35385  fi
35386
35387    # remove trailing .exe if any
35388    new_path="${new_path/%.exe/}"
35389
35390    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35391    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35392  fi
35393
35394    else
35395      # We're on a unix platform. Hooray! :)
35396      # First separate the path from the arguments. This will split at the first
35397      # space.
35398      complete="$CXXCPP"
35399      path="${complete%% *}"
35400      tmp="$complete EOL"
35401      arguments="${tmp#* }"
35402
35403      # Cannot rely on the command "which" here since it doesn't always work.
35404      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35405      if test -z "$is_absolute_path"; then
35406        # Path to executable is not absolute. Find it.
35407        IFS_save="$IFS"
35408        IFS=:
35409        for p in $PATH; do
35410          if test -f "$p/$path" && test -x "$p/$path"; then
35411            new_path="$p/$path"
35412            break
35413          fi
35414        done
35415        IFS="$IFS_save"
35416      else
35417        # This is an absolute path, we can use it without further modifications.
35418        new_path="$path"
35419      fi
35420
35421      if test "x$new_path" = x; then
35422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35423$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35424        has_space=`$ECHO "$complete" | $GREP " "`
35425        if test "x$has_space" != x; then
35426          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35427$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35428        fi
35429        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35430      fi
35431    fi
35432
35433    # Now join together the path and the arguments once again
35434    if test "x$arguments" != xEOL; then
35435      new_complete="$new_path ${arguments% *}"
35436    else
35437      new_complete="$new_path"
35438    fi
35439
35440    if test "x$complete" != "x$new_complete"; then
35441      CXXCPP="$new_complete"
35442      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35443$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35444    fi
35445  fi
35446
35447
35448  #
35449  # Setup the linker (LD)
35450  #
35451  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35452    # In the Microsoft toolchain we have a separate LD command "link".
35453    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35454    # a cygwin program for something completely different.
35455    # Extract the first word of "link", so it can be a program name with args.
35456set dummy link; ac_word=$2
35457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35458$as_echo_n "checking for $ac_word... " >&6; }
35459if ${ac_cv_prog_LD+:} false; then :
35460  $as_echo_n "(cached) " >&6
35461else
35462  if test -n "$LD"; then
35463  ac_cv_prog_LD="$LD" # Let the user override the test.
35464else
35465  ac_prog_rejected=no
35466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35467for as_dir in $PATH
35468do
35469  IFS=$as_save_IFS
35470  test -z "$as_dir" && as_dir=.
35471    for ac_exec_ext in '' $ac_executable_extensions; do
35472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35473    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35474       ac_prog_rejected=yes
35475       continue
35476     fi
35477    ac_cv_prog_LD="link"
35478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35479    break 2
35480  fi
35481done
35482  done
35483IFS=$as_save_IFS
35484
35485if test $ac_prog_rejected = yes; then
35486  # We found a bogon in the path, so make sure we never use it.
35487  set dummy $ac_cv_prog_LD
35488  shift
35489  if test $# != 0; then
35490    # We chose a different compiler from the bogus one.
35491    # However, it has the same basename, so the bogon will be chosen
35492    # first if we set LD to just the basename; use the full file name.
35493    shift
35494    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35495  fi
35496fi
35497fi
35498fi
35499LD=$ac_cv_prog_LD
35500if test -n "$LD"; then
35501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35502$as_echo "$LD" >&6; }
35503else
35504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35505$as_echo "no" >&6; }
35506fi
35507
35508
35509
35510  # Only process if variable expands to non-empty
35511
35512  if test "x$LD" != x; then
35513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35514
35515  # First separate the path from the arguments. This will split at the first
35516  # space.
35517  complete="$LD"
35518  path="${complete%% *}"
35519  tmp="$complete EOL"
35520  arguments="${tmp#* }"
35521
35522  # Input might be given as Windows format, start by converting to
35523  # unix format.
35524  new_path=`$CYGPATH -u "$path"`
35525
35526  # Now try to locate executable using which
35527  new_path=`$WHICH "$new_path" 2> /dev/null`
35528  # bat and cmd files are not always considered executable in cygwin causing which
35529  # to not find them
35530  if test "x$new_path" = x \
35531      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35532      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35533    new_path=`$CYGPATH -u "$path"`
35534  fi
35535  if test "x$new_path" = x; then
35536    # Oops. Which didn't find the executable.
35537    # The splitting of arguments from the executable at a space might have been incorrect,
35538    # since paths with space are more likely in Windows. Give it another try with the whole
35539    # argument.
35540    path="$complete"
35541    arguments="EOL"
35542    new_path=`$CYGPATH -u "$path"`
35543    new_path=`$WHICH "$new_path" 2> /dev/null`
35544    # bat and cmd files are not always considered executable in cygwin causing which
35545    # to not find them
35546    if test "x$new_path" = x \
35547        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35548        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35549      new_path=`$CYGPATH -u "$path"`
35550    fi
35551    if test "x$new_path" = x; then
35552      # It's still not found. Now this is an unrecoverable error.
35553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35554$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35555      has_space=`$ECHO "$complete" | $GREP " "`
35556      if test "x$has_space" != x; then
35557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35559      fi
35560      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35561    fi
35562  fi
35563
35564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35567  # "foo.exe" is OK but "foo" is an error.
35568  #
35569  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35570  # It is also a way to make sure we got the proper file name for the real test later on.
35571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35572  if test "x$test_shortpath" = x; then
35573    # Short path failed, file does not exist as specified.
35574    # Try adding .exe or .cmd
35575    if test -f "${new_path}.exe"; then
35576      input_to_shortpath="${new_path}.exe"
35577    elif test -f "${new_path}.cmd"; then
35578      input_to_shortpath="${new_path}.cmd"
35579    else
35580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35581$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35582      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35583$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35584      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35585    fi
35586  else
35587    input_to_shortpath="$new_path"
35588  fi
35589
35590  # Call helper function which possibly converts this using DOS-style short mode.
35591  # If so, the updated path is stored in $new_path.
35592  new_path="$input_to_shortpath"
35593
35594  input_path="$input_to_shortpath"
35595  # Check if we need to convert this using DOS-style short mode. If the path
35596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35597  # take no chances and rewrite it.
35598  # Note: m4 eats our [], so we need to use [ and ] instead.
35599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35600  if test "x$has_forbidden_chars" != x; then
35601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35605      # Going to short mode and back again did indeed matter. Since short mode is
35606      # case insensitive, let's make it lowercase to improve readability.
35607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35608      # Now convert it back to Unix-style (cygpath)
35609      input_path=`$CYGPATH -u "$shortmode_path"`
35610      new_path="$input_path"
35611    fi
35612  fi
35613
35614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35615  if test "x$test_cygdrive_prefix" = x; then
35616    # As a simple fix, exclude /usr/bin since it's not a real path.
35617    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35619      # a path prefixed by /cygdrive for fixpath to work.
35620      new_path="$CYGWIN_ROOT_PATH$input_path"
35621    fi
35622  fi
35623
35624  # remove trailing .exe if any
35625  new_path="${new_path/%.exe/}"
35626
35627    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35628
35629  # First separate the path from the arguments. This will split at the first
35630  # space.
35631  complete="$LD"
35632  path="${complete%% *}"
35633  tmp="$complete EOL"
35634  arguments="${tmp#* }"
35635
35636  # Input might be given as Windows format, start by converting to
35637  # unix format.
35638  new_path="$path"
35639
35640  windows_path="$new_path"
35641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35642    unix_path=`$CYGPATH -u "$windows_path"`
35643    new_path="$unix_path"
35644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35646    new_path="$unix_path"
35647  fi
35648
35649
35650  # Now try to locate executable using which
35651  new_path=`$WHICH "$new_path" 2> /dev/null`
35652
35653  if test "x$new_path" = x; then
35654    # Oops. Which didn't find the executable.
35655    # The splitting of arguments from the executable at a space might have been incorrect,
35656    # since paths with space are more likely in Windows. Give it another try with the whole
35657    # argument.
35658    path="$complete"
35659    arguments="EOL"
35660    new_path="$path"
35661
35662  windows_path="$new_path"
35663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35664    unix_path=`$CYGPATH -u "$windows_path"`
35665    new_path="$unix_path"
35666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35668    new_path="$unix_path"
35669  fi
35670
35671
35672    new_path=`$WHICH "$new_path" 2> /dev/null`
35673    # bat and cmd files are not always considered executable in MSYS causing which
35674    # to not find them
35675    if test "x$new_path" = x \
35676        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35677        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35678      new_path="$path"
35679
35680  windows_path="$new_path"
35681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35682    unix_path=`$CYGPATH -u "$windows_path"`
35683    new_path="$unix_path"
35684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35686    new_path="$unix_path"
35687  fi
35688
35689    fi
35690
35691    if test "x$new_path" = x; then
35692      # It's still not found. Now this is an unrecoverable error.
35693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35694$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35695      has_space=`$ECHO "$complete" | $GREP " "`
35696      if test "x$has_space" != x; then
35697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35699      fi
35700      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35701    fi
35702  fi
35703
35704  # Now new_path has a complete unix path to the binary
35705  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35706    # Keep paths in /bin as-is, but remove trailing .exe if any
35707    new_path="${new_path/%.exe/}"
35708    # Do not save /bin paths to all_fixpath_prefixes!
35709  else
35710    # Not in mixed or Windows style, start by that.
35711    new_path=`cmd //c echo $new_path`
35712
35713  input_path="$new_path"
35714  # Check if we need to convert this using DOS-style short mode. If the path
35715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35716  # take no chances and rewrite it.
35717  # Note: m4 eats our [], so we need to use [ and ] instead.
35718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35719  if test "x$has_forbidden_chars" != x; then
35720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35722  fi
35723
35724    # Output is in $new_path
35725
35726  windows_path="$new_path"
35727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35728    unix_path=`$CYGPATH -u "$windows_path"`
35729    new_path="$unix_path"
35730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35731    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35732    new_path="$unix_path"
35733  fi
35734
35735    # remove trailing .exe if any
35736    new_path="${new_path/%.exe/}"
35737
35738    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35739    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35740  fi
35741
35742    else
35743      # We're on a unix platform. Hooray! :)
35744      # First separate the path from the arguments. This will split at the first
35745      # space.
35746      complete="$LD"
35747      path="${complete%% *}"
35748      tmp="$complete EOL"
35749      arguments="${tmp#* }"
35750
35751      # Cannot rely on the command "which" here since it doesn't always work.
35752      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35753      if test -z "$is_absolute_path"; then
35754        # Path to executable is not absolute. Find it.
35755        IFS_save="$IFS"
35756        IFS=:
35757        for p in $PATH; do
35758          if test -f "$p/$path" && test -x "$p/$path"; then
35759            new_path="$p/$path"
35760            break
35761          fi
35762        done
35763        IFS="$IFS_save"
35764      else
35765        # This is an absolute path, we can use it without further modifications.
35766        new_path="$path"
35767      fi
35768
35769      if test "x$new_path" = x; then
35770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35771$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35772        has_space=`$ECHO "$complete" | $GREP " "`
35773        if test "x$has_space" != x; then
35774          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35775$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35776        fi
35777        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35778      fi
35779    fi
35780
35781    # Now join together the path and the arguments once again
35782    if test "x$arguments" != xEOL; then
35783      new_complete="$new_path ${arguments% *}"
35784    else
35785      new_complete="$new_path"
35786    fi
35787
35788    if test "x$complete" != "x$new_complete"; then
35789      LD="$new_complete"
35790      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
35791$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
35792    fi
35793  fi
35794
35795    # Verify that we indeed succeeded with this trick.
35796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
35797$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
35798    "$LD" --version > /dev/null
35799    if test $? -eq 0 ; then
35800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35801$as_echo "no" >&6; }
35802      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
35803    else
35804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35805$as_echo "yes" >&6; }
35806    fi
35807    LDCXX="$LD"
35808  else
35809    # All other toolchains use the compiler to link.
35810    LD="$CC"
35811    LDCXX="$CXX"
35812  fi
35813
35814  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
35815
35816
35817  #
35818  # Setup the assembler (AS)
35819  #
35820  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35821    # FIXME: should this really be solaris, or solstudio?
35822
35823
35824  # Publish this variable in the help.
35825
35826
35827  if [ -z "${AS+x}" ]; then
35828    # The variable is not set by user, try to locate tool using the code snippet
35829    for ac_prog in as
35830do
35831  # Extract the first word of "$ac_prog", so it can be a program name with args.
35832set dummy $ac_prog; ac_word=$2
35833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35834$as_echo_n "checking for $ac_word... " >&6; }
35835if ${ac_cv_path_AS+:} false; then :
35836  $as_echo_n "(cached) " >&6
35837else
35838  case $AS in
35839  [\\/]* | ?:[\\/]*)
35840  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35841  ;;
35842  *)
35843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35844for as_dir in $PATH
35845do
35846  IFS=$as_save_IFS
35847  test -z "$as_dir" && as_dir=.
35848    for ac_exec_ext in '' $ac_executable_extensions; do
35849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35850    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35852    break 2
35853  fi
35854done
35855  done
35856IFS=$as_save_IFS
35857
35858  ;;
35859esac
35860fi
35861AS=$ac_cv_path_AS
35862if test -n "$AS"; then
35863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35864$as_echo "$AS" >&6; }
35865else
35866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35867$as_echo "no" >&6; }
35868fi
35869
35870
35871  test -n "$AS" && break
35872done
35873
35874  else
35875    # The variable is set, but is it from the command line or the environment?
35876
35877    # Try to remove the string !AS! from our list.
35878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
35879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35880      # If it failed, the variable was not from the command line. Ignore it,
35881      # but warn the user (except for BASH, which is always set by the calling BASH).
35882      if test "xAS" != xBASH; then
35883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
35884$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
35885      fi
35886      # Try to locate tool using the code snippet
35887      for ac_prog in as
35888do
35889  # Extract the first word of "$ac_prog", so it can be a program name with args.
35890set dummy $ac_prog; ac_word=$2
35891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35892$as_echo_n "checking for $ac_word... " >&6; }
35893if ${ac_cv_path_AS+:} false; then :
35894  $as_echo_n "(cached) " >&6
35895else
35896  case $AS in
35897  [\\/]* | ?:[\\/]*)
35898  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35899  ;;
35900  *)
35901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35902for as_dir in $PATH
35903do
35904  IFS=$as_save_IFS
35905  test -z "$as_dir" && as_dir=.
35906    for ac_exec_ext in '' $ac_executable_extensions; do
35907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35908    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35910    break 2
35911  fi
35912done
35913  done
35914IFS=$as_save_IFS
35915
35916  ;;
35917esac
35918fi
35919AS=$ac_cv_path_AS
35920if test -n "$AS"; then
35921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35922$as_echo "$AS" >&6; }
35923else
35924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35925$as_echo "no" >&6; }
35926fi
35927
35928
35929  test -n "$AS" && break
35930done
35931
35932    else
35933      # If it succeeded, then it was overridden by the user. We will use it
35934      # for the tool.
35935
35936      # First remove it from the list of overridden variables, so we can test
35937      # for unknown variables in the end.
35938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35939
35940      # Check if we try to supply an empty value
35941      if test "x$AS" = x; then
35942        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
35943$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
35944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
35945$as_echo_n "checking for AS... " >&6; }
35946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
35947$as_echo "disabled" >&6; }
35948      else
35949        # Check if the provided tool contains a complete path.
35950        tool_specified="$AS"
35951        tool_basename="${tool_specified##*/}"
35952        if test "x$tool_basename" = "x$tool_specified"; then
35953          # A command without a complete path is provided, search $PATH.
35954          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
35955$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
35956          # Extract the first word of "$tool_basename", so it can be a program name with args.
35957set dummy $tool_basename; ac_word=$2
35958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35959$as_echo_n "checking for $ac_word... " >&6; }
35960if ${ac_cv_path_AS+:} false; then :
35961  $as_echo_n "(cached) " >&6
35962else
35963  case $AS in
35964  [\\/]* | ?:[\\/]*)
35965  ac_cv_path_AS="$AS" # Let the user override the test with a path.
35966  ;;
35967  *)
35968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35969for as_dir in $PATH
35970do
35971  IFS=$as_save_IFS
35972  test -z "$as_dir" && as_dir=.
35973    for ac_exec_ext in '' $ac_executable_extensions; do
35974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35975    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35977    break 2
35978  fi
35979done
35980  done
35981IFS=$as_save_IFS
35982
35983  ;;
35984esac
35985fi
35986AS=$ac_cv_path_AS
35987if test -n "$AS"; then
35988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35989$as_echo "$AS" >&6; }
35990else
35991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35992$as_echo "no" >&6; }
35993fi
35994
35995
35996          if test "x$AS" = x; then
35997            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35998          fi
35999        else
36000          # Otherwise we believe it is a complete path. Use it as it is.
36001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36002$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36003          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36004$as_echo_n "checking for AS... " >&6; }
36005          if test ! -x "$tool_specified"; then
36006            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36007$as_echo "not found" >&6; }
36008            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36009          fi
36010          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36011$as_echo "$tool_specified" >&6; }
36012        fi
36013      fi
36014    fi
36015
36016  fi
36017
36018
36019
36020  # Only process if variable expands to non-empty
36021
36022  if test "x$AS" != x; then
36023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36024
36025  # First separate the path from the arguments. This will split at the first
36026  # space.
36027  complete="$AS"
36028  path="${complete%% *}"
36029  tmp="$complete EOL"
36030  arguments="${tmp#* }"
36031
36032  # Input might be given as Windows format, start by converting to
36033  # unix format.
36034  new_path=`$CYGPATH -u "$path"`
36035
36036  # Now try to locate executable using which
36037  new_path=`$WHICH "$new_path" 2> /dev/null`
36038  # bat and cmd files are not always considered executable in cygwin causing which
36039  # to not find them
36040  if test "x$new_path" = x \
36041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36043    new_path=`$CYGPATH -u "$path"`
36044  fi
36045  if test "x$new_path" = x; then
36046    # Oops. Which didn't find the executable.
36047    # The splitting of arguments from the executable at a space might have been incorrect,
36048    # since paths with space are more likely in Windows. Give it another try with the whole
36049    # argument.
36050    path="$complete"
36051    arguments="EOL"
36052    new_path=`$CYGPATH -u "$path"`
36053    new_path=`$WHICH "$new_path" 2> /dev/null`
36054    # bat and cmd files are not always considered executable in cygwin causing which
36055    # to not find them
36056    if test "x$new_path" = x \
36057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36059      new_path=`$CYGPATH -u "$path"`
36060    fi
36061    if test "x$new_path" = x; then
36062      # It's still not found. Now this is an unrecoverable error.
36063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36064$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36065      has_space=`$ECHO "$complete" | $GREP " "`
36066      if test "x$has_space" != x; then
36067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36069      fi
36070      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36071    fi
36072  fi
36073
36074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36077  # "foo.exe" is OK but "foo" is an error.
36078  #
36079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36080  # It is also a way to make sure we got the proper file name for the real test later on.
36081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36082  if test "x$test_shortpath" = x; then
36083    # Short path failed, file does not exist as specified.
36084    # Try adding .exe or .cmd
36085    if test -f "${new_path}.exe"; then
36086      input_to_shortpath="${new_path}.exe"
36087    elif test -f "${new_path}.cmd"; then
36088      input_to_shortpath="${new_path}.cmd"
36089    else
36090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36091$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36094      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36095    fi
36096  else
36097    input_to_shortpath="$new_path"
36098  fi
36099
36100  # Call helper function which possibly converts this using DOS-style short mode.
36101  # If so, the updated path is stored in $new_path.
36102  new_path="$input_to_shortpath"
36103
36104  input_path="$input_to_shortpath"
36105  # Check if we need to convert this using DOS-style short mode. If the path
36106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36107  # take no chances and rewrite it.
36108  # Note: m4 eats our [], so we need to use [ and ] instead.
36109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36110  if test "x$has_forbidden_chars" != x; then
36111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36115      # Going to short mode and back again did indeed matter. Since short mode is
36116      # case insensitive, let's make it lowercase to improve readability.
36117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36118      # Now convert it back to Unix-style (cygpath)
36119      input_path=`$CYGPATH -u "$shortmode_path"`
36120      new_path="$input_path"
36121    fi
36122  fi
36123
36124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36125  if test "x$test_cygdrive_prefix" = x; then
36126    # As a simple fix, exclude /usr/bin since it's not a real path.
36127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36129      # a path prefixed by /cygdrive for fixpath to work.
36130      new_path="$CYGWIN_ROOT_PATH$input_path"
36131    fi
36132  fi
36133
36134  # remove trailing .exe if any
36135  new_path="${new_path/%.exe/}"
36136
36137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36138
36139  # First separate the path from the arguments. This will split at the first
36140  # space.
36141  complete="$AS"
36142  path="${complete%% *}"
36143  tmp="$complete EOL"
36144  arguments="${tmp#* }"
36145
36146  # Input might be given as Windows format, start by converting to
36147  # unix format.
36148  new_path="$path"
36149
36150  windows_path="$new_path"
36151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36152    unix_path=`$CYGPATH -u "$windows_path"`
36153    new_path="$unix_path"
36154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36156    new_path="$unix_path"
36157  fi
36158
36159
36160  # Now try to locate executable using which
36161  new_path=`$WHICH "$new_path" 2> /dev/null`
36162
36163  if test "x$new_path" = x; then
36164    # Oops. Which didn't find the executable.
36165    # The splitting of arguments from the executable at a space might have been incorrect,
36166    # since paths with space are more likely in Windows. Give it another try with the whole
36167    # argument.
36168    path="$complete"
36169    arguments="EOL"
36170    new_path="$path"
36171
36172  windows_path="$new_path"
36173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36174    unix_path=`$CYGPATH -u "$windows_path"`
36175    new_path="$unix_path"
36176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36178    new_path="$unix_path"
36179  fi
36180
36181
36182    new_path=`$WHICH "$new_path" 2> /dev/null`
36183    # bat and cmd files are not always considered executable in MSYS causing which
36184    # to not find them
36185    if test "x$new_path" = x \
36186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36188      new_path="$path"
36189
36190  windows_path="$new_path"
36191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36192    unix_path=`$CYGPATH -u "$windows_path"`
36193    new_path="$unix_path"
36194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36196    new_path="$unix_path"
36197  fi
36198
36199    fi
36200
36201    if test "x$new_path" = x; then
36202      # It's still not found. Now this is an unrecoverable error.
36203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36204$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36205      has_space=`$ECHO "$complete" | $GREP " "`
36206      if test "x$has_space" != x; then
36207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36209      fi
36210      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36211    fi
36212  fi
36213
36214  # Now new_path has a complete unix path to the binary
36215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36216    # Keep paths in /bin as-is, but remove trailing .exe if any
36217    new_path="${new_path/%.exe/}"
36218    # Do not save /bin paths to all_fixpath_prefixes!
36219  else
36220    # Not in mixed or Windows style, start by that.
36221    new_path=`cmd //c echo $new_path`
36222
36223  input_path="$new_path"
36224  # Check if we need to convert this using DOS-style short mode. If the path
36225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36226  # take no chances and rewrite it.
36227  # Note: m4 eats our [], so we need to use [ and ] instead.
36228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36229  if test "x$has_forbidden_chars" != x; then
36230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36232  fi
36233
36234    # Output is in $new_path
36235
36236  windows_path="$new_path"
36237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36238    unix_path=`$CYGPATH -u "$windows_path"`
36239    new_path="$unix_path"
36240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36242    new_path="$unix_path"
36243  fi
36244
36245    # remove trailing .exe if any
36246    new_path="${new_path/%.exe/}"
36247
36248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36250  fi
36251
36252    else
36253      # We're on a unix platform. Hooray! :)
36254      # First separate the path from the arguments. This will split at the first
36255      # space.
36256      complete="$AS"
36257      path="${complete%% *}"
36258      tmp="$complete EOL"
36259      arguments="${tmp#* }"
36260
36261      # Cannot rely on the command "which" here since it doesn't always work.
36262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36263      if test -z "$is_absolute_path"; then
36264        # Path to executable is not absolute. Find it.
36265        IFS_save="$IFS"
36266        IFS=:
36267        for p in $PATH; do
36268          if test -f "$p/$path" && test -x "$p/$path"; then
36269            new_path="$p/$path"
36270            break
36271          fi
36272        done
36273        IFS="$IFS_save"
36274      else
36275        # This is an absolute path, we can use it without further modifications.
36276        new_path="$path"
36277      fi
36278
36279      if test "x$new_path" = x; then
36280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36281$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36282        has_space=`$ECHO "$complete" | $GREP " "`
36283        if test "x$has_space" != x; then
36284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36286        fi
36287        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36288      fi
36289    fi
36290
36291    # Now join together the path and the arguments once again
36292    if test "x$arguments" != xEOL; then
36293      new_complete="$new_path ${arguments% *}"
36294    else
36295      new_complete="$new_path"
36296    fi
36297
36298    if test "x$complete" != "x$new_complete"; then
36299      AS="$new_complete"
36300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36301$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36302    fi
36303  fi
36304
36305  else
36306    # FIXME: is this correct for microsoft?
36307    AS="$CC -c"
36308  fi
36309
36310
36311  #
36312  # Setup the archiver (AR)
36313  #
36314  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36315    # The corresponding ar tool is lib.exe (used to create static libraries)
36316    # Extract the first word of "lib", so it can be a program name with args.
36317set dummy lib; ac_word=$2
36318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36319$as_echo_n "checking for $ac_word... " >&6; }
36320if ${ac_cv_prog_AR+:} false; then :
36321  $as_echo_n "(cached) " >&6
36322else
36323  if test -n "$AR"; then
36324  ac_cv_prog_AR="$AR" # Let the user override the test.
36325else
36326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36327for as_dir in $PATH
36328do
36329  IFS=$as_save_IFS
36330  test -z "$as_dir" && as_dir=.
36331    for ac_exec_ext in '' $ac_executable_extensions; do
36332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36333    ac_cv_prog_AR="lib"
36334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36335    break 2
36336  fi
36337done
36338  done
36339IFS=$as_save_IFS
36340
36341fi
36342fi
36343AR=$ac_cv_prog_AR
36344if test -n "$AR"; then
36345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36346$as_echo "$AR" >&6; }
36347else
36348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36349$as_echo "no" >&6; }
36350fi
36351
36352
36353  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36354
36355
36356  # Publish this variable in the help.
36357
36358
36359  if [ -z "${AR+x}" ]; then
36360    # The variable is not set by user, try to locate tool using the code snippet
36361    if test -n "$ac_tool_prefix"; then
36362  for ac_prog in ar gcc-ar
36363  do
36364    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36365set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36367$as_echo_n "checking for $ac_word... " >&6; }
36368if ${ac_cv_prog_AR+:} false; then :
36369  $as_echo_n "(cached) " >&6
36370else
36371  if test -n "$AR"; then
36372  ac_cv_prog_AR="$AR" # Let the user override the test.
36373else
36374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36375for as_dir in $PATH
36376do
36377  IFS=$as_save_IFS
36378  test -z "$as_dir" && as_dir=.
36379    for ac_exec_ext in '' $ac_executable_extensions; do
36380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36381    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36383    break 2
36384  fi
36385done
36386  done
36387IFS=$as_save_IFS
36388
36389fi
36390fi
36391AR=$ac_cv_prog_AR
36392if test -n "$AR"; then
36393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36394$as_echo "$AR" >&6; }
36395else
36396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36397$as_echo "no" >&6; }
36398fi
36399
36400
36401    test -n "$AR" && break
36402  done
36403fi
36404if test -z "$AR"; then
36405  ac_ct_AR=$AR
36406  for ac_prog in ar gcc-ar
36407do
36408  # Extract the first word of "$ac_prog", so it can be a program name with args.
36409set dummy $ac_prog; ac_word=$2
36410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36411$as_echo_n "checking for $ac_word... " >&6; }
36412if ${ac_cv_prog_ac_ct_AR+:} false; then :
36413  $as_echo_n "(cached) " >&6
36414else
36415  if test -n "$ac_ct_AR"; then
36416  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36417else
36418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36419for as_dir in $PATH
36420do
36421  IFS=$as_save_IFS
36422  test -z "$as_dir" && as_dir=.
36423    for ac_exec_ext in '' $ac_executable_extensions; do
36424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36425    ac_cv_prog_ac_ct_AR="$ac_prog"
36426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36427    break 2
36428  fi
36429done
36430  done
36431IFS=$as_save_IFS
36432
36433fi
36434fi
36435ac_ct_AR=$ac_cv_prog_ac_ct_AR
36436if test -n "$ac_ct_AR"; then
36437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36438$as_echo "$ac_ct_AR" >&6; }
36439else
36440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36441$as_echo "no" >&6; }
36442fi
36443
36444
36445  test -n "$ac_ct_AR" && break
36446done
36447
36448  if test "x$ac_ct_AR" = x; then
36449    AR=""
36450  else
36451    case $cross_compiling:$ac_tool_warned in
36452yes:)
36453{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36454$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36455ac_tool_warned=yes ;;
36456esac
36457    AR=$ac_ct_AR
36458  fi
36459fi
36460
36461  else
36462    # The variable is set, but is it from the command line or the environment?
36463
36464    # Try to remove the string !AR! from our list.
36465    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36466    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36467      # If it failed, the variable was not from the command line. Ignore it,
36468      # but warn the user (except for BASH, which is always set by the calling BASH).
36469      if test "xAR" != xBASH; then
36470        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36471$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36472      fi
36473      # Try to locate tool using the code snippet
36474      if test -n "$ac_tool_prefix"; then
36475  for ac_prog in ar gcc-ar
36476  do
36477    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36478set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36480$as_echo_n "checking for $ac_word... " >&6; }
36481if ${ac_cv_prog_AR+:} false; then :
36482  $as_echo_n "(cached) " >&6
36483else
36484  if test -n "$AR"; then
36485  ac_cv_prog_AR="$AR" # Let the user override the test.
36486else
36487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36488for as_dir in $PATH
36489do
36490  IFS=$as_save_IFS
36491  test -z "$as_dir" && as_dir=.
36492    for ac_exec_ext in '' $ac_executable_extensions; do
36493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36494    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36496    break 2
36497  fi
36498done
36499  done
36500IFS=$as_save_IFS
36501
36502fi
36503fi
36504AR=$ac_cv_prog_AR
36505if test -n "$AR"; then
36506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36507$as_echo "$AR" >&6; }
36508else
36509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36510$as_echo "no" >&6; }
36511fi
36512
36513
36514    test -n "$AR" && break
36515  done
36516fi
36517if test -z "$AR"; then
36518  ac_ct_AR=$AR
36519  for ac_prog in ar gcc-ar
36520do
36521  # Extract the first word of "$ac_prog", so it can be a program name with args.
36522set dummy $ac_prog; ac_word=$2
36523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36524$as_echo_n "checking for $ac_word... " >&6; }
36525if ${ac_cv_prog_ac_ct_AR+:} false; then :
36526  $as_echo_n "(cached) " >&6
36527else
36528  if test -n "$ac_ct_AR"; then
36529  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36530else
36531as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36532for as_dir in $PATH
36533do
36534  IFS=$as_save_IFS
36535  test -z "$as_dir" && as_dir=.
36536    for ac_exec_ext in '' $ac_executable_extensions; do
36537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36538    ac_cv_prog_ac_ct_AR="$ac_prog"
36539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36540    break 2
36541  fi
36542done
36543  done
36544IFS=$as_save_IFS
36545
36546fi
36547fi
36548ac_ct_AR=$ac_cv_prog_ac_ct_AR
36549if test -n "$ac_ct_AR"; then
36550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36551$as_echo "$ac_ct_AR" >&6; }
36552else
36553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36554$as_echo "no" >&6; }
36555fi
36556
36557
36558  test -n "$ac_ct_AR" && break
36559done
36560
36561  if test "x$ac_ct_AR" = x; then
36562    AR=""
36563  else
36564    case $cross_compiling:$ac_tool_warned in
36565yes:)
36566{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36567$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36568ac_tool_warned=yes ;;
36569esac
36570    AR=$ac_ct_AR
36571  fi
36572fi
36573
36574    else
36575      # If it succeeded, then it was overridden by the user. We will use it
36576      # for the tool.
36577
36578      # First remove it from the list of overridden variables, so we can test
36579      # for unknown variables in the end.
36580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36581
36582      # Check if we try to supply an empty value
36583      if test "x$AR" = x; then
36584        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36585$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36587$as_echo_n "checking for AR... " >&6; }
36588        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36589$as_echo "disabled" >&6; }
36590      else
36591        # Check if the provided tool contains a complete path.
36592        tool_specified="$AR"
36593        tool_basename="${tool_specified##*/}"
36594        if test "x$tool_basename" = "x$tool_specified"; then
36595          # A command without a complete path is provided, search $PATH.
36596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36597$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36598          # Extract the first word of "$tool_basename", so it can be a program name with args.
36599set dummy $tool_basename; ac_word=$2
36600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36601$as_echo_n "checking for $ac_word... " >&6; }
36602if ${ac_cv_path_AR+:} false; then :
36603  $as_echo_n "(cached) " >&6
36604else
36605  case $AR in
36606  [\\/]* | ?:[\\/]*)
36607  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36608  ;;
36609  *)
36610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36611for as_dir in $PATH
36612do
36613  IFS=$as_save_IFS
36614  test -z "$as_dir" && as_dir=.
36615    for ac_exec_ext in '' $ac_executable_extensions; do
36616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36617    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36619    break 2
36620  fi
36621done
36622  done
36623IFS=$as_save_IFS
36624
36625  ;;
36626esac
36627fi
36628AR=$ac_cv_path_AR
36629if test -n "$AR"; then
36630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36631$as_echo "$AR" >&6; }
36632else
36633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36634$as_echo "no" >&6; }
36635fi
36636
36637
36638          if test "x$AR" = x; then
36639            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36640          fi
36641        else
36642          # Otherwise we believe it is a complete path. Use it as it is.
36643          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36644$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36645          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36646$as_echo_n "checking for AR... " >&6; }
36647          if test ! -x "$tool_specified"; then
36648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36649$as_echo "not found" >&6; }
36650            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36651          fi
36652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36653$as_echo "$tool_specified" >&6; }
36654        fi
36655      fi
36656    fi
36657
36658  fi
36659
36660
36661  else
36662
36663
36664  # Publish this variable in the help.
36665
36666
36667  if [ -z "${AR+x}" ]; then
36668    # The variable is not set by user, try to locate tool using the code snippet
36669    if test -n "$ac_tool_prefix"; then
36670  for ac_prog in ar
36671  do
36672    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36673set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36675$as_echo_n "checking for $ac_word... " >&6; }
36676if ${ac_cv_prog_AR+:} false; then :
36677  $as_echo_n "(cached) " >&6
36678else
36679  if test -n "$AR"; then
36680  ac_cv_prog_AR="$AR" # Let the user override the test.
36681else
36682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36683for as_dir in $PATH
36684do
36685  IFS=$as_save_IFS
36686  test -z "$as_dir" && as_dir=.
36687    for ac_exec_ext in '' $ac_executable_extensions; do
36688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36689    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36691    break 2
36692  fi
36693done
36694  done
36695IFS=$as_save_IFS
36696
36697fi
36698fi
36699AR=$ac_cv_prog_AR
36700if test -n "$AR"; then
36701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36702$as_echo "$AR" >&6; }
36703else
36704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36705$as_echo "no" >&6; }
36706fi
36707
36708
36709    test -n "$AR" && break
36710  done
36711fi
36712if test -z "$AR"; then
36713  ac_ct_AR=$AR
36714  for ac_prog in ar
36715do
36716  # Extract the first word of "$ac_prog", so it can be a program name with args.
36717set dummy $ac_prog; ac_word=$2
36718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36719$as_echo_n "checking for $ac_word... " >&6; }
36720if ${ac_cv_prog_ac_ct_AR+:} false; then :
36721  $as_echo_n "(cached) " >&6
36722else
36723  if test -n "$ac_ct_AR"; then
36724  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36725else
36726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36727for as_dir in $PATH
36728do
36729  IFS=$as_save_IFS
36730  test -z "$as_dir" && as_dir=.
36731    for ac_exec_ext in '' $ac_executable_extensions; do
36732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36733    ac_cv_prog_ac_ct_AR="$ac_prog"
36734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36735    break 2
36736  fi
36737done
36738  done
36739IFS=$as_save_IFS
36740
36741fi
36742fi
36743ac_ct_AR=$ac_cv_prog_ac_ct_AR
36744if test -n "$ac_ct_AR"; then
36745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36746$as_echo "$ac_ct_AR" >&6; }
36747else
36748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36749$as_echo "no" >&6; }
36750fi
36751
36752
36753  test -n "$ac_ct_AR" && break
36754done
36755
36756  if test "x$ac_ct_AR" = x; then
36757    AR=""
36758  else
36759    case $cross_compiling:$ac_tool_warned in
36760yes:)
36761{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36762$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36763ac_tool_warned=yes ;;
36764esac
36765    AR=$ac_ct_AR
36766  fi
36767fi
36768
36769  else
36770    # The variable is set, but is it from the command line or the environment?
36771
36772    # Try to remove the string !AR! from our list.
36773    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36774    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36775      # If it failed, the variable was not from the command line. Ignore it,
36776      # but warn the user (except for BASH, which is always set by the calling BASH).
36777      if test "xAR" != xBASH; then
36778        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36779$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36780      fi
36781      # Try to locate tool using the code snippet
36782      if test -n "$ac_tool_prefix"; then
36783  for ac_prog in ar
36784  do
36785    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36786set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36788$as_echo_n "checking for $ac_word... " >&6; }
36789if ${ac_cv_prog_AR+:} false; then :
36790  $as_echo_n "(cached) " >&6
36791else
36792  if test -n "$AR"; then
36793  ac_cv_prog_AR="$AR" # Let the user override the test.
36794else
36795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36796for as_dir in $PATH
36797do
36798  IFS=$as_save_IFS
36799  test -z "$as_dir" && as_dir=.
36800    for ac_exec_ext in '' $ac_executable_extensions; do
36801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36802    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36804    break 2
36805  fi
36806done
36807  done
36808IFS=$as_save_IFS
36809
36810fi
36811fi
36812AR=$ac_cv_prog_AR
36813if test -n "$AR"; then
36814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36815$as_echo "$AR" >&6; }
36816else
36817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36818$as_echo "no" >&6; }
36819fi
36820
36821
36822    test -n "$AR" && break
36823  done
36824fi
36825if test -z "$AR"; then
36826  ac_ct_AR=$AR
36827  for ac_prog in ar
36828do
36829  # Extract the first word of "$ac_prog", so it can be a program name with args.
36830set dummy $ac_prog; ac_word=$2
36831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36832$as_echo_n "checking for $ac_word... " >&6; }
36833if ${ac_cv_prog_ac_ct_AR+:} false; then :
36834  $as_echo_n "(cached) " >&6
36835else
36836  if test -n "$ac_ct_AR"; then
36837  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36838else
36839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36840for as_dir in $PATH
36841do
36842  IFS=$as_save_IFS
36843  test -z "$as_dir" && as_dir=.
36844    for ac_exec_ext in '' $ac_executable_extensions; do
36845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36846    ac_cv_prog_ac_ct_AR="$ac_prog"
36847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36848    break 2
36849  fi
36850done
36851  done
36852IFS=$as_save_IFS
36853
36854fi
36855fi
36856ac_ct_AR=$ac_cv_prog_ac_ct_AR
36857if test -n "$ac_ct_AR"; then
36858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36859$as_echo "$ac_ct_AR" >&6; }
36860else
36861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36862$as_echo "no" >&6; }
36863fi
36864
36865
36866  test -n "$ac_ct_AR" && break
36867done
36868
36869  if test "x$ac_ct_AR" = x; then
36870    AR=""
36871  else
36872    case $cross_compiling:$ac_tool_warned in
36873yes:)
36874{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36875$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36876ac_tool_warned=yes ;;
36877esac
36878    AR=$ac_ct_AR
36879  fi
36880fi
36881
36882    else
36883      # If it succeeded, then it was overridden by the user. We will use it
36884      # for the tool.
36885
36886      # First remove it from the list of overridden variables, so we can test
36887      # for unknown variables in the end.
36888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36889
36890      # Check if we try to supply an empty value
36891      if test "x$AR" = x; then
36892        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36893$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36895$as_echo_n "checking for AR... " >&6; }
36896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36897$as_echo "disabled" >&6; }
36898      else
36899        # Check if the provided tool contains a complete path.
36900        tool_specified="$AR"
36901        tool_basename="${tool_specified##*/}"
36902        if test "x$tool_basename" = "x$tool_specified"; then
36903          # A command without a complete path is provided, search $PATH.
36904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36905$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36906          # Extract the first word of "$tool_basename", so it can be a program name with args.
36907set dummy $tool_basename; ac_word=$2
36908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36909$as_echo_n "checking for $ac_word... " >&6; }
36910if ${ac_cv_path_AR+:} false; then :
36911  $as_echo_n "(cached) " >&6
36912else
36913  case $AR in
36914  [\\/]* | ?:[\\/]*)
36915  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36916  ;;
36917  *)
36918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36919for as_dir in $PATH
36920do
36921  IFS=$as_save_IFS
36922  test -z "$as_dir" && as_dir=.
36923    for ac_exec_ext in '' $ac_executable_extensions; do
36924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36925    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36927    break 2
36928  fi
36929done
36930  done
36931IFS=$as_save_IFS
36932
36933  ;;
36934esac
36935fi
36936AR=$ac_cv_path_AR
36937if test -n "$AR"; then
36938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36939$as_echo "$AR" >&6; }
36940else
36941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36942$as_echo "no" >&6; }
36943fi
36944
36945
36946          if test "x$AR" = x; then
36947            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36948          fi
36949        else
36950          # Otherwise we believe it is a complete path. Use it as it is.
36951          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36952$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36953          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36954$as_echo_n "checking for AR... " >&6; }
36955          if test ! -x "$tool_specified"; then
36956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36957$as_echo "not found" >&6; }
36958            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36959          fi
36960          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36961$as_echo "$tool_specified" >&6; }
36962        fi
36963      fi
36964    fi
36965
36966  fi
36967
36968
36969  fi
36970
36971  # Only process if variable expands to non-empty
36972
36973  if test "x$AR" != x; then
36974    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36975
36976  # First separate the path from the arguments. This will split at the first
36977  # space.
36978  complete="$AR"
36979  path="${complete%% *}"
36980  tmp="$complete EOL"
36981  arguments="${tmp#* }"
36982
36983  # Input might be given as Windows format, start by converting to
36984  # unix format.
36985  new_path=`$CYGPATH -u "$path"`
36986
36987  # Now try to locate executable using which
36988  new_path=`$WHICH "$new_path" 2> /dev/null`
36989  # bat and cmd files are not always considered executable in cygwin causing which
36990  # to not find them
36991  if test "x$new_path" = x \
36992      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36993      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36994    new_path=`$CYGPATH -u "$path"`
36995  fi
36996  if test "x$new_path" = x; then
36997    # Oops. Which didn't find the executable.
36998    # The splitting of arguments from the executable at a space might have been incorrect,
36999    # since paths with space are more likely in Windows. Give it another try with the whole
37000    # argument.
37001    path="$complete"
37002    arguments="EOL"
37003    new_path=`$CYGPATH -u "$path"`
37004    new_path=`$WHICH "$new_path" 2> /dev/null`
37005    # bat and cmd files are not always considered executable in cygwin causing which
37006    # to not find them
37007    if test "x$new_path" = x \
37008        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37009        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37010      new_path=`$CYGPATH -u "$path"`
37011    fi
37012    if test "x$new_path" = x; then
37013      # It's still not found. Now this is an unrecoverable error.
37014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37015$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37016      has_space=`$ECHO "$complete" | $GREP " "`
37017      if test "x$has_space" != x; then
37018        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37019$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37020      fi
37021      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37022    fi
37023  fi
37024
37025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37028  # "foo.exe" is OK but "foo" is an error.
37029  #
37030  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37031  # It is also a way to make sure we got the proper file name for the real test later on.
37032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37033  if test "x$test_shortpath" = x; then
37034    # Short path failed, file does not exist as specified.
37035    # Try adding .exe or .cmd
37036    if test -f "${new_path}.exe"; then
37037      input_to_shortpath="${new_path}.exe"
37038    elif test -f "${new_path}.cmd"; then
37039      input_to_shortpath="${new_path}.cmd"
37040    else
37041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37042$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37043      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37044$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37045      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37046    fi
37047  else
37048    input_to_shortpath="$new_path"
37049  fi
37050
37051  # Call helper function which possibly converts this using DOS-style short mode.
37052  # If so, the updated path is stored in $new_path.
37053  new_path="$input_to_shortpath"
37054
37055  input_path="$input_to_shortpath"
37056  # Check if we need to convert this using DOS-style short mode. If the path
37057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37058  # take no chances and rewrite it.
37059  # Note: m4 eats our [], so we need to use [ and ] instead.
37060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37061  if test "x$has_forbidden_chars" != x; then
37062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37066      # Going to short mode and back again did indeed matter. Since short mode is
37067      # case insensitive, let's make it lowercase to improve readability.
37068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37069      # Now convert it back to Unix-style (cygpath)
37070      input_path=`$CYGPATH -u "$shortmode_path"`
37071      new_path="$input_path"
37072    fi
37073  fi
37074
37075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37076  if test "x$test_cygdrive_prefix" = x; then
37077    # As a simple fix, exclude /usr/bin since it's not a real path.
37078    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37080      # a path prefixed by /cygdrive for fixpath to work.
37081      new_path="$CYGWIN_ROOT_PATH$input_path"
37082    fi
37083  fi
37084
37085  # remove trailing .exe if any
37086  new_path="${new_path/%.exe/}"
37087
37088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37089
37090  # First separate the path from the arguments. This will split at the first
37091  # space.
37092  complete="$AR"
37093  path="${complete%% *}"
37094  tmp="$complete EOL"
37095  arguments="${tmp#* }"
37096
37097  # Input might be given as Windows format, start by converting to
37098  # unix format.
37099  new_path="$path"
37100
37101  windows_path="$new_path"
37102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37103    unix_path=`$CYGPATH -u "$windows_path"`
37104    new_path="$unix_path"
37105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37107    new_path="$unix_path"
37108  fi
37109
37110
37111  # Now try to locate executable using which
37112  new_path=`$WHICH "$new_path" 2> /dev/null`
37113
37114  if test "x$new_path" = x; then
37115    # Oops. Which didn't find the executable.
37116    # The splitting of arguments from the executable at a space might have been incorrect,
37117    # since paths with space are more likely in Windows. Give it another try with the whole
37118    # argument.
37119    path="$complete"
37120    arguments="EOL"
37121    new_path="$path"
37122
37123  windows_path="$new_path"
37124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37125    unix_path=`$CYGPATH -u "$windows_path"`
37126    new_path="$unix_path"
37127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37129    new_path="$unix_path"
37130  fi
37131
37132
37133    new_path=`$WHICH "$new_path" 2> /dev/null`
37134    # bat and cmd files are not always considered executable in MSYS causing which
37135    # to not find them
37136    if test "x$new_path" = x \
37137        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37138        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37139      new_path="$path"
37140
37141  windows_path="$new_path"
37142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37143    unix_path=`$CYGPATH -u "$windows_path"`
37144    new_path="$unix_path"
37145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37147    new_path="$unix_path"
37148  fi
37149
37150    fi
37151
37152    if test "x$new_path" = x; then
37153      # It's still not found. Now this is an unrecoverable error.
37154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37155$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37156      has_space=`$ECHO "$complete" | $GREP " "`
37157      if test "x$has_space" != x; then
37158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37160      fi
37161      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37162    fi
37163  fi
37164
37165  # Now new_path has a complete unix path to the binary
37166  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37167    # Keep paths in /bin as-is, but remove trailing .exe if any
37168    new_path="${new_path/%.exe/}"
37169    # Do not save /bin paths to all_fixpath_prefixes!
37170  else
37171    # Not in mixed or Windows style, start by that.
37172    new_path=`cmd //c echo $new_path`
37173
37174  input_path="$new_path"
37175  # Check if we need to convert this using DOS-style short mode. If the path
37176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37177  # take no chances and rewrite it.
37178  # Note: m4 eats our [], so we need to use [ and ] instead.
37179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37180  if test "x$has_forbidden_chars" != x; then
37181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37183  fi
37184
37185    # Output is in $new_path
37186
37187  windows_path="$new_path"
37188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37189    unix_path=`$CYGPATH -u "$windows_path"`
37190    new_path="$unix_path"
37191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37193    new_path="$unix_path"
37194  fi
37195
37196    # remove trailing .exe if any
37197    new_path="${new_path/%.exe/}"
37198
37199    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37200    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37201  fi
37202
37203    else
37204      # We're on a unix platform. Hooray! :)
37205      # First separate the path from the arguments. This will split at the first
37206      # space.
37207      complete="$AR"
37208      path="${complete%% *}"
37209      tmp="$complete EOL"
37210      arguments="${tmp#* }"
37211
37212      # Cannot rely on the command "which" here since it doesn't always work.
37213      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37214      if test -z "$is_absolute_path"; then
37215        # Path to executable is not absolute. Find it.
37216        IFS_save="$IFS"
37217        IFS=:
37218        for p in $PATH; do
37219          if test -f "$p/$path" && test -x "$p/$path"; then
37220            new_path="$p/$path"
37221            break
37222          fi
37223        done
37224        IFS="$IFS_save"
37225      else
37226        # This is an absolute path, we can use it without further modifications.
37227        new_path="$path"
37228      fi
37229
37230      if test "x$new_path" = x; then
37231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37232$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37233        has_space=`$ECHO "$complete" | $GREP " "`
37234        if test "x$has_space" != x; then
37235          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37236$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37237        fi
37238        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37239      fi
37240    fi
37241
37242    # Now join together the path and the arguments once again
37243    if test "x$arguments" != xEOL; then
37244      new_complete="$new_path ${arguments% *}"
37245    else
37246      new_complete="$new_path"
37247    fi
37248
37249    if test "x$complete" != "x$new_complete"; then
37250      AR="$new_complete"
37251      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37252$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37253    fi
37254  fi
37255
37256
37257
37258  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37259
37260
37261  # Publish this variable in the help.
37262
37263
37264  if [ -z "${LIPO+x}" ]; then
37265    # The variable is not set by user, try to locate tool using the code snippet
37266    for ac_prog in lipo
37267do
37268  # Extract the first word of "$ac_prog", so it can be a program name with args.
37269set dummy $ac_prog; ac_word=$2
37270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37271$as_echo_n "checking for $ac_word... " >&6; }
37272if ${ac_cv_path_LIPO+:} false; then :
37273  $as_echo_n "(cached) " >&6
37274else
37275  case $LIPO in
37276  [\\/]* | ?:[\\/]*)
37277  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37278  ;;
37279  *)
37280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37281for as_dir in $PATH
37282do
37283  IFS=$as_save_IFS
37284  test -z "$as_dir" && as_dir=.
37285    for ac_exec_ext in '' $ac_executable_extensions; do
37286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37287    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37289    break 2
37290  fi
37291done
37292  done
37293IFS=$as_save_IFS
37294
37295  ;;
37296esac
37297fi
37298LIPO=$ac_cv_path_LIPO
37299if test -n "$LIPO"; then
37300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37301$as_echo "$LIPO" >&6; }
37302else
37303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37304$as_echo "no" >&6; }
37305fi
37306
37307
37308  test -n "$LIPO" && break
37309done
37310
37311  else
37312    # The variable is set, but is it from the command line or the environment?
37313
37314    # Try to remove the string !LIPO! from our list.
37315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37317      # If it failed, the variable was not from the command line. Ignore it,
37318      # but warn the user (except for BASH, which is always set by the calling BASH).
37319      if test "xLIPO" != xBASH; then
37320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37321$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37322      fi
37323      # Try to locate tool using the code snippet
37324      for ac_prog in lipo
37325do
37326  # Extract the first word of "$ac_prog", so it can be a program name with args.
37327set dummy $ac_prog; ac_word=$2
37328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37329$as_echo_n "checking for $ac_word... " >&6; }
37330if ${ac_cv_path_LIPO+:} false; then :
37331  $as_echo_n "(cached) " >&6
37332else
37333  case $LIPO in
37334  [\\/]* | ?:[\\/]*)
37335  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37336  ;;
37337  *)
37338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37339for as_dir in $PATH
37340do
37341  IFS=$as_save_IFS
37342  test -z "$as_dir" && as_dir=.
37343    for ac_exec_ext in '' $ac_executable_extensions; do
37344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37345    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37347    break 2
37348  fi
37349done
37350  done
37351IFS=$as_save_IFS
37352
37353  ;;
37354esac
37355fi
37356LIPO=$ac_cv_path_LIPO
37357if test -n "$LIPO"; then
37358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37359$as_echo "$LIPO" >&6; }
37360else
37361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37362$as_echo "no" >&6; }
37363fi
37364
37365
37366  test -n "$LIPO" && break
37367done
37368
37369    else
37370      # If it succeeded, then it was overridden by the user. We will use it
37371      # for the tool.
37372
37373      # First remove it from the list of overridden variables, so we can test
37374      # for unknown variables in the end.
37375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37376
37377      # Check if we try to supply an empty value
37378      if test "x$LIPO" = x; then
37379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37380$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37382$as_echo_n "checking for LIPO... " >&6; }
37383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37384$as_echo "disabled" >&6; }
37385      else
37386        # Check if the provided tool contains a complete path.
37387        tool_specified="$LIPO"
37388        tool_basename="${tool_specified##*/}"
37389        if test "x$tool_basename" = "x$tool_specified"; then
37390          # A command without a complete path is provided, search $PATH.
37391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37392$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37393          # Extract the first word of "$tool_basename", so it can be a program name with args.
37394set dummy $tool_basename; ac_word=$2
37395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37396$as_echo_n "checking for $ac_word... " >&6; }
37397if ${ac_cv_path_LIPO+:} false; then :
37398  $as_echo_n "(cached) " >&6
37399else
37400  case $LIPO in
37401  [\\/]* | ?:[\\/]*)
37402  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37403  ;;
37404  *)
37405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37406for as_dir in $PATH
37407do
37408  IFS=$as_save_IFS
37409  test -z "$as_dir" && as_dir=.
37410    for ac_exec_ext in '' $ac_executable_extensions; do
37411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37412    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37414    break 2
37415  fi
37416done
37417  done
37418IFS=$as_save_IFS
37419
37420  ;;
37421esac
37422fi
37423LIPO=$ac_cv_path_LIPO
37424if test -n "$LIPO"; then
37425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37426$as_echo "$LIPO" >&6; }
37427else
37428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37429$as_echo "no" >&6; }
37430fi
37431
37432
37433          if test "x$LIPO" = x; then
37434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37435          fi
37436        else
37437          # Otherwise we believe it is a complete path. Use it as it is.
37438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37439$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37441$as_echo_n "checking for LIPO... " >&6; }
37442          if test ! -x "$tool_specified"; then
37443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37444$as_echo "not found" >&6; }
37445            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37446          fi
37447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37448$as_echo "$tool_specified" >&6; }
37449        fi
37450      fi
37451    fi
37452
37453  fi
37454
37455
37456
37457  # Only process if variable expands to non-empty
37458
37459  if test "x$LIPO" != x; then
37460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37461
37462  # First separate the path from the arguments. This will split at the first
37463  # space.
37464  complete="$LIPO"
37465  path="${complete%% *}"
37466  tmp="$complete EOL"
37467  arguments="${tmp#* }"
37468
37469  # Input might be given as Windows format, start by converting to
37470  # unix format.
37471  new_path=`$CYGPATH -u "$path"`
37472
37473  # Now try to locate executable using which
37474  new_path=`$WHICH "$new_path" 2> /dev/null`
37475  # bat and cmd files are not always considered executable in cygwin causing which
37476  # to not find them
37477  if test "x$new_path" = x \
37478      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37479      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37480    new_path=`$CYGPATH -u "$path"`
37481  fi
37482  if test "x$new_path" = x; then
37483    # Oops. Which didn't find the executable.
37484    # The splitting of arguments from the executable at a space might have been incorrect,
37485    # since paths with space are more likely in Windows. Give it another try with the whole
37486    # argument.
37487    path="$complete"
37488    arguments="EOL"
37489    new_path=`$CYGPATH -u "$path"`
37490    new_path=`$WHICH "$new_path" 2> /dev/null`
37491    # bat and cmd files are not always considered executable in cygwin causing which
37492    # to not find them
37493    if test "x$new_path" = x \
37494        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37495        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37496      new_path=`$CYGPATH -u "$path"`
37497    fi
37498    if test "x$new_path" = x; then
37499      # It's still not found. Now this is an unrecoverable error.
37500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37501$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37502      has_space=`$ECHO "$complete" | $GREP " "`
37503      if test "x$has_space" != x; then
37504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37506      fi
37507      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37508    fi
37509  fi
37510
37511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37514  # "foo.exe" is OK but "foo" is an error.
37515  #
37516  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37517  # It is also a way to make sure we got the proper file name for the real test later on.
37518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37519  if test "x$test_shortpath" = x; then
37520    # Short path failed, file does not exist as specified.
37521    # Try adding .exe or .cmd
37522    if test -f "${new_path}.exe"; then
37523      input_to_shortpath="${new_path}.exe"
37524    elif test -f "${new_path}.cmd"; then
37525      input_to_shortpath="${new_path}.cmd"
37526    else
37527      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37528$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37529      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37530$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37531      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37532    fi
37533  else
37534    input_to_shortpath="$new_path"
37535  fi
37536
37537  # Call helper function which possibly converts this using DOS-style short mode.
37538  # If so, the updated path is stored in $new_path.
37539  new_path="$input_to_shortpath"
37540
37541  input_path="$input_to_shortpath"
37542  # Check if we need to convert this using DOS-style short mode. If the path
37543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37544  # take no chances and rewrite it.
37545  # Note: m4 eats our [], so we need to use [ and ] instead.
37546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37547  if test "x$has_forbidden_chars" != x; then
37548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37552      # Going to short mode and back again did indeed matter. Since short mode is
37553      # case insensitive, let's make it lowercase to improve readability.
37554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37555      # Now convert it back to Unix-style (cygpath)
37556      input_path=`$CYGPATH -u "$shortmode_path"`
37557      new_path="$input_path"
37558    fi
37559  fi
37560
37561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37562  if test "x$test_cygdrive_prefix" = x; then
37563    # As a simple fix, exclude /usr/bin since it's not a real path.
37564    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37566      # a path prefixed by /cygdrive for fixpath to work.
37567      new_path="$CYGWIN_ROOT_PATH$input_path"
37568    fi
37569  fi
37570
37571  # remove trailing .exe if any
37572  new_path="${new_path/%.exe/}"
37573
37574    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37575
37576  # First separate the path from the arguments. This will split at the first
37577  # space.
37578  complete="$LIPO"
37579  path="${complete%% *}"
37580  tmp="$complete EOL"
37581  arguments="${tmp#* }"
37582
37583  # Input might be given as Windows format, start by converting to
37584  # unix format.
37585  new_path="$path"
37586
37587  windows_path="$new_path"
37588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37589    unix_path=`$CYGPATH -u "$windows_path"`
37590    new_path="$unix_path"
37591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37593    new_path="$unix_path"
37594  fi
37595
37596
37597  # Now try to locate executable using which
37598  new_path=`$WHICH "$new_path" 2> /dev/null`
37599
37600  if test "x$new_path" = x; then
37601    # Oops. Which didn't find the executable.
37602    # The splitting of arguments from the executable at a space might have been incorrect,
37603    # since paths with space are more likely in Windows. Give it another try with the whole
37604    # argument.
37605    path="$complete"
37606    arguments="EOL"
37607    new_path="$path"
37608
37609  windows_path="$new_path"
37610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37611    unix_path=`$CYGPATH -u "$windows_path"`
37612    new_path="$unix_path"
37613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37615    new_path="$unix_path"
37616  fi
37617
37618
37619    new_path=`$WHICH "$new_path" 2> /dev/null`
37620    # bat and cmd files are not always considered executable in MSYS causing which
37621    # to not find them
37622    if test "x$new_path" = x \
37623        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37624        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37625      new_path="$path"
37626
37627  windows_path="$new_path"
37628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37629    unix_path=`$CYGPATH -u "$windows_path"`
37630    new_path="$unix_path"
37631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37633    new_path="$unix_path"
37634  fi
37635
37636    fi
37637
37638    if test "x$new_path" = x; then
37639      # It's still not found. Now this is an unrecoverable error.
37640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37641$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37642      has_space=`$ECHO "$complete" | $GREP " "`
37643      if test "x$has_space" != x; then
37644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37646      fi
37647      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37648    fi
37649  fi
37650
37651  # Now new_path has a complete unix path to the binary
37652  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37653    # Keep paths in /bin as-is, but remove trailing .exe if any
37654    new_path="${new_path/%.exe/}"
37655    # Do not save /bin paths to all_fixpath_prefixes!
37656  else
37657    # Not in mixed or Windows style, start by that.
37658    new_path=`cmd //c echo $new_path`
37659
37660  input_path="$new_path"
37661  # Check if we need to convert this using DOS-style short mode. If the path
37662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37663  # take no chances and rewrite it.
37664  # Note: m4 eats our [], so we need to use [ and ] instead.
37665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37666  if test "x$has_forbidden_chars" != x; then
37667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37669  fi
37670
37671    # Output is in $new_path
37672
37673  windows_path="$new_path"
37674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37675    unix_path=`$CYGPATH -u "$windows_path"`
37676    new_path="$unix_path"
37677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37679    new_path="$unix_path"
37680  fi
37681
37682    # remove trailing .exe if any
37683    new_path="${new_path/%.exe/}"
37684
37685    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37686    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37687  fi
37688
37689    else
37690      # We're on a unix platform. Hooray! :)
37691      # First separate the path from the arguments. This will split at the first
37692      # space.
37693      complete="$LIPO"
37694      path="${complete%% *}"
37695      tmp="$complete EOL"
37696      arguments="${tmp#* }"
37697
37698      # Cannot rely on the command "which" here since it doesn't always work.
37699      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37700      if test -z "$is_absolute_path"; then
37701        # Path to executable is not absolute. Find it.
37702        IFS_save="$IFS"
37703        IFS=:
37704        for p in $PATH; do
37705          if test -f "$p/$path" && test -x "$p/$path"; then
37706            new_path="$p/$path"
37707            break
37708          fi
37709        done
37710        IFS="$IFS_save"
37711      else
37712        # This is an absolute path, we can use it without further modifications.
37713        new_path="$path"
37714      fi
37715
37716      if test "x$new_path" = x; then
37717        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37718$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37719        has_space=`$ECHO "$complete" | $GREP " "`
37720        if test "x$has_space" != x; then
37721          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37722$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37723        fi
37724        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37725      fi
37726    fi
37727
37728    # Now join together the path and the arguments once again
37729    if test "x$arguments" != xEOL; then
37730      new_complete="$new_path ${arguments% *}"
37731    else
37732      new_complete="$new_path"
37733    fi
37734
37735    if test "x$complete" != "x$new_complete"; then
37736      LIPO="$new_complete"
37737      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
37738$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
37739    fi
37740  fi
37741
37742  fi
37743
37744  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37745    # Extract the first word of "mt", so it can be a program name with args.
37746set dummy mt; ac_word=$2
37747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37748$as_echo_n "checking for $ac_word... " >&6; }
37749if ${ac_cv_prog_MT+:} false; then :
37750  $as_echo_n "(cached) " >&6
37751else
37752  if test -n "$MT"; then
37753  ac_cv_prog_MT="$MT" # Let the user override the test.
37754else
37755  ac_prog_rejected=no
37756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37757for as_dir in $PATH
37758do
37759  IFS=$as_save_IFS
37760  test -z "$as_dir" && as_dir=.
37761    for ac_exec_ext in '' $ac_executable_extensions; do
37762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37763    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
37764       ac_prog_rejected=yes
37765       continue
37766     fi
37767    ac_cv_prog_MT="mt"
37768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37769    break 2
37770  fi
37771done
37772  done
37773IFS=$as_save_IFS
37774
37775if test $ac_prog_rejected = yes; then
37776  # We found a bogon in the path, so make sure we never use it.
37777  set dummy $ac_cv_prog_MT
37778  shift
37779  if test $# != 0; then
37780    # We chose a different compiler from the bogus one.
37781    # However, it has the same basename, so the bogon will be chosen
37782    # first if we set MT to just the basename; use the full file name.
37783    shift
37784    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
37785  fi
37786fi
37787fi
37788fi
37789MT=$ac_cv_prog_MT
37790if test -n "$MT"; then
37791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
37792$as_echo "$MT" >&6; }
37793else
37794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37795$as_echo "no" >&6; }
37796fi
37797
37798
37799
37800  # Only process if variable expands to non-empty
37801
37802  if test "x$MT" != x; then
37803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37804
37805  # First separate the path from the arguments. This will split at the first
37806  # space.
37807  complete="$MT"
37808  path="${complete%% *}"
37809  tmp="$complete EOL"
37810  arguments="${tmp#* }"
37811
37812  # Input might be given as Windows format, start by converting to
37813  # unix format.
37814  new_path=`$CYGPATH -u "$path"`
37815
37816  # Now try to locate executable using which
37817  new_path=`$WHICH "$new_path" 2> /dev/null`
37818  # bat and cmd files are not always considered executable in cygwin causing which
37819  # to not find them
37820  if test "x$new_path" = x \
37821      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37822      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37823    new_path=`$CYGPATH -u "$path"`
37824  fi
37825  if test "x$new_path" = x; then
37826    # Oops. Which didn't find the executable.
37827    # The splitting of arguments from the executable at a space might have been incorrect,
37828    # since paths with space are more likely in Windows. Give it another try with the whole
37829    # argument.
37830    path="$complete"
37831    arguments="EOL"
37832    new_path=`$CYGPATH -u "$path"`
37833    new_path=`$WHICH "$new_path" 2> /dev/null`
37834    # bat and cmd files are not always considered executable in cygwin causing which
37835    # to not find them
37836    if test "x$new_path" = x \
37837        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37838        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37839      new_path=`$CYGPATH -u "$path"`
37840    fi
37841    if test "x$new_path" = x; then
37842      # It's still not found. Now this is an unrecoverable error.
37843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37844$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37845      has_space=`$ECHO "$complete" | $GREP " "`
37846      if test "x$has_space" != x; then
37847        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37848$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37849      fi
37850      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37851    fi
37852  fi
37853
37854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37857  # "foo.exe" is OK but "foo" is an error.
37858  #
37859  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37860  # It is also a way to make sure we got the proper file name for the real test later on.
37861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37862  if test "x$test_shortpath" = x; then
37863    # Short path failed, file does not exist as specified.
37864    # Try adding .exe or .cmd
37865    if test -f "${new_path}.exe"; then
37866      input_to_shortpath="${new_path}.exe"
37867    elif test -f "${new_path}.cmd"; then
37868      input_to_shortpath="${new_path}.cmd"
37869    else
37870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
37871$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
37872      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37873$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37874      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37875    fi
37876  else
37877    input_to_shortpath="$new_path"
37878  fi
37879
37880  # Call helper function which possibly converts this using DOS-style short mode.
37881  # If so, the updated path is stored in $new_path.
37882  new_path="$input_to_shortpath"
37883
37884  input_path="$input_to_shortpath"
37885  # Check if we need to convert this using DOS-style short mode. If the path
37886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37887  # take no chances and rewrite it.
37888  # Note: m4 eats our [], so we need to use [ and ] instead.
37889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37890  if test "x$has_forbidden_chars" != x; then
37891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37895      # Going to short mode and back again did indeed matter. Since short mode is
37896      # case insensitive, let's make it lowercase to improve readability.
37897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37898      # Now convert it back to Unix-style (cygpath)
37899      input_path=`$CYGPATH -u "$shortmode_path"`
37900      new_path="$input_path"
37901    fi
37902  fi
37903
37904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37905  if test "x$test_cygdrive_prefix" = x; then
37906    # As a simple fix, exclude /usr/bin since it's not a real path.
37907    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37909      # a path prefixed by /cygdrive for fixpath to work.
37910      new_path="$CYGWIN_ROOT_PATH$input_path"
37911    fi
37912  fi
37913
37914  # remove trailing .exe if any
37915  new_path="${new_path/%.exe/}"
37916
37917    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37918
37919  # First separate the path from the arguments. This will split at the first
37920  # space.
37921  complete="$MT"
37922  path="${complete%% *}"
37923  tmp="$complete EOL"
37924  arguments="${tmp#* }"
37925
37926  # Input might be given as Windows format, start by converting to
37927  # unix format.
37928  new_path="$path"
37929
37930  windows_path="$new_path"
37931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37932    unix_path=`$CYGPATH -u "$windows_path"`
37933    new_path="$unix_path"
37934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37936    new_path="$unix_path"
37937  fi
37938
37939
37940  # Now try to locate executable using which
37941  new_path=`$WHICH "$new_path" 2> /dev/null`
37942
37943  if test "x$new_path" = x; then
37944    # Oops. Which didn't find the executable.
37945    # The splitting of arguments from the executable at a space might have been incorrect,
37946    # since paths with space are more likely in Windows. Give it another try with the whole
37947    # argument.
37948    path="$complete"
37949    arguments="EOL"
37950    new_path="$path"
37951
37952  windows_path="$new_path"
37953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37954    unix_path=`$CYGPATH -u "$windows_path"`
37955    new_path="$unix_path"
37956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37958    new_path="$unix_path"
37959  fi
37960
37961
37962    new_path=`$WHICH "$new_path" 2> /dev/null`
37963    # bat and cmd files are not always considered executable in MSYS causing which
37964    # to not find them
37965    if test "x$new_path" = x \
37966        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37967        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37968      new_path="$path"
37969
37970  windows_path="$new_path"
37971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37972    unix_path=`$CYGPATH -u "$windows_path"`
37973    new_path="$unix_path"
37974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37976    new_path="$unix_path"
37977  fi
37978
37979    fi
37980
37981    if test "x$new_path" = x; then
37982      # It's still not found. Now this is an unrecoverable error.
37983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
37984$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
37985      has_space=`$ECHO "$complete" | $GREP " "`
37986      if test "x$has_space" != x; then
37987        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37988$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37989      fi
37990      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
37991    fi
37992  fi
37993
37994  # Now new_path has a complete unix path to the binary
37995  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37996    # Keep paths in /bin as-is, but remove trailing .exe if any
37997    new_path="${new_path/%.exe/}"
37998    # Do not save /bin paths to all_fixpath_prefixes!
37999  else
38000    # Not in mixed or Windows style, start by that.
38001    new_path=`cmd //c echo $new_path`
38002
38003  input_path="$new_path"
38004  # Check if we need to convert this using DOS-style short mode. If the path
38005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38006  # take no chances and rewrite it.
38007  # Note: m4 eats our [], so we need to use [ and ] instead.
38008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38009  if test "x$has_forbidden_chars" != x; then
38010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38012  fi
38013
38014    # Output is in $new_path
38015
38016  windows_path="$new_path"
38017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38018    unix_path=`$CYGPATH -u "$windows_path"`
38019    new_path="$unix_path"
38020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38022    new_path="$unix_path"
38023  fi
38024
38025    # remove trailing .exe if any
38026    new_path="${new_path/%.exe/}"
38027
38028    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38029    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38030  fi
38031
38032    else
38033      # We're on a unix platform. Hooray! :)
38034      # First separate the path from the arguments. This will split at the first
38035      # space.
38036      complete="$MT"
38037      path="${complete%% *}"
38038      tmp="$complete EOL"
38039      arguments="${tmp#* }"
38040
38041      # Cannot rely on the command "which" here since it doesn't always work.
38042      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38043      if test -z "$is_absolute_path"; then
38044        # Path to executable is not absolute. Find it.
38045        IFS_save="$IFS"
38046        IFS=:
38047        for p in $PATH; do
38048          if test -f "$p/$path" && test -x "$p/$path"; then
38049            new_path="$p/$path"
38050            break
38051          fi
38052        done
38053        IFS="$IFS_save"
38054      else
38055        # This is an absolute path, we can use it without further modifications.
38056        new_path="$path"
38057      fi
38058
38059      if test "x$new_path" = x; then
38060        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38061$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38062        has_space=`$ECHO "$complete" | $GREP " "`
38063        if test "x$has_space" != x; then
38064          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38065$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38066        fi
38067        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38068      fi
38069    fi
38070
38071    # Now join together the path and the arguments once again
38072    if test "x$arguments" != xEOL; then
38073      new_complete="$new_path ${arguments% *}"
38074    else
38075      new_complete="$new_path"
38076    fi
38077
38078    if test "x$complete" != "x$new_complete"; then
38079      MT="$new_complete"
38080      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38081$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38082    fi
38083  fi
38084
38085    # Setup the resource compiler (RC)
38086    # Extract the first word of "rc", so it can be a program name with args.
38087set dummy rc; ac_word=$2
38088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38089$as_echo_n "checking for $ac_word... " >&6; }
38090if ${ac_cv_prog_RC+:} false; then :
38091  $as_echo_n "(cached) " >&6
38092else
38093  if test -n "$RC"; then
38094  ac_cv_prog_RC="$RC" # Let the user override the test.
38095else
38096  ac_prog_rejected=no
38097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38098for as_dir in $PATH
38099do
38100  IFS=$as_save_IFS
38101  test -z "$as_dir" && as_dir=.
38102    for ac_exec_ext in '' $ac_executable_extensions; do
38103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38104    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38105       ac_prog_rejected=yes
38106       continue
38107     fi
38108    ac_cv_prog_RC="rc"
38109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38110    break 2
38111  fi
38112done
38113  done
38114IFS=$as_save_IFS
38115
38116if test $ac_prog_rejected = yes; then
38117  # We found a bogon in the path, so make sure we never use it.
38118  set dummy $ac_cv_prog_RC
38119  shift
38120  if test $# != 0; then
38121    # We chose a different compiler from the bogus one.
38122    # However, it has the same basename, so the bogon will be chosen
38123    # first if we set RC to just the basename; use the full file name.
38124    shift
38125    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38126  fi
38127fi
38128fi
38129fi
38130RC=$ac_cv_prog_RC
38131if test -n "$RC"; then
38132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38133$as_echo "$RC" >&6; }
38134else
38135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38136$as_echo "no" >&6; }
38137fi
38138
38139
38140
38141  # Only process if variable expands to non-empty
38142
38143  if test "x$RC" != x; then
38144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38145
38146  # First separate the path from the arguments. This will split at the first
38147  # space.
38148  complete="$RC"
38149  path="${complete%% *}"
38150  tmp="$complete EOL"
38151  arguments="${tmp#* }"
38152
38153  # Input might be given as Windows format, start by converting to
38154  # unix format.
38155  new_path=`$CYGPATH -u "$path"`
38156
38157  # Now try to locate executable using which
38158  new_path=`$WHICH "$new_path" 2> /dev/null`
38159  # bat and cmd files are not always considered executable in cygwin causing which
38160  # to not find them
38161  if test "x$new_path" = x \
38162      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38163      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38164    new_path=`$CYGPATH -u "$path"`
38165  fi
38166  if test "x$new_path" = x; then
38167    # Oops. Which didn't find the executable.
38168    # The splitting of arguments from the executable at a space might have been incorrect,
38169    # since paths with space are more likely in Windows. Give it another try with the whole
38170    # argument.
38171    path="$complete"
38172    arguments="EOL"
38173    new_path=`$CYGPATH -u "$path"`
38174    new_path=`$WHICH "$new_path" 2> /dev/null`
38175    # bat and cmd files are not always considered executable in cygwin causing which
38176    # to not find them
38177    if test "x$new_path" = x \
38178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38180      new_path=`$CYGPATH -u "$path"`
38181    fi
38182    if test "x$new_path" = x; then
38183      # It's still not found. Now this is an unrecoverable error.
38184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38185$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38186      has_space=`$ECHO "$complete" | $GREP " "`
38187      if test "x$has_space" != x; then
38188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38190      fi
38191      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38192    fi
38193  fi
38194
38195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38198  # "foo.exe" is OK but "foo" is an error.
38199  #
38200  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38201  # It is also a way to make sure we got the proper file name for the real test later on.
38202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38203  if test "x$test_shortpath" = x; then
38204    # Short path failed, file does not exist as specified.
38205    # Try adding .exe or .cmd
38206    if test -f "${new_path}.exe"; then
38207      input_to_shortpath="${new_path}.exe"
38208    elif test -f "${new_path}.cmd"; then
38209      input_to_shortpath="${new_path}.cmd"
38210    else
38211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38212$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38213      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38214$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38215      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38216    fi
38217  else
38218    input_to_shortpath="$new_path"
38219  fi
38220
38221  # Call helper function which possibly converts this using DOS-style short mode.
38222  # If so, the updated path is stored in $new_path.
38223  new_path="$input_to_shortpath"
38224
38225  input_path="$input_to_shortpath"
38226  # Check if we need to convert this using DOS-style short mode. If the path
38227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38228  # take no chances and rewrite it.
38229  # Note: m4 eats our [], so we need to use [ and ] instead.
38230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38231  if test "x$has_forbidden_chars" != x; then
38232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38236      # Going to short mode and back again did indeed matter. Since short mode is
38237      # case insensitive, let's make it lowercase to improve readability.
38238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38239      # Now convert it back to Unix-style (cygpath)
38240      input_path=`$CYGPATH -u "$shortmode_path"`
38241      new_path="$input_path"
38242    fi
38243  fi
38244
38245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38246  if test "x$test_cygdrive_prefix" = x; then
38247    # As a simple fix, exclude /usr/bin since it's not a real path.
38248    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38250      # a path prefixed by /cygdrive for fixpath to work.
38251      new_path="$CYGWIN_ROOT_PATH$input_path"
38252    fi
38253  fi
38254
38255  # remove trailing .exe if any
38256  new_path="${new_path/%.exe/}"
38257
38258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38259
38260  # First separate the path from the arguments. This will split at the first
38261  # space.
38262  complete="$RC"
38263  path="${complete%% *}"
38264  tmp="$complete EOL"
38265  arguments="${tmp#* }"
38266
38267  # Input might be given as Windows format, start by converting to
38268  # unix format.
38269  new_path="$path"
38270
38271  windows_path="$new_path"
38272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38273    unix_path=`$CYGPATH -u "$windows_path"`
38274    new_path="$unix_path"
38275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38277    new_path="$unix_path"
38278  fi
38279
38280
38281  # Now try to locate executable using which
38282  new_path=`$WHICH "$new_path" 2> /dev/null`
38283
38284  if test "x$new_path" = x; then
38285    # Oops. Which didn't find the executable.
38286    # The splitting of arguments from the executable at a space might have been incorrect,
38287    # since paths with space are more likely in Windows. Give it another try with the whole
38288    # argument.
38289    path="$complete"
38290    arguments="EOL"
38291    new_path="$path"
38292
38293  windows_path="$new_path"
38294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38295    unix_path=`$CYGPATH -u "$windows_path"`
38296    new_path="$unix_path"
38297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38299    new_path="$unix_path"
38300  fi
38301
38302
38303    new_path=`$WHICH "$new_path" 2> /dev/null`
38304    # bat and cmd files are not always considered executable in MSYS causing which
38305    # to not find them
38306    if test "x$new_path" = x \
38307        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38308        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38309      new_path="$path"
38310
38311  windows_path="$new_path"
38312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38313    unix_path=`$CYGPATH -u "$windows_path"`
38314    new_path="$unix_path"
38315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38317    new_path="$unix_path"
38318  fi
38319
38320    fi
38321
38322    if test "x$new_path" = x; then
38323      # It's still not found. Now this is an unrecoverable error.
38324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38325$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38326      has_space=`$ECHO "$complete" | $GREP " "`
38327      if test "x$has_space" != x; then
38328        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38329$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38330      fi
38331      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38332    fi
38333  fi
38334
38335  # Now new_path has a complete unix path to the binary
38336  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38337    # Keep paths in /bin as-is, but remove trailing .exe if any
38338    new_path="${new_path/%.exe/}"
38339    # Do not save /bin paths to all_fixpath_prefixes!
38340  else
38341    # Not in mixed or Windows style, start by that.
38342    new_path=`cmd //c echo $new_path`
38343
38344  input_path="$new_path"
38345  # Check if we need to convert this using DOS-style short mode. If the path
38346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38347  # take no chances and rewrite it.
38348  # Note: m4 eats our [], so we need to use [ and ] instead.
38349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38350  if test "x$has_forbidden_chars" != x; then
38351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38353  fi
38354
38355    # Output is in $new_path
38356
38357  windows_path="$new_path"
38358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38359    unix_path=`$CYGPATH -u "$windows_path"`
38360    new_path="$unix_path"
38361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38363    new_path="$unix_path"
38364  fi
38365
38366    # remove trailing .exe if any
38367    new_path="${new_path/%.exe/}"
38368
38369    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38370    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38371  fi
38372
38373    else
38374      # We're on a unix platform. Hooray! :)
38375      # First separate the path from the arguments. This will split at the first
38376      # space.
38377      complete="$RC"
38378      path="${complete%% *}"
38379      tmp="$complete EOL"
38380      arguments="${tmp#* }"
38381
38382      # Cannot rely on the command "which" here since it doesn't always work.
38383      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38384      if test -z "$is_absolute_path"; then
38385        # Path to executable is not absolute. Find it.
38386        IFS_save="$IFS"
38387        IFS=:
38388        for p in $PATH; do
38389          if test -f "$p/$path" && test -x "$p/$path"; then
38390            new_path="$p/$path"
38391            break
38392          fi
38393        done
38394        IFS="$IFS_save"
38395      else
38396        # This is an absolute path, we can use it without further modifications.
38397        new_path="$path"
38398      fi
38399
38400      if test "x$new_path" = x; then
38401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38402$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38403        has_space=`$ECHO "$complete" | $GREP " "`
38404        if test "x$has_space" != x; then
38405          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38406$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38407        fi
38408        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38409      fi
38410    fi
38411
38412    # Now join together the path and the arguments once again
38413    if test "x$arguments" != xEOL; then
38414      new_complete="$new_path ${arguments% *}"
38415    else
38416      new_complete="$new_path"
38417    fi
38418
38419    if test "x$complete" != "x$new_complete"; then
38420      RC="$new_complete"
38421      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38422$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38423    fi
38424  fi
38425
38426    # Extract the first word of "dumpbin", so it can be a program name with args.
38427set dummy dumpbin; ac_word=$2
38428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38429$as_echo_n "checking for $ac_word... " >&6; }
38430if ${ac_cv_prog_DUMPBIN+:} false; then :
38431  $as_echo_n "(cached) " >&6
38432else
38433  if test -n "$DUMPBIN"; then
38434  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38435else
38436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38437for as_dir in $PATH
38438do
38439  IFS=$as_save_IFS
38440  test -z "$as_dir" && as_dir=.
38441    for ac_exec_ext in '' $ac_executable_extensions; do
38442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38443    ac_cv_prog_DUMPBIN="dumpbin"
38444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38445    break 2
38446  fi
38447done
38448  done
38449IFS=$as_save_IFS
38450
38451fi
38452fi
38453DUMPBIN=$ac_cv_prog_DUMPBIN
38454if test -n "$DUMPBIN"; then
38455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38456$as_echo "$DUMPBIN" >&6; }
38457else
38458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38459$as_echo "no" >&6; }
38460fi
38461
38462
38463
38464  # Only process if variable expands to non-empty
38465
38466  if test "x$DUMPBIN" != x; then
38467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38468
38469  # First separate the path from the arguments. This will split at the first
38470  # space.
38471  complete="$DUMPBIN"
38472  path="${complete%% *}"
38473  tmp="$complete EOL"
38474  arguments="${tmp#* }"
38475
38476  # Input might be given as Windows format, start by converting to
38477  # unix format.
38478  new_path=`$CYGPATH -u "$path"`
38479
38480  # Now try to locate executable using which
38481  new_path=`$WHICH "$new_path" 2> /dev/null`
38482  # bat and cmd files are not always considered executable in cygwin causing which
38483  # to not find them
38484  if test "x$new_path" = x \
38485      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38486      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38487    new_path=`$CYGPATH -u "$path"`
38488  fi
38489  if test "x$new_path" = x; then
38490    # Oops. Which didn't find the executable.
38491    # The splitting of arguments from the executable at a space might have been incorrect,
38492    # since paths with space are more likely in Windows. Give it another try with the whole
38493    # argument.
38494    path="$complete"
38495    arguments="EOL"
38496    new_path=`$CYGPATH -u "$path"`
38497    new_path=`$WHICH "$new_path" 2> /dev/null`
38498    # bat and cmd files are not always considered executable in cygwin causing which
38499    # to not find them
38500    if test "x$new_path" = x \
38501        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38502        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38503      new_path=`$CYGPATH -u "$path"`
38504    fi
38505    if test "x$new_path" = x; then
38506      # It's still not found. Now this is an unrecoverable error.
38507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38508$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38509      has_space=`$ECHO "$complete" | $GREP " "`
38510      if test "x$has_space" != x; then
38511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38513      fi
38514      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38515    fi
38516  fi
38517
38518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38521  # "foo.exe" is OK but "foo" is an error.
38522  #
38523  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38524  # It is also a way to make sure we got the proper file name for the real test later on.
38525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38526  if test "x$test_shortpath" = x; then
38527    # Short path failed, file does not exist as specified.
38528    # Try adding .exe or .cmd
38529    if test -f "${new_path}.exe"; then
38530      input_to_shortpath="${new_path}.exe"
38531    elif test -f "${new_path}.cmd"; then
38532      input_to_shortpath="${new_path}.cmd"
38533    else
38534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38535$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38536      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38537$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38538      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38539    fi
38540  else
38541    input_to_shortpath="$new_path"
38542  fi
38543
38544  # Call helper function which possibly converts this using DOS-style short mode.
38545  # If so, the updated path is stored in $new_path.
38546  new_path="$input_to_shortpath"
38547
38548  input_path="$input_to_shortpath"
38549  # Check if we need to convert this using DOS-style short mode. If the path
38550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38551  # take no chances and rewrite it.
38552  # Note: m4 eats our [], so we need to use [ and ] instead.
38553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38554  if test "x$has_forbidden_chars" != x; then
38555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38559      # Going to short mode and back again did indeed matter. Since short mode is
38560      # case insensitive, let's make it lowercase to improve readability.
38561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38562      # Now convert it back to Unix-style (cygpath)
38563      input_path=`$CYGPATH -u "$shortmode_path"`
38564      new_path="$input_path"
38565    fi
38566  fi
38567
38568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38569  if test "x$test_cygdrive_prefix" = x; then
38570    # As a simple fix, exclude /usr/bin since it's not a real path.
38571    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38573      # a path prefixed by /cygdrive for fixpath to work.
38574      new_path="$CYGWIN_ROOT_PATH$input_path"
38575    fi
38576  fi
38577
38578  # remove trailing .exe if any
38579  new_path="${new_path/%.exe/}"
38580
38581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38582
38583  # First separate the path from the arguments. This will split at the first
38584  # space.
38585  complete="$DUMPBIN"
38586  path="${complete%% *}"
38587  tmp="$complete EOL"
38588  arguments="${tmp#* }"
38589
38590  # Input might be given as Windows format, start by converting to
38591  # unix format.
38592  new_path="$path"
38593
38594  windows_path="$new_path"
38595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38596    unix_path=`$CYGPATH -u "$windows_path"`
38597    new_path="$unix_path"
38598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38600    new_path="$unix_path"
38601  fi
38602
38603
38604  # Now try to locate executable using which
38605  new_path=`$WHICH "$new_path" 2> /dev/null`
38606
38607  if test "x$new_path" = x; then
38608    # Oops. Which didn't find the executable.
38609    # The splitting of arguments from the executable at a space might have been incorrect,
38610    # since paths with space are more likely in Windows. Give it another try with the whole
38611    # argument.
38612    path="$complete"
38613    arguments="EOL"
38614    new_path="$path"
38615
38616  windows_path="$new_path"
38617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38618    unix_path=`$CYGPATH -u "$windows_path"`
38619    new_path="$unix_path"
38620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38622    new_path="$unix_path"
38623  fi
38624
38625
38626    new_path=`$WHICH "$new_path" 2> /dev/null`
38627    # bat and cmd files are not always considered executable in MSYS causing which
38628    # to not find them
38629    if test "x$new_path" = x \
38630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38632      new_path="$path"
38633
38634  windows_path="$new_path"
38635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38636    unix_path=`$CYGPATH -u "$windows_path"`
38637    new_path="$unix_path"
38638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38640    new_path="$unix_path"
38641  fi
38642
38643    fi
38644
38645    if test "x$new_path" = x; then
38646      # It's still not found. Now this is an unrecoverable error.
38647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38648$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38649      has_space=`$ECHO "$complete" | $GREP " "`
38650      if test "x$has_space" != x; then
38651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38653      fi
38654      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38655    fi
38656  fi
38657
38658  # Now new_path has a complete unix path to the binary
38659  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38660    # Keep paths in /bin as-is, but remove trailing .exe if any
38661    new_path="${new_path/%.exe/}"
38662    # Do not save /bin paths to all_fixpath_prefixes!
38663  else
38664    # Not in mixed or Windows style, start by that.
38665    new_path=`cmd //c echo $new_path`
38666
38667  input_path="$new_path"
38668  # Check if we need to convert this using DOS-style short mode. If the path
38669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38670  # take no chances and rewrite it.
38671  # Note: m4 eats our [], so we need to use [ and ] instead.
38672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38673  if test "x$has_forbidden_chars" != x; then
38674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38676  fi
38677
38678    # Output is in $new_path
38679
38680  windows_path="$new_path"
38681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38682    unix_path=`$CYGPATH -u "$windows_path"`
38683    new_path="$unix_path"
38684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38686    new_path="$unix_path"
38687  fi
38688
38689    # remove trailing .exe if any
38690    new_path="${new_path/%.exe/}"
38691
38692    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38693    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38694  fi
38695
38696    else
38697      # We're on a unix platform. Hooray! :)
38698      # First separate the path from the arguments. This will split at the first
38699      # space.
38700      complete="$DUMPBIN"
38701      path="${complete%% *}"
38702      tmp="$complete EOL"
38703      arguments="${tmp#* }"
38704
38705      # Cannot rely on the command "which" here since it doesn't always work.
38706      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38707      if test -z "$is_absolute_path"; then
38708        # Path to executable is not absolute. Find it.
38709        IFS_save="$IFS"
38710        IFS=:
38711        for p in $PATH; do
38712          if test -f "$p/$path" && test -x "$p/$path"; then
38713            new_path="$p/$path"
38714            break
38715          fi
38716        done
38717        IFS="$IFS_save"
38718      else
38719        # This is an absolute path, we can use it without further modifications.
38720        new_path="$path"
38721      fi
38722
38723      if test "x$new_path" = x; then
38724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38725$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38726        has_space=`$ECHO "$complete" | $GREP " "`
38727        if test "x$has_space" != x; then
38728          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38729$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38730        fi
38731        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38732      fi
38733    fi
38734
38735    # Now join together the path and the arguments once again
38736    if test "x$arguments" != xEOL; then
38737      new_complete="$new_path ${arguments% *}"
38738    else
38739      new_complete="$new_path"
38740    fi
38741
38742    if test "x$complete" != "x$new_complete"; then
38743      DUMPBIN="$new_complete"
38744      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
38745$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
38746    fi
38747  fi
38748
38749    # We need to check for 'msbuild.exe' because at the place where we expect to
38750    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
38751    # won't find the 'msbuild.exe' executable in that case (and the
38752    # 'ac_executable_extensions' is unusable due to performance reasons).
38753    # Notice that we intentionally don't fix up the path to MSBUILD because we
38754    # will call it in a DOS shell during freetype detection on Windows (see
38755    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
38756    # Extract the first word of "msbuild.exe", so it can be a program name with args.
38757set dummy msbuild.exe; ac_word=$2
38758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38759$as_echo_n "checking for $ac_word... " >&6; }
38760if ${ac_cv_prog_MSBUILD+:} false; then :
38761  $as_echo_n "(cached) " >&6
38762else
38763  if test -n "$MSBUILD"; then
38764  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
38765else
38766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38767for as_dir in $PATH
38768do
38769  IFS=$as_save_IFS
38770  test -z "$as_dir" && as_dir=.
38771    for ac_exec_ext in '' $ac_executable_extensions; do
38772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38773    ac_cv_prog_MSBUILD="msbuild.exe"
38774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38775    break 2
38776  fi
38777done
38778  done
38779IFS=$as_save_IFS
38780
38781fi
38782fi
38783MSBUILD=$ac_cv_prog_MSBUILD
38784if test -n "$MSBUILD"; then
38785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
38786$as_echo "$MSBUILD" >&6; }
38787else
38788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38789$as_echo "no" >&6; }
38790fi
38791
38792
38793  fi
38794
38795  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
38796
38797
38798  # Publish this variable in the help.
38799
38800
38801  if [ -z "${STRIP+x}" ]; then
38802    # The variable is not set by user, try to locate tool using the code snippet
38803    for ac_prog in strip
38804do
38805  # Extract the first word of "$ac_prog", so it can be a program name with args.
38806set dummy $ac_prog; ac_word=$2
38807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38808$as_echo_n "checking for $ac_word... " >&6; }
38809if ${ac_cv_path_STRIP+:} false; then :
38810  $as_echo_n "(cached) " >&6
38811else
38812  case $STRIP in
38813  [\\/]* | ?:[\\/]*)
38814  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38815  ;;
38816  *)
38817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38818for as_dir in $PATH
38819do
38820  IFS=$as_save_IFS
38821  test -z "$as_dir" && as_dir=.
38822    for ac_exec_ext in '' $ac_executable_extensions; do
38823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38824    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38826    break 2
38827  fi
38828done
38829  done
38830IFS=$as_save_IFS
38831
38832  ;;
38833esac
38834fi
38835STRIP=$ac_cv_path_STRIP
38836if test -n "$STRIP"; then
38837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38838$as_echo "$STRIP" >&6; }
38839else
38840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38841$as_echo "no" >&6; }
38842fi
38843
38844
38845  test -n "$STRIP" && break
38846done
38847
38848  else
38849    # The variable is set, but is it from the command line or the environment?
38850
38851    # Try to remove the string !STRIP! from our list.
38852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38854      # If it failed, the variable was not from the command line. Ignore it,
38855      # but warn the user (except for BASH, which is always set by the calling BASH).
38856      if test "xSTRIP" != xBASH; then
38857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38858$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38859      fi
38860      # Try to locate tool using the code snippet
38861      for ac_prog in strip
38862do
38863  # Extract the first word of "$ac_prog", so it can be a program name with args.
38864set dummy $ac_prog; ac_word=$2
38865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38866$as_echo_n "checking for $ac_word... " >&6; }
38867if ${ac_cv_path_STRIP+:} false; then :
38868  $as_echo_n "(cached) " >&6
38869else
38870  case $STRIP in
38871  [\\/]* | ?:[\\/]*)
38872  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38873  ;;
38874  *)
38875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38876for as_dir in $PATH
38877do
38878  IFS=$as_save_IFS
38879  test -z "$as_dir" && as_dir=.
38880    for ac_exec_ext in '' $ac_executable_extensions; do
38881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38882    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38884    break 2
38885  fi
38886done
38887  done
38888IFS=$as_save_IFS
38889
38890  ;;
38891esac
38892fi
38893STRIP=$ac_cv_path_STRIP
38894if test -n "$STRIP"; then
38895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38896$as_echo "$STRIP" >&6; }
38897else
38898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38899$as_echo "no" >&6; }
38900fi
38901
38902
38903  test -n "$STRIP" && break
38904done
38905
38906    else
38907      # If it succeeded, then it was overridden by the user. We will use it
38908      # for the tool.
38909
38910      # First remove it from the list of overridden variables, so we can test
38911      # for unknown variables in the end.
38912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38913
38914      # Check if we try to supply an empty value
38915      if test "x$STRIP" = x; then
38916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
38917$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
38918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38919$as_echo_n "checking for STRIP... " >&6; }
38920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38921$as_echo "disabled" >&6; }
38922      else
38923        # Check if the provided tool contains a complete path.
38924        tool_specified="$STRIP"
38925        tool_basename="${tool_specified##*/}"
38926        if test "x$tool_basename" = "x$tool_specified"; then
38927          # A command without a complete path is provided, search $PATH.
38928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
38929$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
38930          # Extract the first word of "$tool_basename", so it can be a program name with args.
38931set dummy $tool_basename; ac_word=$2
38932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38933$as_echo_n "checking for $ac_word... " >&6; }
38934if ${ac_cv_path_STRIP+:} false; then :
38935  $as_echo_n "(cached) " >&6
38936else
38937  case $STRIP in
38938  [\\/]* | ?:[\\/]*)
38939  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
38940  ;;
38941  *)
38942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38943for as_dir in $PATH
38944do
38945  IFS=$as_save_IFS
38946  test -z "$as_dir" && as_dir=.
38947    for ac_exec_ext in '' $ac_executable_extensions; do
38948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38949    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
38950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38951    break 2
38952  fi
38953done
38954  done
38955IFS=$as_save_IFS
38956
38957  ;;
38958esac
38959fi
38960STRIP=$ac_cv_path_STRIP
38961if test -n "$STRIP"; then
38962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38963$as_echo "$STRIP" >&6; }
38964else
38965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38966$as_echo "no" >&6; }
38967fi
38968
38969
38970          if test "x$STRIP" = x; then
38971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38972          fi
38973        else
38974          # Otherwise we believe it is a complete path. Use it as it is.
38975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
38976$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
38977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
38978$as_echo_n "checking for STRIP... " >&6; }
38979          if test ! -x "$tool_specified"; then
38980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38981$as_echo "not found" >&6; }
38982            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
38983          fi
38984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38985$as_echo "$tool_specified" >&6; }
38986        fi
38987      fi
38988    fi
38989
38990  fi
38991
38992
38993
38994  # Only process if variable expands to non-empty
38995
38996  if test "x$STRIP" != x; then
38997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38998
38999  # First separate the path from the arguments. This will split at the first
39000  # space.
39001  complete="$STRIP"
39002  path="${complete%% *}"
39003  tmp="$complete EOL"
39004  arguments="${tmp#* }"
39005
39006  # Input might be given as Windows format, start by converting to
39007  # unix format.
39008  new_path=`$CYGPATH -u "$path"`
39009
39010  # Now try to locate executable using which
39011  new_path=`$WHICH "$new_path" 2> /dev/null`
39012  # bat and cmd files are not always considered executable in cygwin causing which
39013  # to not find them
39014  if test "x$new_path" = x \
39015      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39016      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39017    new_path=`$CYGPATH -u "$path"`
39018  fi
39019  if test "x$new_path" = x; then
39020    # Oops. Which didn't find the executable.
39021    # The splitting of arguments from the executable at a space might have been incorrect,
39022    # since paths with space are more likely in Windows. Give it another try with the whole
39023    # argument.
39024    path="$complete"
39025    arguments="EOL"
39026    new_path=`$CYGPATH -u "$path"`
39027    new_path=`$WHICH "$new_path" 2> /dev/null`
39028    # bat and cmd files are not always considered executable in cygwin causing which
39029    # to not find them
39030    if test "x$new_path" = x \
39031        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39032        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39033      new_path=`$CYGPATH -u "$path"`
39034    fi
39035    if test "x$new_path" = x; then
39036      # It's still not found. Now this is an unrecoverable error.
39037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39038$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39039      has_space=`$ECHO "$complete" | $GREP " "`
39040      if test "x$has_space" != x; then
39041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39043      fi
39044      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39045    fi
39046  fi
39047
39048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39051  # "foo.exe" is OK but "foo" is an error.
39052  #
39053  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39054  # It is also a way to make sure we got the proper file name for the real test later on.
39055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39056  if test "x$test_shortpath" = x; then
39057    # Short path failed, file does not exist as specified.
39058    # Try adding .exe or .cmd
39059    if test -f "${new_path}.exe"; then
39060      input_to_shortpath="${new_path}.exe"
39061    elif test -f "${new_path}.cmd"; then
39062      input_to_shortpath="${new_path}.cmd"
39063    else
39064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39065$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39066      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39067$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39068      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39069    fi
39070  else
39071    input_to_shortpath="$new_path"
39072  fi
39073
39074  # Call helper function which possibly converts this using DOS-style short mode.
39075  # If so, the updated path is stored in $new_path.
39076  new_path="$input_to_shortpath"
39077
39078  input_path="$input_to_shortpath"
39079  # Check if we need to convert this using DOS-style short mode. If the path
39080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39081  # take no chances and rewrite it.
39082  # Note: m4 eats our [], so we need to use [ and ] instead.
39083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39084  if test "x$has_forbidden_chars" != x; then
39085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39089      # Going to short mode and back again did indeed matter. Since short mode is
39090      # case insensitive, let's make it lowercase to improve readability.
39091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39092      # Now convert it back to Unix-style (cygpath)
39093      input_path=`$CYGPATH -u "$shortmode_path"`
39094      new_path="$input_path"
39095    fi
39096  fi
39097
39098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39099  if test "x$test_cygdrive_prefix" = x; then
39100    # As a simple fix, exclude /usr/bin since it's not a real path.
39101    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39103      # a path prefixed by /cygdrive for fixpath to work.
39104      new_path="$CYGWIN_ROOT_PATH$input_path"
39105    fi
39106  fi
39107
39108  # remove trailing .exe if any
39109  new_path="${new_path/%.exe/}"
39110
39111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39112
39113  # First separate the path from the arguments. This will split at the first
39114  # space.
39115  complete="$STRIP"
39116  path="${complete%% *}"
39117  tmp="$complete EOL"
39118  arguments="${tmp#* }"
39119
39120  # Input might be given as Windows format, start by converting to
39121  # unix format.
39122  new_path="$path"
39123
39124  windows_path="$new_path"
39125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39126    unix_path=`$CYGPATH -u "$windows_path"`
39127    new_path="$unix_path"
39128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39130    new_path="$unix_path"
39131  fi
39132
39133
39134  # Now try to locate executable using which
39135  new_path=`$WHICH "$new_path" 2> /dev/null`
39136
39137  if test "x$new_path" = x; then
39138    # Oops. Which didn't find the executable.
39139    # The splitting of arguments from the executable at a space might have been incorrect,
39140    # since paths with space are more likely in Windows. Give it another try with the whole
39141    # argument.
39142    path="$complete"
39143    arguments="EOL"
39144    new_path="$path"
39145
39146  windows_path="$new_path"
39147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39148    unix_path=`$CYGPATH -u "$windows_path"`
39149    new_path="$unix_path"
39150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39152    new_path="$unix_path"
39153  fi
39154
39155
39156    new_path=`$WHICH "$new_path" 2> /dev/null`
39157    # bat and cmd files are not always considered executable in MSYS causing which
39158    # to not find them
39159    if test "x$new_path" = x \
39160        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39161        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39162      new_path="$path"
39163
39164  windows_path="$new_path"
39165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39166    unix_path=`$CYGPATH -u "$windows_path"`
39167    new_path="$unix_path"
39168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39170    new_path="$unix_path"
39171  fi
39172
39173    fi
39174
39175    if test "x$new_path" = x; then
39176      # It's still not found. Now this is an unrecoverable error.
39177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39178$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39179      has_space=`$ECHO "$complete" | $GREP " "`
39180      if test "x$has_space" != x; then
39181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39183      fi
39184      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39185    fi
39186  fi
39187
39188  # Now new_path has a complete unix path to the binary
39189  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39190    # Keep paths in /bin as-is, but remove trailing .exe if any
39191    new_path="${new_path/%.exe/}"
39192    # Do not save /bin paths to all_fixpath_prefixes!
39193  else
39194    # Not in mixed or Windows style, start by that.
39195    new_path=`cmd //c echo $new_path`
39196
39197  input_path="$new_path"
39198  # Check if we need to convert this using DOS-style short mode. If the path
39199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39200  # take no chances and rewrite it.
39201  # Note: m4 eats our [], so we need to use [ and ] instead.
39202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39203  if test "x$has_forbidden_chars" != x; then
39204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39206  fi
39207
39208    # Output is in $new_path
39209
39210  windows_path="$new_path"
39211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39212    unix_path=`$CYGPATH -u "$windows_path"`
39213    new_path="$unix_path"
39214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39216    new_path="$unix_path"
39217  fi
39218
39219    # remove trailing .exe if any
39220    new_path="${new_path/%.exe/}"
39221
39222    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39223    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39224  fi
39225
39226    else
39227      # We're on a unix platform. Hooray! :)
39228      # First separate the path from the arguments. This will split at the first
39229      # space.
39230      complete="$STRIP"
39231      path="${complete%% *}"
39232      tmp="$complete EOL"
39233      arguments="${tmp#* }"
39234
39235      # Cannot rely on the command "which" here since it doesn't always work.
39236      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39237      if test -z "$is_absolute_path"; then
39238        # Path to executable is not absolute. Find it.
39239        IFS_save="$IFS"
39240        IFS=:
39241        for p in $PATH; do
39242          if test -f "$p/$path" && test -x "$p/$path"; then
39243            new_path="$p/$path"
39244            break
39245          fi
39246        done
39247        IFS="$IFS_save"
39248      else
39249        # This is an absolute path, we can use it without further modifications.
39250        new_path="$path"
39251      fi
39252
39253      if test "x$new_path" = x; then
39254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39255$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39256        has_space=`$ECHO "$complete" | $GREP " "`
39257        if test "x$has_space" != x; then
39258          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39259$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39260        fi
39261        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39262      fi
39263    fi
39264
39265    # Now join together the path and the arguments once again
39266    if test "x$arguments" != xEOL; then
39267      new_complete="$new_path ${arguments% *}"
39268    else
39269      new_complete="$new_path"
39270    fi
39271
39272    if test "x$complete" != "x$new_complete"; then
39273      STRIP="$new_complete"
39274      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39275$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39276    fi
39277  fi
39278
39279
39280
39281  # Publish this variable in the help.
39282
39283
39284  if [ -z "${NM+x}" ]; then
39285    # The variable is not set by user, try to locate tool using the code snippet
39286    for ac_prog in nm
39287do
39288  # Extract the first word of "$ac_prog", so it can be a program name with args.
39289set dummy $ac_prog; ac_word=$2
39290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39291$as_echo_n "checking for $ac_word... " >&6; }
39292if ${ac_cv_path_NM+:} false; then :
39293  $as_echo_n "(cached) " >&6
39294else
39295  case $NM in
39296  [\\/]* | ?:[\\/]*)
39297  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39298  ;;
39299  *)
39300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39301for as_dir in $PATH
39302do
39303  IFS=$as_save_IFS
39304  test -z "$as_dir" && as_dir=.
39305    for ac_exec_ext in '' $ac_executable_extensions; do
39306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39307    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39309    break 2
39310  fi
39311done
39312  done
39313IFS=$as_save_IFS
39314
39315  ;;
39316esac
39317fi
39318NM=$ac_cv_path_NM
39319if test -n "$NM"; then
39320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39321$as_echo "$NM" >&6; }
39322else
39323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39324$as_echo "no" >&6; }
39325fi
39326
39327
39328  test -n "$NM" && break
39329done
39330
39331  else
39332    # The variable is set, but is it from the command line or the environment?
39333
39334    # Try to remove the string !NM! from our list.
39335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39337      # If it failed, the variable was not from the command line. Ignore it,
39338      # but warn the user (except for BASH, which is always set by the calling BASH).
39339      if test "xNM" != xBASH; then
39340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39341$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39342      fi
39343      # Try to locate tool using the code snippet
39344      for ac_prog in nm
39345do
39346  # Extract the first word of "$ac_prog", so it can be a program name with args.
39347set dummy $ac_prog; ac_word=$2
39348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39349$as_echo_n "checking for $ac_word... " >&6; }
39350if ${ac_cv_path_NM+:} false; then :
39351  $as_echo_n "(cached) " >&6
39352else
39353  case $NM in
39354  [\\/]* | ?:[\\/]*)
39355  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39356  ;;
39357  *)
39358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39359for as_dir in $PATH
39360do
39361  IFS=$as_save_IFS
39362  test -z "$as_dir" && as_dir=.
39363    for ac_exec_ext in '' $ac_executable_extensions; do
39364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39365    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39367    break 2
39368  fi
39369done
39370  done
39371IFS=$as_save_IFS
39372
39373  ;;
39374esac
39375fi
39376NM=$ac_cv_path_NM
39377if test -n "$NM"; then
39378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39379$as_echo "$NM" >&6; }
39380else
39381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39382$as_echo "no" >&6; }
39383fi
39384
39385
39386  test -n "$NM" && break
39387done
39388
39389    else
39390      # If it succeeded, then it was overridden by the user. We will use it
39391      # for the tool.
39392
39393      # First remove it from the list of overridden variables, so we can test
39394      # for unknown variables in the end.
39395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39396
39397      # Check if we try to supply an empty value
39398      if test "x$NM" = x; then
39399        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39400$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39401        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39402$as_echo_n "checking for NM... " >&6; }
39403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39404$as_echo "disabled" >&6; }
39405      else
39406        # Check if the provided tool contains a complete path.
39407        tool_specified="$NM"
39408        tool_basename="${tool_specified##*/}"
39409        if test "x$tool_basename" = "x$tool_specified"; then
39410          # A command without a complete path is provided, search $PATH.
39411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39412$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39413          # Extract the first word of "$tool_basename", so it can be a program name with args.
39414set dummy $tool_basename; ac_word=$2
39415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39416$as_echo_n "checking for $ac_word... " >&6; }
39417if ${ac_cv_path_NM+:} false; then :
39418  $as_echo_n "(cached) " >&6
39419else
39420  case $NM in
39421  [\\/]* | ?:[\\/]*)
39422  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39423  ;;
39424  *)
39425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39426for as_dir in $PATH
39427do
39428  IFS=$as_save_IFS
39429  test -z "$as_dir" && as_dir=.
39430    for ac_exec_ext in '' $ac_executable_extensions; do
39431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39432    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39434    break 2
39435  fi
39436done
39437  done
39438IFS=$as_save_IFS
39439
39440  ;;
39441esac
39442fi
39443NM=$ac_cv_path_NM
39444if test -n "$NM"; then
39445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39446$as_echo "$NM" >&6; }
39447else
39448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39449$as_echo "no" >&6; }
39450fi
39451
39452
39453          if test "x$NM" = x; then
39454            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39455          fi
39456        else
39457          # Otherwise we believe it is a complete path. Use it as it is.
39458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39459$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39460          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39461$as_echo_n "checking for NM... " >&6; }
39462          if test ! -x "$tool_specified"; then
39463            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39464$as_echo "not found" >&6; }
39465            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39466          fi
39467          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39468$as_echo "$tool_specified" >&6; }
39469        fi
39470      fi
39471    fi
39472
39473  fi
39474
39475
39476
39477  # Only process if variable expands to non-empty
39478
39479  if test "x$NM" != x; then
39480    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39481
39482  # First separate the path from the arguments. This will split at the first
39483  # space.
39484  complete="$NM"
39485  path="${complete%% *}"
39486  tmp="$complete EOL"
39487  arguments="${tmp#* }"
39488
39489  # Input might be given as Windows format, start by converting to
39490  # unix format.
39491  new_path=`$CYGPATH -u "$path"`
39492
39493  # Now try to locate executable using which
39494  new_path=`$WHICH "$new_path" 2> /dev/null`
39495  # bat and cmd files are not always considered executable in cygwin causing which
39496  # to not find them
39497  if test "x$new_path" = x \
39498      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39499      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39500    new_path=`$CYGPATH -u "$path"`
39501  fi
39502  if test "x$new_path" = x; then
39503    # Oops. Which didn't find the executable.
39504    # The splitting of arguments from the executable at a space might have been incorrect,
39505    # since paths with space are more likely in Windows. Give it another try with the whole
39506    # argument.
39507    path="$complete"
39508    arguments="EOL"
39509    new_path=`$CYGPATH -u "$path"`
39510    new_path=`$WHICH "$new_path" 2> /dev/null`
39511    # bat and cmd files are not always considered executable in cygwin causing which
39512    # to not find them
39513    if test "x$new_path" = x \
39514        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39515        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39516      new_path=`$CYGPATH -u "$path"`
39517    fi
39518    if test "x$new_path" = x; then
39519      # It's still not found. Now this is an unrecoverable error.
39520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39521$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39522      has_space=`$ECHO "$complete" | $GREP " "`
39523      if test "x$has_space" != x; then
39524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39526      fi
39527      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39528    fi
39529  fi
39530
39531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39534  # "foo.exe" is OK but "foo" is an error.
39535  #
39536  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39537  # It is also a way to make sure we got the proper file name for the real test later on.
39538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39539  if test "x$test_shortpath" = x; then
39540    # Short path failed, file does not exist as specified.
39541    # Try adding .exe or .cmd
39542    if test -f "${new_path}.exe"; then
39543      input_to_shortpath="${new_path}.exe"
39544    elif test -f "${new_path}.cmd"; then
39545      input_to_shortpath="${new_path}.cmd"
39546    else
39547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39548$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39549      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39550$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39551      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39552    fi
39553  else
39554    input_to_shortpath="$new_path"
39555  fi
39556
39557  # Call helper function which possibly converts this using DOS-style short mode.
39558  # If so, the updated path is stored in $new_path.
39559  new_path="$input_to_shortpath"
39560
39561  input_path="$input_to_shortpath"
39562  # Check if we need to convert this using DOS-style short mode. If the path
39563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39564  # take no chances and rewrite it.
39565  # Note: m4 eats our [], so we need to use [ and ] instead.
39566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39567  if test "x$has_forbidden_chars" != x; then
39568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39572      # Going to short mode and back again did indeed matter. Since short mode is
39573      # case insensitive, let's make it lowercase to improve readability.
39574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39575      # Now convert it back to Unix-style (cygpath)
39576      input_path=`$CYGPATH -u "$shortmode_path"`
39577      new_path="$input_path"
39578    fi
39579  fi
39580
39581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39582  if test "x$test_cygdrive_prefix" = x; then
39583    # As a simple fix, exclude /usr/bin since it's not a real path.
39584    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39586      # a path prefixed by /cygdrive for fixpath to work.
39587      new_path="$CYGWIN_ROOT_PATH$input_path"
39588    fi
39589  fi
39590
39591  # remove trailing .exe if any
39592  new_path="${new_path/%.exe/}"
39593
39594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39595
39596  # First separate the path from the arguments. This will split at the first
39597  # space.
39598  complete="$NM"
39599  path="${complete%% *}"
39600  tmp="$complete EOL"
39601  arguments="${tmp#* }"
39602
39603  # Input might be given as Windows format, start by converting to
39604  # unix format.
39605  new_path="$path"
39606
39607  windows_path="$new_path"
39608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39609    unix_path=`$CYGPATH -u "$windows_path"`
39610    new_path="$unix_path"
39611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39613    new_path="$unix_path"
39614  fi
39615
39616
39617  # Now try to locate executable using which
39618  new_path=`$WHICH "$new_path" 2> /dev/null`
39619
39620  if test "x$new_path" = x; then
39621    # Oops. Which didn't find the executable.
39622    # The splitting of arguments from the executable at a space might have been incorrect,
39623    # since paths with space are more likely in Windows. Give it another try with the whole
39624    # argument.
39625    path="$complete"
39626    arguments="EOL"
39627    new_path="$path"
39628
39629  windows_path="$new_path"
39630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39631    unix_path=`$CYGPATH -u "$windows_path"`
39632    new_path="$unix_path"
39633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39635    new_path="$unix_path"
39636  fi
39637
39638
39639    new_path=`$WHICH "$new_path" 2> /dev/null`
39640    # bat and cmd files are not always considered executable in MSYS causing which
39641    # to not find them
39642    if test "x$new_path" = x \
39643        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39644        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39645      new_path="$path"
39646
39647  windows_path="$new_path"
39648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39649    unix_path=`$CYGPATH -u "$windows_path"`
39650    new_path="$unix_path"
39651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39653    new_path="$unix_path"
39654  fi
39655
39656    fi
39657
39658    if test "x$new_path" = x; then
39659      # It's still not found. Now this is an unrecoverable error.
39660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39661$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39662      has_space=`$ECHO "$complete" | $GREP " "`
39663      if test "x$has_space" != x; then
39664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39666      fi
39667      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39668    fi
39669  fi
39670
39671  # Now new_path has a complete unix path to the binary
39672  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39673    # Keep paths in /bin as-is, but remove trailing .exe if any
39674    new_path="${new_path/%.exe/}"
39675    # Do not save /bin paths to all_fixpath_prefixes!
39676  else
39677    # Not in mixed or Windows style, start by that.
39678    new_path=`cmd //c echo $new_path`
39679
39680  input_path="$new_path"
39681  # Check if we need to convert this using DOS-style short mode. If the path
39682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39683  # take no chances and rewrite it.
39684  # Note: m4 eats our [], so we need to use [ and ] instead.
39685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39686  if test "x$has_forbidden_chars" != x; then
39687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39688    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39689  fi
39690
39691    # Output is in $new_path
39692
39693  windows_path="$new_path"
39694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39695    unix_path=`$CYGPATH -u "$windows_path"`
39696    new_path="$unix_path"
39697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39699    new_path="$unix_path"
39700  fi
39701
39702    # remove trailing .exe if any
39703    new_path="${new_path/%.exe/}"
39704
39705    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39706    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39707  fi
39708
39709    else
39710      # We're on a unix platform. Hooray! :)
39711      # First separate the path from the arguments. This will split at the first
39712      # space.
39713      complete="$NM"
39714      path="${complete%% *}"
39715      tmp="$complete EOL"
39716      arguments="${tmp#* }"
39717
39718      # Cannot rely on the command "which" here since it doesn't always work.
39719      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39720      if test -z "$is_absolute_path"; then
39721        # Path to executable is not absolute. Find it.
39722        IFS_save="$IFS"
39723        IFS=:
39724        for p in $PATH; do
39725          if test -f "$p/$path" && test -x "$p/$path"; then
39726            new_path="$p/$path"
39727            break
39728          fi
39729        done
39730        IFS="$IFS_save"
39731      else
39732        # This is an absolute path, we can use it without further modifications.
39733        new_path="$path"
39734      fi
39735
39736      if test "x$new_path" = x; then
39737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39738$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39739        has_space=`$ECHO "$complete" | $GREP " "`
39740        if test "x$has_space" != x; then
39741          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39742$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39743        fi
39744        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39745      fi
39746    fi
39747
39748    # Now join together the path and the arguments once again
39749    if test "x$arguments" != xEOL; then
39750      new_complete="$new_path ${arguments% *}"
39751    else
39752      new_complete="$new_path"
39753    fi
39754
39755    if test "x$complete" != "x$new_complete"; then
39756      NM="$new_complete"
39757      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
39758$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
39759    fi
39760  fi
39761
39762
39763
39764  # Publish this variable in the help.
39765
39766
39767  if [ -z "${GNM+x}" ]; then
39768    # The variable is not set by user, try to locate tool using the code snippet
39769    for ac_prog in gnm
39770do
39771  # Extract the first word of "$ac_prog", so it can be a program name with args.
39772set dummy $ac_prog; ac_word=$2
39773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39774$as_echo_n "checking for $ac_word... " >&6; }
39775if ${ac_cv_path_GNM+:} false; then :
39776  $as_echo_n "(cached) " >&6
39777else
39778  case $GNM in
39779  [\\/]* | ?:[\\/]*)
39780  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39781  ;;
39782  *)
39783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39784for as_dir in $PATH
39785do
39786  IFS=$as_save_IFS
39787  test -z "$as_dir" && as_dir=.
39788    for ac_exec_ext in '' $ac_executable_extensions; do
39789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39790    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39792    break 2
39793  fi
39794done
39795  done
39796IFS=$as_save_IFS
39797
39798  ;;
39799esac
39800fi
39801GNM=$ac_cv_path_GNM
39802if test -n "$GNM"; then
39803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39804$as_echo "$GNM" >&6; }
39805else
39806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39807$as_echo "no" >&6; }
39808fi
39809
39810
39811  test -n "$GNM" && break
39812done
39813
39814  else
39815    # The variable is set, but is it from the command line or the environment?
39816
39817    # Try to remove the string !GNM! from our list.
39818    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
39819    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39820      # If it failed, the variable was not from the command line. Ignore it,
39821      # but warn the user (except for BASH, which is always set by the calling BASH).
39822      if test "xGNM" != xBASH; then
39823        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
39824$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
39825      fi
39826      # Try to locate tool using the code snippet
39827      for ac_prog in gnm
39828do
39829  # Extract the first word of "$ac_prog", so it can be a program name with args.
39830set dummy $ac_prog; ac_word=$2
39831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39832$as_echo_n "checking for $ac_word... " >&6; }
39833if ${ac_cv_path_GNM+:} false; then :
39834  $as_echo_n "(cached) " >&6
39835else
39836  case $GNM in
39837  [\\/]* | ?:[\\/]*)
39838  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39839  ;;
39840  *)
39841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39842for as_dir in $PATH
39843do
39844  IFS=$as_save_IFS
39845  test -z "$as_dir" && as_dir=.
39846    for ac_exec_ext in '' $ac_executable_extensions; do
39847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39848    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39850    break 2
39851  fi
39852done
39853  done
39854IFS=$as_save_IFS
39855
39856  ;;
39857esac
39858fi
39859GNM=$ac_cv_path_GNM
39860if test -n "$GNM"; then
39861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39862$as_echo "$GNM" >&6; }
39863else
39864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39865$as_echo "no" >&6; }
39866fi
39867
39868
39869  test -n "$GNM" && break
39870done
39871
39872    else
39873      # If it succeeded, then it was overridden by the user. We will use it
39874      # for the tool.
39875
39876      # First remove it from the list of overridden variables, so we can test
39877      # for unknown variables in the end.
39878      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39879
39880      # Check if we try to supply an empty value
39881      if test "x$GNM" = x; then
39882        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
39883$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
39884        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39885$as_echo_n "checking for GNM... " >&6; }
39886        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39887$as_echo "disabled" >&6; }
39888      else
39889        # Check if the provided tool contains a complete path.
39890        tool_specified="$GNM"
39891        tool_basename="${tool_specified##*/}"
39892        if test "x$tool_basename" = "x$tool_specified"; then
39893          # A command without a complete path is provided, search $PATH.
39894          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
39895$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
39896          # Extract the first word of "$tool_basename", so it can be a program name with args.
39897set dummy $tool_basename; ac_word=$2
39898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39899$as_echo_n "checking for $ac_word... " >&6; }
39900if ${ac_cv_path_GNM+:} false; then :
39901  $as_echo_n "(cached) " >&6
39902else
39903  case $GNM in
39904  [\\/]* | ?:[\\/]*)
39905  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
39906  ;;
39907  *)
39908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39909for as_dir in $PATH
39910do
39911  IFS=$as_save_IFS
39912  test -z "$as_dir" && as_dir=.
39913    for ac_exec_ext in '' $ac_executable_extensions; do
39914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39915    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
39916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39917    break 2
39918  fi
39919done
39920  done
39921IFS=$as_save_IFS
39922
39923  ;;
39924esac
39925fi
39926GNM=$ac_cv_path_GNM
39927if test -n "$GNM"; then
39928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
39929$as_echo "$GNM" >&6; }
39930else
39931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39932$as_echo "no" >&6; }
39933fi
39934
39935
39936          if test "x$GNM" = x; then
39937            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39938          fi
39939        else
39940          # Otherwise we believe it is a complete path. Use it as it is.
39941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
39942$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
39943          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
39944$as_echo_n "checking for GNM... " >&6; }
39945          if test ! -x "$tool_specified"; then
39946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39947$as_echo "not found" >&6; }
39948            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
39949          fi
39950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39951$as_echo "$tool_specified" >&6; }
39952        fi
39953      fi
39954    fi
39955
39956  fi
39957
39958
39959
39960  # Only process if variable expands to non-empty
39961
39962  if test "x$GNM" != x; then
39963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39964
39965  # First separate the path from the arguments. This will split at the first
39966  # space.
39967  complete="$GNM"
39968  path="${complete%% *}"
39969  tmp="$complete EOL"
39970  arguments="${tmp#* }"
39971
39972  # Input might be given as Windows format, start by converting to
39973  # unix format.
39974  new_path=`$CYGPATH -u "$path"`
39975
39976  # Now try to locate executable using which
39977  new_path=`$WHICH "$new_path" 2> /dev/null`
39978  # bat and cmd files are not always considered executable in cygwin causing which
39979  # to not find them
39980  if test "x$new_path" = x \
39981      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39982      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39983    new_path=`$CYGPATH -u "$path"`
39984  fi
39985  if test "x$new_path" = x; then
39986    # Oops. Which didn't find the executable.
39987    # The splitting of arguments from the executable at a space might have been incorrect,
39988    # since paths with space are more likely in Windows. Give it another try with the whole
39989    # argument.
39990    path="$complete"
39991    arguments="EOL"
39992    new_path=`$CYGPATH -u "$path"`
39993    new_path=`$WHICH "$new_path" 2> /dev/null`
39994    # bat and cmd files are not always considered executable in cygwin causing which
39995    # to not find them
39996    if test "x$new_path" = x \
39997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39999      new_path=`$CYGPATH -u "$path"`
40000    fi
40001    if test "x$new_path" = x; then
40002      # It's still not found. Now this is an unrecoverable error.
40003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40004$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40005      has_space=`$ECHO "$complete" | $GREP " "`
40006      if test "x$has_space" != x; then
40007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40009      fi
40010      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40011    fi
40012  fi
40013
40014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40017  # "foo.exe" is OK but "foo" is an error.
40018  #
40019  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40020  # It is also a way to make sure we got the proper file name for the real test later on.
40021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40022  if test "x$test_shortpath" = x; then
40023    # Short path failed, file does not exist as specified.
40024    # Try adding .exe or .cmd
40025    if test -f "${new_path}.exe"; then
40026      input_to_shortpath="${new_path}.exe"
40027    elif test -f "${new_path}.cmd"; then
40028      input_to_shortpath="${new_path}.cmd"
40029    else
40030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40031$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40032      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40033$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40034      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40035    fi
40036  else
40037    input_to_shortpath="$new_path"
40038  fi
40039
40040  # Call helper function which possibly converts this using DOS-style short mode.
40041  # If so, the updated path is stored in $new_path.
40042  new_path="$input_to_shortpath"
40043
40044  input_path="$input_to_shortpath"
40045  # Check if we need to convert this using DOS-style short mode. If the path
40046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40047  # take no chances and rewrite it.
40048  # Note: m4 eats our [], so we need to use [ and ] instead.
40049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40050  if test "x$has_forbidden_chars" != x; then
40051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40055      # Going to short mode and back again did indeed matter. Since short mode is
40056      # case insensitive, let's make it lowercase to improve readability.
40057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40058      # Now convert it back to Unix-style (cygpath)
40059      input_path=`$CYGPATH -u "$shortmode_path"`
40060      new_path="$input_path"
40061    fi
40062  fi
40063
40064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40065  if test "x$test_cygdrive_prefix" = x; then
40066    # As a simple fix, exclude /usr/bin since it's not a real path.
40067    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40069      # a path prefixed by /cygdrive for fixpath to work.
40070      new_path="$CYGWIN_ROOT_PATH$input_path"
40071    fi
40072  fi
40073
40074  # remove trailing .exe if any
40075  new_path="${new_path/%.exe/}"
40076
40077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40078
40079  # First separate the path from the arguments. This will split at the first
40080  # space.
40081  complete="$GNM"
40082  path="${complete%% *}"
40083  tmp="$complete EOL"
40084  arguments="${tmp#* }"
40085
40086  # Input might be given as Windows format, start by converting to
40087  # unix format.
40088  new_path="$path"
40089
40090  windows_path="$new_path"
40091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40092    unix_path=`$CYGPATH -u "$windows_path"`
40093    new_path="$unix_path"
40094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40096    new_path="$unix_path"
40097  fi
40098
40099
40100  # Now try to locate executable using which
40101  new_path=`$WHICH "$new_path" 2> /dev/null`
40102
40103  if test "x$new_path" = x; then
40104    # Oops. Which didn't find the executable.
40105    # The splitting of arguments from the executable at a space might have been incorrect,
40106    # since paths with space are more likely in Windows. Give it another try with the whole
40107    # argument.
40108    path="$complete"
40109    arguments="EOL"
40110    new_path="$path"
40111
40112  windows_path="$new_path"
40113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40114    unix_path=`$CYGPATH -u "$windows_path"`
40115    new_path="$unix_path"
40116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40118    new_path="$unix_path"
40119  fi
40120
40121
40122    new_path=`$WHICH "$new_path" 2> /dev/null`
40123    # bat and cmd files are not always considered executable in MSYS causing which
40124    # to not find them
40125    if test "x$new_path" = x \
40126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40128      new_path="$path"
40129
40130  windows_path="$new_path"
40131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40132    unix_path=`$CYGPATH -u "$windows_path"`
40133    new_path="$unix_path"
40134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40136    new_path="$unix_path"
40137  fi
40138
40139    fi
40140
40141    if test "x$new_path" = x; then
40142      # It's still not found. Now this is an unrecoverable error.
40143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40144$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40145      has_space=`$ECHO "$complete" | $GREP " "`
40146      if test "x$has_space" != x; then
40147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40149      fi
40150      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40151    fi
40152  fi
40153
40154  # Now new_path has a complete unix path to the binary
40155  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40156    # Keep paths in /bin as-is, but remove trailing .exe if any
40157    new_path="${new_path/%.exe/}"
40158    # Do not save /bin paths to all_fixpath_prefixes!
40159  else
40160    # Not in mixed or Windows style, start by that.
40161    new_path=`cmd //c echo $new_path`
40162
40163  input_path="$new_path"
40164  # Check if we need to convert this using DOS-style short mode. If the path
40165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40166  # take no chances and rewrite it.
40167  # Note: m4 eats our [], so we need to use [ and ] instead.
40168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40169  if test "x$has_forbidden_chars" != x; then
40170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40172  fi
40173
40174    # Output is in $new_path
40175
40176  windows_path="$new_path"
40177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40178    unix_path=`$CYGPATH -u "$windows_path"`
40179    new_path="$unix_path"
40180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40182    new_path="$unix_path"
40183  fi
40184
40185    # remove trailing .exe if any
40186    new_path="${new_path/%.exe/}"
40187
40188    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40189    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40190  fi
40191
40192    else
40193      # We're on a unix platform. Hooray! :)
40194      # First separate the path from the arguments. This will split at the first
40195      # space.
40196      complete="$GNM"
40197      path="${complete%% *}"
40198      tmp="$complete EOL"
40199      arguments="${tmp#* }"
40200
40201      # Cannot rely on the command "which" here since it doesn't always work.
40202      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40203      if test -z "$is_absolute_path"; then
40204        # Path to executable is not absolute. Find it.
40205        IFS_save="$IFS"
40206        IFS=:
40207        for p in $PATH; do
40208          if test -f "$p/$path" && test -x "$p/$path"; then
40209            new_path="$p/$path"
40210            break
40211          fi
40212        done
40213        IFS="$IFS_save"
40214      else
40215        # This is an absolute path, we can use it without further modifications.
40216        new_path="$path"
40217      fi
40218
40219      if test "x$new_path" = x; then
40220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40221$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40222        has_space=`$ECHO "$complete" | $GREP " "`
40223        if test "x$has_space" != x; then
40224          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40225$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40226        fi
40227        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40228      fi
40229    fi
40230
40231    # Now join together the path and the arguments once again
40232    if test "x$arguments" != xEOL; then
40233      new_complete="$new_path ${arguments% *}"
40234    else
40235      new_complete="$new_path"
40236    fi
40237
40238    if test "x$complete" != "x$new_complete"; then
40239      GNM="$new_complete"
40240      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40241$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40242    fi
40243  fi
40244
40245  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40246    # FIXME: we should unify this with the solaris case above.
40247
40248
40249  # Publish this variable in the help.
40250
40251
40252  if [ -z "${STRIP+x}" ]; then
40253    # The variable is not set by user, try to locate tool using the code snippet
40254    if test -n "$ac_tool_prefix"; then
40255  for ac_prog in strip
40256  do
40257    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40258set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40260$as_echo_n "checking for $ac_word... " >&6; }
40261if ${ac_cv_prog_STRIP+:} false; then :
40262  $as_echo_n "(cached) " >&6
40263else
40264  if test -n "$STRIP"; then
40265  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40266else
40267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40268for as_dir in $PATH
40269do
40270  IFS=$as_save_IFS
40271  test -z "$as_dir" && as_dir=.
40272    for ac_exec_ext in '' $ac_executable_extensions; do
40273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40274    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40276    break 2
40277  fi
40278done
40279  done
40280IFS=$as_save_IFS
40281
40282fi
40283fi
40284STRIP=$ac_cv_prog_STRIP
40285if test -n "$STRIP"; then
40286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40287$as_echo "$STRIP" >&6; }
40288else
40289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40290$as_echo "no" >&6; }
40291fi
40292
40293
40294    test -n "$STRIP" && break
40295  done
40296fi
40297if test -z "$STRIP"; then
40298  ac_ct_STRIP=$STRIP
40299  for ac_prog in strip
40300do
40301  # Extract the first word of "$ac_prog", so it can be a program name with args.
40302set dummy $ac_prog; ac_word=$2
40303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40304$as_echo_n "checking for $ac_word... " >&6; }
40305if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40306  $as_echo_n "(cached) " >&6
40307else
40308  if test -n "$ac_ct_STRIP"; then
40309  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40310else
40311as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40312for as_dir in $PATH
40313do
40314  IFS=$as_save_IFS
40315  test -z "$as_dir" && as_dir=.
40316    for ac_exec_ext in '' $ac_executable_extensions; do
40317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40318    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40320    break 2
40321  fi
40322done
40323  done
40324IFS=$as_save_IFS
40325
40326fi
40327fi
40328ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40329if test -n "$ac_ct_STRIP"; then
40330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40331$as_echo "$ac_ct_STRIP" >&6; }
40332else
40333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40334$as_echo "no" >&6; }
40335fi
40336
40337
40338  test -n "$ac_ct_STRIP" && break
40339done
40340
40341  if test "x$ac_ct_STRIP" = x; then
40342    STRIP=""
40343  else
40344    case $cross_compiling:$ac_tool_warned in
40345yes:)
40346{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40347$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40348ac_tool_warned=yes ;;
40349esac
40350    STRIP=$ac_ct_STRIP
40351  fi
40352fi
40353
40354  else
40355    # The variable is set, but is it from the command line or the environment?
40356
40357    # Try to remove the string !STRIP! from our list.
40358    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40359    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40360      # If it failed, the variable was not from the command line. Ignore it,
40361      # but warn the user (except for BASH, which is always set by the calling BASH).
40362      if test "xSTRIP" != xBASH; then
40363        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40364$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40365      fi
40366      # Try to locate tool using the code snippet
40367      if test -n "$ac_tool_prefix"; then
40368  for ac_prog in strip
40369  do
40370    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40371set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40373$as_echo_n "checking for $ac_word... " >&6; }
40374if ${ac_cv_prog_STRIP+:} false; then :
40375  $as_echo_n "(cached) " >&6
40376else
40377  if test -n "$STRIP"; then
40378  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40379else
40380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40381for as_dir in $PATH
40382do
40383  IFS=$as_save_IFS
40384  test -z "$as_dir" && as_dir=.
40385    for ac_exec_ext in '' $ac_executable_extensions; do
40386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40387    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40389    break 2
40390  fi
40391done
40392  done
40393IFS=$as_save_IFS
40394
40395fi
40396fi
40397STRIP=$ac_cv_prog_STRIP
40398if test -n "$STRIP"; then
40399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40400$as_echo "$STRIP" >&6; }
40401else
40402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40403$as_echo "no" >&6; }
40404fi
40405
40406
40407    test -n "$STRIP" && break
40408  done
40409fi
40410if test -z "$STRIP"; then
40411  ac_ct_STRIP=$STRIP
40412  for ac_prog in strip
40413do
40414  # Extract the first word of "$ac_prog", so it can be a program name with args.
40415set dummy $ac_prog; ac_word=$2
40416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40417$as_echo_n "checking for $ac_word... " >&6; }
40418if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40419  $as_echo_n "(cached) " >&6
40420else
40421  if test -n "$ac_ct_STRIP"; then
40422  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40423else
40424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40425for as_dir in $PATH
40426do
40427  IFS=$as_save_IFS
40428  test -z "$as_dir" && as_dir=.
40429    for ac_exec_ext in '' $ac_executable_extensions; do
40430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40431    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40433    break 2
40434  fi
40435done
40436  done
40437IFS=$as_save_IFS
40438
40439fi
40440fi
40441ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40442if test -n "$ac_ct_STRIP"; then
40443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40444$as_echo "$ac_ct_STRIP" >&6; }
40445else
40446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40447$as_echo "no" >&6; }
40448fi
40449
40450
40451  test -n "$ac_ct_STRIP" && break
40452done
40453
40454  if test "x$ac_ct_STRIP" = x; then
40455    STRIP=""
40456  else
40457    case $cross_compiling:$ac_tool_warned in
40458yes:)
40459{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40460$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40461ac_tool_warned=yes ;;
40462esac
40463    STRIP=$ac_ct_STRIP
40464  fi
40465fi
40466
40467    else
40468      # If it succeeded, then it was overridden by the user. We will use it
40469      # for the tool.
40470
40471      # First remove it from the list of overridden variables, so we can test
40472      # for unknown variables in the end.
40473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40474
40475      # Check if we try to supply an empty value
40476      if test "x$STRIP" = x; then
40477        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40478$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40480$as_echo_n "checking for STRIP... " >&6; }
40481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40482$as_echo "disabled" >&6; }
40483      else
40484        # Check if the provided tool contains a complete path.
40485        tool_specified="$STRIP"
40486        tool_basename="${tool_specified##*/}"
40487        if test "x$tool_basename" = "x$tool_specified"; then
40488          # A command without a complete path is provided, search $PATH.
40489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40490$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40491          # Extract the first word of "$tool_basename", so it can be a program name with args.
40492set dummy $tool_basename; ac_word=$2
40493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40494$as_echo_n "checking for $ac_word... " >&6; }
40495if ${ac_cv_path_STRIP+:} false; then :
40496  $as_echo_n "(cached) " >&6
40497else
40498  case $STRIP in
40499  [\\/]* | ?:[\\/]*)
40500  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40501  ;;
40502  *)
40503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40504for as_dir in $PATH
40505do
40506  IFS=$as_save_IFS
40507  test -z "$as_dir" && as_dir=.
40508    for ac_exec_ext in '' $ac_executable_extensions; do
40509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40510    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40512    break 2
40513  fi
40514done
40515  done
40516IFS=$as_save_IFS
40517
40518  ;;
40519esac
40520fi
40521STRIP=$ac_cv_path_STRIP
40522if test -n "$STRIP"; then
40523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40524$as_echo "$STRIP" >&6; }
40525else
40526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40527$as_echo "no" >&6; }
40528fi
40529
40530
40531          if test "x$STRIP" = x; then
40532            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40533          fi
40534        else
40535          # Otherwise we believe it is a complete path. Use it as it is.
40536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40537$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40538          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40539$as_echo_n "checking for STRIP... " >&6; }
40540          if test ! -x "$tool_specified"; then
40541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40542$as_echo "not found" >&6; }
40543            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40544          fi
40545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40546$as_echo "$tool_specified" >&6; }
40547        fi
40548      fi
40549    fi
40550
40551  fi
40552
40553
40554
40555  # Only process if variable expands to non-empty
40556
40557  if test "x$STRIP" != x; then
40558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40559
40560  # First separate the path from the arguments. This will split at the first
40561  # space.
40562  complete="$STRIP"
40563  path="${complete%% *}"
40564  tmp="$complete EOL"
40565  arguments="${tmp#* }"
40566
40567  # Input might be given as Windows format, start by converting to
40568  # unix format.
40569  new_path=`$CYGPATH -u "$path"`
40570
40571  # Now try to locate executable using which
40572  new_path=`$WHICH "$new_path" 2> /dev/null`
40573  # bat and cmd files are not always considered executable in cygwin causing which
40574  # to not find them
40575  if test "x$new_path" = x \
40576      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40577      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40578    new_path=`$CYGPATH -u "$path"`
40579  fi
40580  if test "x$new_path" = x; then
40581    # Oops. Which didn't find the executable.
40582    # The splitting of arguments from the executable at a space might have been incorrect,
40583    # since paths with space are more likely in Windows. Give it another try with the whole
40584    # argument.
40585    path="$complete"
40586    arguments="EOL"
40587    new_path=`$CYGPATH -u "$path"`
40588    new_path=`$WHICH "$new_path" 2> /dev/null`
40589    # bat and cmd files are not always considered executable in cygwin causing which
40590    # to not find them
40591    if test "x$new_path" = x \
40592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40594      new_path=`$CYGPATH -u "$path"`
40595    fi
40596    if test "x$new_path" = x; then
40597      # It's still not found. Now this is an unrecoverable error.
40598      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40599$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40600      has_space=`$ECHO "$complete" | $GREP " "`
40601      if test "x$has_space" != x; then
40602        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40603$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40604      fi
40605      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40606    fi
40607  fi
40608
40609  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40610  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40611  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40612  # "foo.exe" is OK but "foo" is an error.
40613  #
40614  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40615  # It is also a way to make sure we got the proper file name for the real test later on.
40616  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40617  if test "x$test_shortpath" = x; then
40618    # Short path failed, file does not exist as specified.
40619    # Try adding .exe or .cmd
40620    if test -f "${new_path}.exe"; then
40621      input_to_shortpath="${new_path}.exe"
40622    elif test -f "${new_path}.cmd"; then
40623      input_to_shortpath="${new_path}.cmd"
40624    else
40625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40626$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40627      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40628$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40629      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40630    fi
40631  else
40632    input_to_shortpath="$new_path"
40633  fi
40634
40635  # Call helper function which possibly converts this using DOS-style short mode.
40636  # If so, the updated path is stored in $new_path.
40637  new_path="$input_to_shortpath"
40638
40639  input_path="$input_to_shortpath"
40640  # Check if we need to convert this using DOS-style short mode. If the path
40641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40642  # take no chances and rewrite it.
40643  # Note: m4 eats our [], so we need to use [ and ] instead.
40644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40645  if test "x$has_forbidden_chars" != x; then
40646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40650      # Going to short mode and back again did indeed matter. Since short mode is
40651      # case insensitive, let's make it lowercase to improve readability.
40652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40653      # Now convert it back to Unix-style (cygpath)
40654      input_path=`$CYGPATH -u "$shortmode_path"`
40655      new_path="$input_path"
40656    fi
40657  fi
40658
40659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40660  if test "x$test_cygdrive_prefix" = x; then
40661    # As a simple fix, exclude /usr/bin since it's not a real path.
40662    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40664      # a path prefixed by /cygdrive for fixpath to work.
40665      new_path="$CYGWIN_ROOT_PATH$input_path"
40666    fi
40667  fi
40668
40669  # remove trailing .exe if any
40670  new_path="${new_path/%.exe/}"
40671
40672    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40673
40674  # First separate the path from the arguments. This will split at the first
40675  # space.
40676  complete="$STRIP"
40677  path="${complete%% *}"
40678  tmp="$complete EOL"
40679  arguments="${tmp#* }"
40680
40681  # Input might be given as Windows format, start by converting to
40682  # unix format.
40683  new_path="$path"
40684
40685  windows_path="$new_path"
40686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40687    unix_path=`$CYGPATH -u "$windows_path"`
40688    new_path="$unix_path"
40689  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40690    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40691    new_path="$unix_path"
40692  fi
40693
40694
40695  # Now try to locate executable using which
40696  new_path=`$WHICH "$new_path" 2> /dev/null`
40697
40698  if test "x$new_path" = x; then
40699    # Oops. Which didn't find the executable.
40700    # The splitting of arguments from the executable at a space might have been incorrect,
40701    # since paths with space are more likely in Windows. Give it another try with the whole
40702    # argument.
40703    path="$complete"
40704    arguments="EOL"
40705    new_path="$path"
40706
40707  windows_path="$new_path"
40708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40709    unix_path=`$CYGPATH -u "$windows_path"`
40710    new_path="$unix_path"
40711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40713    new_path="$unix_path"
40714  fi
40715
40716
40717    new_path=`$WHICH "$new_path" 2> /dev/null`
40718    # bat and cmd files are not always considered executable in MSYS causing which
40719    # to not find them
40720    if test "x$new_path" = x \
40721        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40722        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40723      new_path="$path"
40724
40725  windows_path="$new_path"
40726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40727    unix_path=`$CYGPATH -u "$windows_path"`
40728    new_path="$unix_path"
40729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40731    new_path="$unix_path"
40732  fi
40733
40734    fi
40735
40736    if test "x$new_path" = x; then
40737      # It's still not found. Now this is an unrecoverable error.
40738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40739$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40740      has_space=`$ECHO "$complete" | $GREP " "`
40741      if test "x$has_space" != x; then
40742        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40743$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40744      fi
40745      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40746    fi
40747  fi
40748
40749  # Now new_path has a complete unix path to the binary
40750  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40751    # Keep paths in /bin as-is, but remove trailing .exe if any
40752    new_path="${new_path/%.exe/}"
40753    # Do not save /bin paths to all_fixpath_prefixes!
40754  else
40755    # Not in mixed or Windows style, start by that.
40756    new_path=`cmd //c echo $new_path`
40757
40758  input_path="$new_path"
40759  # Check if we need to convert this using DOS-style short mode. If the path
40760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40761  # take no chances and rewrite it.
40762  # Note: m4 eats our [], so we need to use [ and ] instead.
40763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40764  if test "x$has_forbidden_chars" != x; then
40765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40767  fi
40768
40769    # Output is in $new_path
40770
40771  windows_path="$new_path"
40772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40773    unix_path=`$CYGPATH -u "$windows_path"`
40774    new_path="$unix_path"
40775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40777    new_path="$unix_path"
40778  fi
40779
40780    # remove trailing .exe if any
40781    new_path="${new_path/%.exe/}"
40782
40783    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40784    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40785  fi
40786
40787    else
40788      # We're on a unix platform. Hooray! :)
40789      # First separate the path from the arguments. This will split at the first
40790      # space.
40791      complete="$STRIP"
40792      path="${complete%% *}"
40793      tmp="$complete EOL"
40794      arguments="${tmp#* }"
40795
40796      # Cannot rely on the command "which" here since it doesn't always work.
40797      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40798      if test -z "$is_absolute_path"; then
40799        # Path to executable is not absolute. Find it.
40800        IFS_save="$IFS"
40801        IFS=:
40802        for p in $PATH; do
40803          if test -f "$p/$path" && test -x "$p/$path"; then
40804            new_path="$p/$path"
40805            break
40806          fi
40807        done
40808        IFS="$IFS_save"
40809      else
40810        # This is an absolute path, we can use it without further modifications.
40811        new_path="$path"
40812      fi
40813
40814      if test "x$new_path" = x; then
40815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40816$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40817        has_space=`$ECHO "$complete" | $GREP " "`
40818        if test "x$has_space" != x; then
40819          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40820$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40821        fi
40822        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40823      fi
40824    fi
40825
40826    # Now join together the path and the arguments once again
40827    if test "x$arguments" != xEOL; then
40828      new_complete="$new_path ${arguments% *}"
40829    else
40830      new_complete="$new_path"
40831    fi
40832
40833    if test "x$complete" != "x$new_complete"; then
40834      STRIP="$new_complete"
40835      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40836$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40837    fi
40838  fi
40839
40840    if test "x$TOOLCHAIN_TYPE" = xgcc; then
40841
40842
40843  # Publish this variable in the help.
40844
40845
40846  if [ -z "${NM+x}" ]; then
40847    # The variable is not set by user, try to locate tool using the code snippet
40848    if test -n "$ac_tool_prefix"; then
40849  for ac_prog in nm gcc-nm
40850  do
40851    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40852set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40854$as_echo_n "checking for $ac_word... " >&6; }
40855if ${ac_cv_prog_NM+:} false; then :
40856  $as_echo_n "(cached) " >&6
40857else
40858  if test -n "$NM"; then
40859  ac_cv_prog_NM="$NM" # Let the user override the test.
40860else
40861as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40862for as_dir in $PATH
40863do
40864  IFS=$as_save_IFS
40865  test -z "$as_dir" && as_dir=.
40866    for ac_exec_ext in '' $ac_executable_extensions; do
40867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40868    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40870    break 2
40871  fi
40872done
40873  done
40874IFS=$as_save_IFS
40875
40876fi
40877fi
40878NM=$ac_cv_prog_NM
40879if test -n "$NM"; then
40880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40881$as_echo "$NM" >&6; }
40882else
40883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40884$as_echo "no" >&6; }
40885fi
40886
40887
40888    test -n "$NM" && break
40889  done
40890fi
40891if test -z "$NM"; then
40892  ac_ct_NM=$NM
40893  for ac_prog in nm gcc-nm
40894do
40895  # Extract the first word of "$ac_prog", so it can be a program name with args.
40896set dummy $ac_prog; ac_word=$2
40897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40898$as_echo_n "checking for $ac_word... " >&6; }
40899if ${ac_cv_prog_ac_ct_NM+:} false; then :
40900  $as_echo_n "(cached) " >&6
40901else
40902  if test -n "$ac_ct_NM"; then
40903  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
40904else
40905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40906for as_dir in $PATH
40907do
40908  IFS=$as_save_IFS
40909  test -z "$as_dir" && as_dir=.
40910    for ac_exec_ext in '' $ac_executable_extensions; do
40911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40912    ac_cv_prog_ac_ct_NM="$ac_prog"
40913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40914    break 2
40915  fi
40916done
40917  done
40918IFS=$as_save_IFS
40919
40920fi
40921fi
40922ac_ct_NM=$ac_cv_prog_ac_ct_NM
40923if test -n "$ac_ct_NM"; then
40924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
40925$as_echo "$ac_ct_NM" >&6; }
40926else
40927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40928$as_echo "no" >&6; }
40929fi
40930
40931
40932  test -n "$ac_ct_NM" && break
40933done
40934
40935  if test "x$ac_ct_NM" = x; then
40936    NM=""
40937  else
40938    case $cross_compiling:$ac_tool_warned in
40939yes:)
40940{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40941$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40942ac_tool_warned=yes ;;
40943esac
40944    NM=$ac_ct_NM
40945  fi
40946fi
40947
40948  else
40949    # The variable is set, but is it from the command line or the environment?
40950
40951    # Try to remove the string !NM! from our list.
40952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40954      # If it failed, the variable was not from the command line. Ignore it,
40955      # but warn the user (except for BASH, which is always set by the calling BASH).
40956      if test "xNM" != xBASH; then
40957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40958$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40959      fi
40960      # Try to locate tool using the code snippet
40961      if test -n "$ac_tool_prefix"; then
40962  for ac_prog in nm gcc-nm
40963  do
40964    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40965set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40967$as_echo_n "checking for $ac_word... " >&6; }
40968if ${ac_cv_prog_NM+:} false; then :
40969  $as_echo_n "(cached) " >&6
40970else
40971  if test -n "$NM"; then
40972  ac_cv_prog_NM="$NM" # Let the user override the test.
40973else
40974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40975for as_dir in $PATH
40976do
40977  IFS=$as_save_IFS
40978  test -z "$as_dir" && as_dir=.
40979    for ac_exec_ext in '' $ac_executable_extensions; do
40980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40981    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
40982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40983    break 2
40984  fi
40985done
40986  done
40987IFS=$as_save_IFS
40988
40989fi
40990fi
40991NM=$ac_cv_prog_NM
40992if test -n "$NM"; then
40993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40994$as_echo "$NM" >&6; }
40995else
40996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40997$as_echo "no" >&6; }
40998fi
40999
41000
41001    test -n "$NM" && break
41002  done
41003fi
41004if test -z "$NM"; then
41005  ac_ct_NM=$NM
41006  for ac_prog in nm gcc-nm
41007do
41008  # Extract the first word of "$ac_prog", so it can be a program name with args.
41009set dummy $ac_prog; ac_word=$2
41010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41011$as_echo_n "checking for $ac_word... " >&6; }
41012if ${ac_cv_prog_ac_ct_NM+:} false; then :
41013  $as_echo_n "(cached) " >&6
41014else
41015  if test -n "$ac_ct_NM"; then
41016  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41017else
41018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41019for as_dir in $PATH
41020do
41021  IFS=$as_save_IFS
41022  test -z "$as_dir" && as_dir=.
41023    for ac_exec_ext in '' $ac_executable_extensions; do
41024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41025    ac_cv_prog_ac_ct_NM="$ac_prog"
41026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41027    break 2
41028  fi
41029done
41030  done
41031IFS=$as_save_IFS
41032
41033fi
41034fi
41035ac_ct_NM=$ac_cv_prog_ac_ct_NM
41036if test -n "$ac_ct_NM"; then
41037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41038$as_echo "$ac_ct_NM" >&6; }
41039else
41040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41041$as_echo "no" >&6; }
41042fi
41043
41044
41045  test -n "$ac_ct_NM" && break
41046done
41047
41048  if test "x$ac_ct_NM" = x; then
41049    NM=""
41050  else
41051    case $cross_compiling:$ac_tool_warned in
41052yes:)
41053{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41054$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41055ac_tool_warned=yes ;;
41056esac
41057    NM=$ac_ct_NM
41058  fi
41059fi
41060
41061    else
41062      # If it succeeded, then it was overridden by the user. We will use it
41063      # for the tool.
41064
41065      # First remove it from the list of overridden variables, so we can test
41066      # for unknown variables in the end.
41067      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41068
41069      # Check if we try to supply an empty value
41070      if test "x$NM" = x; then
41071        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41072$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41073        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41074$as_echo_n "checking for NM... " >&6; }
41075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41076$as_echo "disabled" >&6; }
41077      else
41078        # Check if the provided tool contains a complete path.
41079        tool_specified="$NM"
41080        tool_basename="${tool_specified##*/}"
41081        if test "x$tool_basename" = "x$tool_specified"; then
41082          # A command without a complete path is provided, search $PATH.
41083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41084$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41085          # Extract the first word of "$tool_basename", so it can be a program name with args.
41086set dummy $tool_basename; ac_word=$2
41087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41088$as_echo_n "checking for $ac_word... " >&6; }
41089if ${ac_cv_path_NM+:} false; then :
41090  $as_echo_n "(cached) " >&6
41091else
41092  case $NM in
41093  [\\/]* | ?:[\\/]*)
41094  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41095  ;;
41096  *)
41097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41098for as_dir in $PATH
41099do
41100  IFS=$as_save_IFS
41101  test -z "$as_dir" && as_dir=.
41102    for ac_exec_ext in '' $ac_executable_extensions; do
41103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41104    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41106    break 2
41107  fi
41108done
41109  done
41110IFS=$as_save_IFS
41111
41112  ;;
41113esac
41114fi
41115NM=$ac_cv_path_NM
41116if test -n "$NM"; then
41117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41118$as_echo "$NM" >&6; }
41119else
41120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41121$as_echo "no" >&6; }
41122fi
41123
41124
41125          if test "x$NM" = x; then
41126            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41127          fi
41128        else
41129          # Otherwise we believe it is a complete path. Use it as it is.
41130          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41131$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41132          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41133$as_echo_n "checking for NM... " >&6; }
41134          if test ! -x "$tool_specified"; then
41135            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41136$as_echo "not found" >&6; }
41137            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41138          fi
41139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41140$as_echo "$tool_specified" >&6; }
41141        fi
41142      fi
41143    fi
41144
41145  fi
41146
41147
41148    else
41149
41150
41151  # Publish this variable in the help.
41152
41153
41154  if [ -z "${NM+x}" ]; then
41155    # The variable is not set by user, try to locate tool using the code snippet
41156    if test -n "$ac_tool_prefix"; then
41157  for ac_prog in nm
41158  do
41159    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41160set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41162$as_echo_n "checking for $ac_word... " >&6; }
41163if ${ac_cv_prog_NM+:} false; then :
41164  $as_echo_n "(cached) " >&6
41165else
41166  if test -n "$NM"; then
41167  ac_cv_prog_NM="$NM" # Let the user override the test.
41168else
41169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41170for as_dir in $PATH
41171do
41172  IFS=$as_save_IFS
41173  test -z "$as_dir" && as_dir=.
41174    for ac_exec_ext in '' $ac_executable_extensions; do
41175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41176    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41178    break 2
41179  fi
41180done
41181  done
41182IFS=$as_save_IFS
41183
41184fi
41185fi
41186NM=$ac_cv_prog_NM
41187if test -n "$NM"; then
41188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41189$as_echo "$NM" >&6; }
41190else
41191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41192$as_echo "no" >&6; }
41193fi
41194
41195
41196    test -n "$NM" && break
41197  done
41198fi
41199if test -z "$NM"; then
41200  ac_ct_NM=$NM
41201  for ac_prog in nm
41202do
41203  # Extract the first word of "$ac_prog", so it can be a program name with args.
41204set dummy $ac_prog; ac_word=$2
41205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41206$as_echo_n "checking for $ac_word... " >&6; }
41207if ${ac_cv_prog_ac_ct_NM+:} false; then :
41208  $as_echo_n "(cached) " >&6
41209else
41210  if test -n "$ac_ct_NM"; then
41211  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41212else
41213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41214for as_dir in $PATH
41215do
41216  IFS=$as_save_IFS
41217  test -z "$as_dir" && as_dir=.
41218    for ac_exec_ext in '' $ac_executable_extensions; do
41219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41220    ac_cv_prog_ac_ct_NM="$ac_prog"
41221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41222    break 2
41223  fi
41224done
41225  done
41226IFS=$as_save_IFS
41227
41228fi
41229fi
41230ac_ct_NM=$ac_cv_prog_ac_ct_NM
41231if test -n "$ac_ct_NM"; then
41232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41233$as_echo "$ac_ct_NM" >&6; }
41234else
41235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41236$as_echo "no" >&6; }
41237fi
41238
41239
41240  test -n "$ac_ct_NM" && break
41241done
41242
41243  if test "x$ac_ct_NM" = x; then
41244    NM=""
41245  else
41246    case $cross_compiling:$ac_tool_warned in
41247yes:)
41248{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41249$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41250ac_tool_warned=yes ;;
41251esac
41252    NM=$ac_ct_NM
41253  fi
41254fi
41255
41256  else
41257    # The variable is set, but is it from the command line or the environment?
41258
41259    # Try to remove the string !NM! from our list.
41260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41262      # If it failed, the variable was not from the command line. Ignore it,
41263      # but warn the user (except for BASH, which is always set by the calling BASH).
41264      if test "xNM" != xBASH; then
41265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41266$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41267      fi
41268      # Try to locate tool using the code snippet
41269      if test -n "$ac_tool_prefix"; then
41270  for ac_prog in nm
41271  do
41272    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41273set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41275$as_echo_n "checking for $ac_word... " >&6; }
41276if ${ac_cv_prog_NM+:} false; then :
41277  $as_echo_n "(cached) " >&6
41278else
41279  if test -n "$NM"; then
41280  ac_cv_prog_NM="$NM" # Let the user override the test.
41281else
41282as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41283for as_dir in $PATH
41284do
41285  IFS=$as_save_IFS
41286  test -z "$as_dir" && as_dir=.
41287    for ac_exec_ext in '' $ac_executable_extensions; do
41288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41289    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41291    break 2
41292  fi
41293done
41294  done
41295IFS=$as_save_IFS
41296
41297fi
41298fi
41299NM=$ac_cv_prog_NM
41300if test -n "$NM"; then
41301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41302$as_echo "$NM" >&6; }
41303else
41304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41305$as_echo "no" >&6; }
41306fi
41307
41308
41309    test -n "$NM" && break
41310  done
41311fi
41312if test -z "$NM"; then
41313  ac_ct_NM=$NM
41314  for ac_prog in nm
41315do
41316  # Extract the first word of "$ac_prog", so it can be a program name with args.
41317set dummy $ac_prog; ac_word=$2
41318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41319$as_echo_n "checking for $ac_word... " >&6; }
41320if ${ac_cv_prog_ac_ct_NM+:} false; then :
41321  $as_echo_n "(cached) " >&6
41322else
41323  if test -n "$ac_ct_NM"; then
41324  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41325else
41326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41327for as_dir in $PATH
41328do
41329  IFS=$as_save_IFS
41330  test -z "$as_dir" && as_dir=.
41331    for ac_exec_ext in '' $ac_executable_extensions; do
41332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41333    ac_cv_prog_ac_ct_NM="$ac_prog"
41334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41335    break 2
41336  fi
41337done
41338  done
41339IFS=$as_save_IFS
41340
41341fi
41342fi
41343ac_ct_NM=$ac_cv_prog_ac_ct_NM
41344if test -n "$ac_ct_NM"; then
41345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41346$as_echo "$ac_ct_NM" >&6; }
41347else
41348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41349$as_echo "no" >&6; }
41350fi
41351
41352
41353  test -n "$ac_ct_NM" && break
41354done
41355
41356  if test "x$ac_ct_NM" = x; then
41357    NM=""
41358  else
41359    case $cross_compiling:$ac_tool_warned in
41360yes:)
41361{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41362$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41363ac_tool_warned=yes ;;
41364esac
41365    NM=$ac_ct_NM
41366  fi
41367fi
41368
41369    else
41370      # If it succeeded, then it was overridden by the user. We will use it
41371      # for the tool.
41372
41373      # First remove it from the list of overridden variables, so we can test
41374      # for unknown variables in the end.
41375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41376
41377      # Check if we try to supply an empty value
41378      if test "x$NM" = x; then
41379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41380$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41382$as_echo_n "checking for NM... " >&6; }
41383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41384$as_echo "disabled" >&6; }
41385      else
41386        # Check if the provided tool contains a complete path.
41387        tool_specified="$NM"
41388        tool_basename="${tool_specified##*/}"
41389        if test "x$tool_basename" = "x$tool_specified"; then
41390          # A command without a complete path is provided, search $PATH.
41391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41392$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41393          # Extract the first word of "$tool_basename", so it can be a program name with args.
41394set dummy $tool_basename; ac_word=$2
41395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41396$as_echo_n "checking for $ac_word... " >&6; }
41397if ${ac_cv_path_NM+:} false; then :
41398  $as_echo_n "(cached) " >&6
41399else
41400  case $NM in
41401  [\\/]* | ?:[\\/]*)
41402  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41403  ;;
41404  *)
41405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41406for as_dir in $PATH
41407do
41408  IFS=$as_save_IFS
41409  test -z "$as_dir" && as_dir=.
41410    for ac_exec_ext in '' $ac_executable_extensions; do
41411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41412    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41414    break 2
41415  fi
41416done
41417  done
41418IFS=$as_save_IFS
41419
41420  ;;
41421esac
41422fi
41423NM=$ac_cv_path_NM
41424if test -n "$NM"; then
41425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41426$as_echo "$NM" >&6; }
41427else
41428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41429$as_echo "no" >&6; }
41430fi
41431
41432
41433          if test "x$NM" = x; then
41434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41435          fi
41436        else
41437          # Otherwise we believe it is a complete path. Use it as it is.
41438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41439$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41441$as_echo_n "checking for NM... " >&6; }
41442          if test ! -x "$tool_specified"; then
41443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41444$as_echo "not found" >&6; }
41445            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41446          fi
41447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41448$as_echo "$tool_specified" >&6; }
41449        fi
41450      fi
41451    fi
41452
41453  fi
41454
41455
41456    fi
41457
41458  # Only process if variable expands to non-empty
41459
41460  if test "x$NM" != x; then
41461    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41462
41463  # First separate the path from the arguments. This will split at the first
41464  # space.
41465  complete="$NM"
41466  path="${complete%% *}"
41467  tmp="$complete EOL"
41468  arguments="${tmp#* }"
41469
41470  # Input might be given as Windows format, start by converting to
41471  # unix format.
41472  new_path=`$CYGPATH -u "$path"`
41473
41474  # Now try to locate executable using which
41475  new_path=`$WHICH "$new_path" 2> /dev/null`
41476  # bat and cmd files are not always considered executable in cygwin causing which
41477  # to not find them
41478  if test "x$new_path" = x \
41479      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41480      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41481    new_path=`$CYGPATH -u "$path"`
41482  fi
41483  if test "x$new_path" = x; then
41484    # Oops. Which didn't find the executable.
41485    # The splitting of arguments from the executable at a space might have been incorrect,
41486    # since paths with space are more likely in Windows. Give it another try with the whole
41487    # argument.
41488    path="$complete"
41489    arguments="EOL"
41490    new_path=`$CYGPATH -u "$path"`
41491    new_path=`$WHICH "$new_path" 2> /dev/null`
41492    # bat and cmd files are not always considered executable in cygwin causing which
41493    # to not find them
41494    if test "x$new_path" = x \
41495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41497      new_path=`$CYGPATH -u "$path"`
41498    fi
41499    if test "x$new_path" = x; then
41500      # It's still not found. Now this is an unrecoverable error.
41501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41502$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41503      has_space=`$ECHO "$complete" | $GREP " "`
41504      if test "x$has_space" != x; then
41505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41507      fi
41508      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41509    fi
41510  fi
41511
41512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41515  # "foo.exe" is OK but "foo" is an error.
41516  #
41517  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41518  # It is also a way to make sure we got the proper file name for the real test later on.
41519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41520  if test "x$test_shortpath" = x; then
41521    # Short path failed, file does not exist as specified.
41522    # Try adding .exe or .cmd
41523    if test -f "${new_path}.exe"; then
41524      input_to_shortpath="${new_path}.exe"
41525    elif test -f "${new_path}.cmd"; then
41526      input_to_shortpath="${new_path}.cmd"
41527    else
41528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41529$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41530      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41531$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41532      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41533    fi
41534  else
41535    input_to_shortpath="$new_path"
41536  fi
41537
41538  # Call helper function which possibly converts this using DOS-style short mode.
41539  # If so, the updated path is stored in $new_path.
41540  new_path="$input_to_shortpath"
41541
41542  input_path="$input_to_shortpath"
41543  # Check if we need to convert this using DOS-style short mode. If the path
41544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41545  # take no chances and rewrite it.
41546  # Note: m4 eats our [], so we need to use [ and ] instead.
41547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41548  if test "x$has_forbidden_chars" != x; then
41549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41553      # Going to short mode and back again did indeed matter. Since short mode is
41554      # case insensitive, let's make it lowercase to improve readability.
41555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41556      # Now convert it back to Unix-style (cygpath)
41557      input_path=`$CYGPATH -u "$shortmode_path"`
41558      new_path="$input_path"
41559    fi
41560  fi
41561
41562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41563  if test "x$test_cygdrive_prefix" = x; then
41564    # As a simple fix, exclude /usr/bin since it's not a real path.
41565    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41567      # a path prefixed by /cygdrive for fixpath to work.
41568      new_path="$CYGWIN_ROOT_PATH$input_path"
41569    fi
41570  fi
41571
41572  # remove trailing .exe if any
41573  new_path="${new_path/%.exe/}"
41574
41575    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41576
41577  # First separate the path from the arguments. This will split at the first
41578  # space.
41579  complete="$NM"
41580  path="${complete%% *}"
41581  tmp="$complete EOL"
41582  arguments="${tmp#* }"
41583
41584  # Input might be given as Windows format, start by converting to
41585  # unix format.
41586  new_path="$path"
41587
41588  windows_path="$new_path"
41589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41590    unix_path=`$CYGPATH -u "$windows_path"`
41591    new_path="$unix_path"
41592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41594    new_path="$unix_path"
41595  fi
41596
41597
41598  # Now try to locate executable using which
41599  new_path=`$WHICH "$new_path" 2> /dev/null`
41600
41601  if test "x$new_path" = x; then
41602    # Oops. Which didn't find the executable.
41603    # The splitting of arguments from the executable at a space might have been incorrect,
41604    # since paths with space are more likely in Windows. Give it another try with the whole
41605    # argument.
41606    path="$complete"
41607    arguments="EOL"
41608    new_path="$path"
41609
41610  windows_path="$new_path"
41611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41612    unix_path=`$CYGPATH -u "$windows_path"`
41613    new_path="$unix_path"
41614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41616    new_path="$unix_path"
41617  fi
41618
41619
41620    new_path=`$WHICH "$new_path" 2> /dev/null`
41621    # bat and cmd files are not always considered executable in MSYS causing which
41622    # to not find them
41623    if test "x$new_path" = x \
41624        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41625        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41626      new_path="$path"
41627
41628  windows_path="$new_path"
41629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41630    unix_path=`$CYGPATH -u "$windows_path"`
41631    new_path="$unix_path"
41632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41634    new_path="$unix_path"
41635  fi
41636
41637    fi
41638
41639    if test "x$new_path" = x; then
41640      # It's still not found. Now this is an unrecoverable error.
41641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41642$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41643      has_space=`$ECHO "$complete" | $GREP " "`
41644      if test "x$has_space" != x; then
41645        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41646$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41647      fi
41648      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41649    fi
41650  fi
41651
41652  # Now new_path has a complete unix path to the binary
41653  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41654    # Keep paths in /bin as-is, but remove trailing .exe if any
41655    new_path="${new_path/%.exe/}"
41656    # Do not save /bin paths to all_fixpath_prefixes!
41657  else
41658    # Not in mixed or Windows style, start by that.
41659    new_path=`cmd //c echo $new_path`
41660
41661  input_path="$new_path"
41662  # Check if we need to convert this using DOS-style short mode. If the path
41663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41664  # take no chances and rewrite it.
41665  # Note: m4 eats our [], so we need to use [ and ] instead.
41666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41667  if test "x$has_forbidden_chars" != x; then
41668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41670  fi
41671
41672    # Output is in $new_path
41673
41674  windows_path="$new_path"
41675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41676    unix_path=`$CYGPATH -u "$windows_path"`
41677    new_path="$unix_path"
41678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41680    new_path="$unix_path"
41681  fi
41682
41683    # remove trailing .exe if any
41684    new_path="${new_path/%.exe/}"
41685
41686    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41687    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41688  fi
41689
41690    else
41691      # We're on a unix platform. Hooray! :)
41692      # First separate the path from the arguments. This will split at the first
41693      # space.
41694      complete="$NM"
41695      path="${complete%% *}"
41696      tmp="$complete EOL"
41697      arguments="${tmp#* }"
41698
41699      # Cannot rely on the command "which" here since it doesn't always work.
41700      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41701      if test -z "$is_absolute_path"; then
41702        # Path to executable is not absolute. Find it.
41703        IFS_save="$IFS"
41704        IFS=:
41705        for p in $PATH; do
41706          if test -f "$p/$path" && test -x "$p/$path"; then
41707            new_path="$p/$path"
41708            break
41709          fi
41710        done
41711        IFS="$IFS_save"
41712      else
41713        # This is an absolute path, we can use it without further modifications.
41714        new_path="$path"
41715      fi
41716
41717      if test "x$new_path" = x; then
41718        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41719$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41720        has_space=`$ECHO "$complete" | $GREP " "`
41721        if test "x$has_space" != x; then
41722          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41723$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41724        fi
41725        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41726      fi
41727    fi
41728
41729    # Now join together the path and the arguments once again
41730    if test "x$arguments" != xEOL; then
41731      new_complete="$new_path ${arguments% *}"
41732    else
41733      new_complete="$new_path"
41734    fi
41735
41736    if test "x$complete" != "x$new_complete"; then
41737      NM="$new_complete"
41738      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41739$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41740    fi
41741  fi
41742
41743    GNM="$NM"
41744
41745  fi
41746
41747  # objcopy is used for moving debug symbols to separate files when
41748  # full debug symbols are enabled.
41749  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
41750
41751
41752  # Publish this variable in the help.
41753
41754
41755  if [ -z "${OBJCOPY+x}" ]; then
41756    # The variable is not set by user, try to locate tool using the code snippet
41757    if test -n "$ac_tool_prefix"; then
41758  for ac_prog in gobjcopy objcopy
41759  do
41760    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41761set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41763$as_echo_n "checking for $ac_word... " >&6; }
41764if ${ac_cv_prog_OBJCOPY+:} false; then :
41765  $as_echo_n "(cached) " >&6
41766else
41767  if test -n "$OBJCOPY"; then
41768  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41769else
41770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41771for as_dir in $PATH
41772do
41773  IFS=$as_save_IFS
41774  test -z "$as_dir" && as_dir=.
41775    for ac_exec_ext in '' $ac_executable_extensions; do
41776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41777    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41779    break 2
41780  fi
41781done
41782  done
41783IFS=$as_save_IFS
41784
41785fi
41786fi
41787OBJCOPY=$ac_cv_prog_OBJCOPY
41788if test -n "$OBJCOPY"; then
41789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41790$as_echo "$OBJCOPY" >&6; }
41791else
41792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41793$as_echo "no" >&6; }
41794fi
41795
41796
41797    test -n "$OBJCOPY" && break
41798  done
41799fi
41800if test -z "$OBJCOPY"; then
41801  ac_ct_OBJCOPY=$OBJCOPY
41802  for ac_prog in gobjcopy objcopy
41803do
41804  # Extract the first word of "$ac_prog", so it can be a program name with args.
41805set dummy $ac_prog; ac_word=$2
41806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41807$as_echo_n "checking for $ac_word... " >&6; }
41808if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41809  $as_echo_n "(cached) " >&6
41810else
41811  if test -n "$ac_ct_OBJCOPY"; then
41812  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41813else
41814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41815for as_dir in $PATH
41816do
41817  IFS=$as_save_IFS
41818  test -z "$as_dir" && as_dir=.
41819    for ac_exec_ext in '' $ac_executable_extensions; do
41820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41821    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41823    break 2
41824  fi
41825done
41826  done
41827IFS=$as_save_IFS
41828
41829fi
41830fi
41831ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41832if test -n "$ac_ct_OBJCOPY"; then
41833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41834$as_echo "$ac_ct_OBJCOPY" >&6; }
41835else
41836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41837$as_echo "no" >&6; }
41838fi
41839
41840
41841  test -n "$ac_ct_OBJCOPY" && break
41842done
41843
41844  if test "x$ac_ct_OBJCOPY" = x; then
41845    OBJCOPY=""
41846  else
41847    case $cross_compiling:$ac_tool_warned in
41848yes:)
41849{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41850$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41851ac_tool_warned=yes ;;
41852esac
41853    OBJCOPY=$ac_ct_OBJCOPY
41854  fi
41855fi
41856
41857  else
41858    # The variable is set, but is it from the command line or the environment?
41859
41860    # Try to remove the string !OBJCOPY! from our list.
41861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
41862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41863      # If it failed, the variable was not from the command line. Ignore it,
41864      # but warn the user (except for BASH, which is always set by the calling BASH).
41865      if test "xOBJCOPY" != xBASH; then
41866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
41867$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
41868      fi
41869      # Try to locate tool using the code snippet
41870      if test -n "$ac_tool_prefix"; then
41871  for ac_prog in gobjcopy objcopy
41872  do
41873    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41874set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41876$as_echo_n "checking for $ac_word... " >&6; }
41877if ${ac_cv_prog_OBJCOPY+:} false; then :
41878  $as_echo_n "(cached) " >&6
41879else
41880  if test -n "$OBJCOPY"; then
41881  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
41882else
41883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41884for as_dir in $PATH
41885do
41886  IFS=$as_save_IFS
41887  test -z "$as_dir" && as_dir=.
41888    for ac_exec_ext in '' $ac_executable_extensions; do
41889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41890    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
41891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41892    break 2
41893  fi
41894done
41895  done
41896IFS=$as_save_IFS
41897
41898fi
41899fi
41900OBJCOPY=$ac_cv_prog_OBJCOPY
41901if test -n "$OBJCOPY"; then
41902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
41903$as_echo "$OBJCOPY" >&6; }
41904else
41905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41906$as_echo "no" >&6; }
41907fi
41908
41909
41910    test -n "$OBJCOPY" && break
41911  done
41912fi
41913if test -z "$OBJCOPY"; then
41914  ac_ct_OBJCOPY=$OBJCOPY
41915  for ac_prog in gobjcopy objcopy
41916do
41917  # Extract the first word of "$ac_prog", so it can be a program name with args.
41918set dummy $ac_prog; ac_word=$2
41919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41920$as_echo_n "checking for $ac_word... " >&6; }
41921if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
41922  $as_echo_n "(cached) " >&6
41923else
41924  if test -n "$ac_ct_OBJCOPY"; then
41925  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
41926else
41927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41928for as_dir in $PATH
41929do
41930  IFS=$as_save_IFS
41931  test -z "$as_dir" && as_dir=.
41932    for ac_exec_ext in '' $ac_executable_extensions; do
41933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41934    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
41935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41936    break 2
41937  fi
41938done
41939  done
41940IFS=$as_save_IFS
41941
41942fi
41943fi
41944ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
41945if test -n "$ac_ct_OBJCOPY"; then
41946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
41947$as_echo "$ac_ct_OBJCOPY" >&6; }
41948else
41949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41950$as_echo "no" >&6; }
41951fi
41952
41953
41954  test -n "$ac_ct_OBJCOPY" && break
41955done
41956
41957  if test "x$ac_ct_OBJCOPY" = x; then
41958    OBJCOPY=""
41959  else
41960    case $cross_compiling:$ac_tool_warned in
41961yes:)
41962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41964ac_tool_warned=yes ;;
41965esac
41966    OBJCOPY=$ac_ct_OBJCOPY
41967  fi
41968fi
41969
41970    else
41971      # If it succeeded, then it was overridden by the user. We will use it
41972      # for the tool.
41973
41974      # First remove it from the list of overridden variables, so we can test
41975      # for unknown variables in the end.
41976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41977
41978      # Check if we try to supply an empty value
41979      if test "x$OBJCOPY" = x; then
41980        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
41981$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
41982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
41983$as_echo_n "checking for OBJCOPY... " >&6; }
41984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41985$as_echo "disabled" >&6; }
41986      else
41987        # Check if the provided tool contains a complete path.
41988        tool_specified="$OBJCOPY"
41989        tool_basename="${tool_specified##*/}"
41990        if test "x$tool_basename" = "x$tool_specified"; then
41991          # A command without a complete path is provided, search $PATH.
41992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
41993$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
41994          # Extract the first word of "$tool_basename", so it can be a program name with args.
41995set dummy $tool_basename; ac_word=$2
41996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41997$as_echo_n "checking for $ac_word... " >&6; }
41998if ${ac_cv_path_OBJCOPY+:} false; then :
41999  $as_echo_n "(cached) " >&6
42000else
42001  case $OBJCOPY in
42002  [\\/]* | ?:[\\/]*)
42003  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42004  ;;
42005  *)
42006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42007for as_dir in $PATH
42008do
42009  IFS=$as_save_IFS
42010  test -z "$as_dir" && as_dir=.
42011    for ac_exec_ext in '' $ac_executable_extensions; do
42012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42013    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42015    break 2
42016  fi
42017done
42018  done
42019IFS=$as_save_IFS
42020
42021  ;;
42022esac
42023fi
42024OBJCOPY=$ac_cv_path_OBJCOPY
42025if test -n "$OBJCOPY"; then
42026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42027$as_echo "$OBJCOPY" >&6; }
42028else
42029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42030$as_echo "no" >&6; }
42031fi
42032
42033
42034          if test "x$OBJCOPY" = x; then
42035            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42036          fi
42037        else
42038          # Otherwise we believe it is a complete path. Use it as it is.
42039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42040$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42041          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42042$as_echo_n "checking for OBJCOPY... " >&6; }
42043          if test ! -x "$tool_specified"; then
42044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42045$as_echo "not found" >&6; }
42046            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42047          fi
42048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42049$as_echo "$tool_specified" >&6; }
42050        fi
42051      fi
42052    fi
42053
42054  fi
42055
42056
42057    # Only call fixup if objcopy was found.
42058    if test -n "$OBJCOPY"; then
42059
42060  # Only process if variable expands to non-empty
42061
42062  if test "x$OBJCOPY" != x; then
42063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42064
42065  # First separate the path from the arguments. This will split at the first
42066  # space.
42067  complete="$OBJCOPY"
42068  path="${complete%% *}"
42069  tmp="$complete EOL"
42070  arguments="${tmp#* }"
42071
42072  # Input might be given as Windows format, start by converting to
42073  # unix format.
42074  new_path=`$CYGPATH -u "$path"`
42075
42076  # Now try to locate executable using which
42077  new_path=`$WHICH "$new_path" 2> /dev/null`
42078  # bat and cmd files are not always considered executable in cygwin causing which
42079  # to not find them
42080  if test "x$new_path" = x \
42081      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42082      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42083    new_path=`$CYGPATH -u "$path"`
42084  fi
42085  if test "x$new_path" = x; then
42086    # Oops. Which didn't find the executable.
42087    # The splitting of arguments from the executable at a space might have been incorrect,
42088    # since paths with space are more likely in Windows. Give it another try with the whole
42089    # argument.
42090    path="$complete"
42091    arguments="EOL"
42092    new_path=`$CYGPATH -u "$path"`
42093    new_path=`$WHICH "$new_path" 2> /dev/null`
42094    # bat and cmd files are not always considered executable in cygwin causing which
42095    # to not find them
42096    if test "x$new_path" = x \
42097        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42098        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42099      new_path=`$CYGPATH -u "$path"`
42100    fi
42101    if test "x$new_path" = x; then
42102      # It's still not found. Now this is an unrecoverable error.
42103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42104$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42105      has_space=`$ECHO "$complete" | $GREP " "`
42106      if test "x$has_space" != x; then
42107        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42108$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42109      fi
42110      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42111    fi
42112  fi
42113
42114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42117  # "foo.exe" is OK but "foo" is an error.
42118  #
42119  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42120  # It is also a way to make sure we got the proper file name for the real test later on.
42121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42122  if test "x$test_shortpath" = x; then
42123    # Short path failed, file does not exist as specified.
42124    # Try adding .exe or .cmd
42125    if test -f "${new_path}.exe"; then
42126      input_to_shortpath="${new_path}.exe"
42127    elif test -f "${new_path}.cmd"; then
42128      input_to_shortpath="${new_path}.cmd"
42129    else
42130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42131$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42132      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42133$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42134      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42135    fi
42136  else
42137    input_to_shortpath="$new_path"
42138  fi
42139
42140  # Call helper function which possibly converts this using DOS-style short mode.
42141  # If so, the updated path is stored in $new_path.
42142  new_path="$input_to_shortpath"
42143
42144  input_path="$input_to_shortpath"
42145  # Check if we need to convert this using DOS-style short mode. If the path
42146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42147  # take no chances and rewrite it.
42148  # Note: m4 eats our [], so we need to use [ and ] instead.
42149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42150  if test "x$has_forbidden_chars" != x; then
42151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42155      # Going to short mode and back again did indeed matter. Since short mode is
42156      # case insensitive, let's make it lowercase to improve readability.
42157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42158      # Now convert it back to Unix-style (cygpath)
42159      input_path=`$CYGPATH -u "$shortmode_path"`
42160      new_path="$input_path"
42161    fi
42162  fi
42163
42164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42165  if test "x$test_cygdrive_prefix" = x; then
42166    # As a simple fix, exclude /usr/bin since it's not a real path.
42167    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42169      # a path prefixed by /cygdrive for fixpath to work.
42170      new_path="$CYGWIN_ROOT_PATH$input_path"
42171    fi
42172  fi
42173
42174  # remove trailing .exe if any
42175  new_path="${new_path/%.exe/}"
42176
42177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42178
42179  # First separate the path from the arguments. This will split at the first
42180  # space.
42181  complete="$OBJCOPY"
42182  path="${complete%% *}"
42183  tmp="$complete EOL"
42184  arguments="${tmp#* }"
42185
42186  # Input might be given as Windows format, start by converting to
42187  # unix format.
42188  new_path="$path"
42189
42190  windows_path="$new_path"
42191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42192    unix_path=`$CYGPATH -u "$windows_path"`
42193    new_path="$unix_path"
42194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42196    new_path="$unix_path"
42197  fi
42198
42199
42200  # Now try to locate executable using which
42201  new_path=`$WHICH "$new_path" 2> /dev/null`
42202
42203  if test "x$new_path" = x; then
42204    # Oops. Which didn't find the executable.
42205    # The splitting of arguments from the executable at a space might have been incorrect,
42206    # since paths with space are more likely in Windows. Give it another try with the whole
42207    # argument.
42208    path="$complete"
42209    arguments="EOL"
42210    new_path="$path"
42211
42212  windows_path="$new_path"
42213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42214    unix_path=`$CYGPATH -u "$windows_path"`
42215    new_path="$unix_path"
42216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42218    new_path="$unix_path"
42219  fi
42220
42221
42222    new_path=`$WHICH "$new_path" 2> /dev/null`
42223    # bat and cmd files are not always considered executable in MSYS causing which
42224    # to not find them
42225    if test "x$new_path" = x \
42226        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42227        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42228      new_path="$path"
42229
42230  windows_path="$new_path"
42231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42232    unix_path=`$CYGPATH -u "$windows_path"`
42233    new_path="$unix_path"
42234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42236    new_path="$unix_path"
42237  fi
42238
42239    fi
42240
42241    if test "x$new_path" = x; then
42242      # It's still not found. Now this is an unrecoverable error.
42243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42244$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42245      has_space=`$ECHO "$complete" | $GREP " "`
42246      if test "x$has_space" != x; then
42247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42249      fi
42250      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42251    fi
42252  fi
42253
42254  # Now new_path has a complete unix path to the binary
42255  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42256    # Keep paths in /bin as-is, but remove trailing .exe if any
42257    new_path="${new_path/%.exe/}"
42258    # Do not save /bin paths to all_fixpath_prefixes!
42259  else
42260    # Not in mixed or Windows style, start by that.
42261    new_path=`cmd //c echo $new_path`
42262
42263  input_path="$new_path"
42264  # Check if we need to convert this using DOS-style short mode. If the path
42265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42266  # take no chances and rewrite it.
42267  # Note: m4 eats our [], so we need to use [ and ] instead.
42268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42269  if test "x$has_forbidden_chars" != x; then
42270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42272  fi
42273
42274    # Output is in $new_path
42275
42276  windows_path="$new_path"
42277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42278    unix_path=`$CYGPATH -u "$windows_path"`
42279    new_path="$unix_path"
42280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42282    new_path="$unix_path"
42283  fi
42284
42285    # remove trailing .exe if any
42286    new_path="${new_path/%.exe/}"
42287
42288    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42289    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42290  fi
42291
42292    else
42293      # We're on a unix platform. Hooray! :)
42294      # First separate the path from the arguments. This will split at the first
42295      # space.
42296      complete="$OBJCOPY"
42297      path="${complete%% *}"
42298      tmp="$complete EOL"
42299      arguments="${tmp#* }"
42300
42301      # Cannot rely on the command "which" here since it doesn't always work.
42302      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42303      if test -z "$is_absolute_path"; then
42304        # Path to executable is not absolute. Find it.
42305        IFS_save="$IFS"
42306        IFS=:
42307        for p in $PATH; do
42308          if test -f "$p/$path" && test -x "$p/$path"; then
42309            new_path="$p/$path"
42310            break
42311          fi
42312        done
42313        IFS="$IFS_save"
42314      else
42315        # This is an absolute path, we can use it without further modifications.
42316        new_path="$path"
42317      fi
42318
42319      if test "x$new_path" = x; then
42320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42321$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42322        has_space=`$ECHO "$complete" | $GREP " "`
42323        if test "x$has_space" != x; then
42324          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42325$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42326        fi
42327        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42328      fi
42329    fi
42330
42331    # Now join together the path and the arguments once again
42332    if test "x$arguments" != xEOL; then
42333      new_complete="$new_path ${arguments% *}"
42334    else
42335      new_complete="$new_path"
42336    fi
42337
42338    if test "x$complete" != "x$new_complete"; then
42339      OBJCOPY="$new_complete"
42340      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42341$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42342    fi
42343  fi
42344
42345      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42346        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42347        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42348        # - version number is last blank separate word on first line
42349        # - version number formats that have been seen:
42350        #   - <major>.<minor>
42351        #   - <major>.<minor>.<micro>
42352        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42353        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42354         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42355              -e 's/.* //' \
42356              -e '/^[01]\./b bad' \
42357              -e '/^2\./{' \
42358              -e '  s/^2\.//' \
42359              -e '  /^[0-9]$/b bad' \
42360              -e '  /^[0-9]\./b bad' \
42361              -e '  /^1[0-9]$/b bad' \
42362              -e '  /^1[0-9]\./b bad' \
42363              -e '  /^20\./b bad' \
42364              -e '  /^21\.0$/b bad' \
42365              -e '  /^21\.0\./b bad' \
42366              -e '}' \
42367              -e ':good' \
42368              -e 's/.*/VALID_VERSION/p' \
42369              -e 'q' \
42370              -e ':bad' \
42371              -e 's/.*/BAD_VERSION/p' \
42372              -e 'q'`
42373        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42374          OBJCOPY=
42375          { $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
42376$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42377          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42378$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42379          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42380$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42381          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42382$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42383          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42384$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42385        fi
42386      fi
42387    fi
42388  fi
42389
42390
42391
42392  # Publish this variable in the help.
42393
42394
42395  if [ -z "${OBJDUMP+x}" ]; then
42396    # The variable is not set by user, try to locate tool using the code snippet
42397    if test -n "$ac_tool_prefix"; then
42398  for ac_prog in gobjdump objdump
42399  do
42400    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42401set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42403$as_echo_n "checking for $ac_word... " >&6; }
42404if ${ac_cv_prog_OBJDUMP+:} false; then :
42405  $as_echo_n "(cached) " >&6
42406else
42407  if test -n "$OBJDUMP"; then
42408  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42409else
42410as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42411for as_dir in $PATH
42412do
42413  IFS=$as_save_IFS
42414  test -z "$as_dir" && as_dir=.
42415    for ac_exec_ext in '' $ac_executable_extensions; do
42416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42417    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42419    break 2
42420  fi
42421done
42422  done
42423IFS=$as_save_IFS
42424
42425fi
42426fi
42427OBJDUMP=$ac_cv_prog_OBJDUMP
42428if test -n "$OBJDUMP"; then
42429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42430$as_echo "$OBJDUMP" >&6; }
42431else
42432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42433$as_echo "no" >&6; }
42434fi
42435
42436
42437    test -n "$OBJDUMP" && break
42438  done
42439fi
42440if test -z "$OBJDUMP"; then
42441  ac_ct_OBJDUMP=$OBJDUMP
42442  for ac_prog in gobjdump objdump
42443do
42444  # Extract the first word of "$ac_prog", so it can be a program name with args.
42445set dummy $ac_prog; ac_word=$2
42446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42447$as_echo_n "checking for $ac_word... " >&6; }
42448if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42449  $as_echo_n "(cached) " >&6
42450else
42451  if test -n "$ac_ct_OBJDUMP"; then
42452  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42453else
42454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42455for as_dir in $PATH
42456do
42457  IFS=$as_save_IFS
42458  test -z "$as_dir" && as_dir=.
42459    for ac_exec_ext in '' $ac_executable_extensions; do
42460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42461    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42463    break 2
42464  fi
42465done
42466  done
42467IFS=$as_save_IFS
42468
42469fi
42470fi
42471ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42472if test -n "$ac_ct_OBJDUMP"; then
42473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42474$as_echo "$ac_ct_OBJDUMP" >&6; }
42475else
42476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42477$as_echo "no" >&6; }
42478fi
42479
42480
42481  test -n "$ac_ct_OBJDUMP" && break
42482done
42483
42484  if test "x$ac_ct_OBJDUMP" = x; then
42485    OBJDUMP=""
42486  else
42487    case $cross_compiling:$ac_tool_warned in
42488yes:)
42489{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42490$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42491ac_tool_warned=yes ;;
42492esac
42493    OBJDUMP=$ac_ct_OBJDUMP
42494  fi
42495fi
42496
42497  else
42498    # The variable is set, but is it from the command line or the environment?
42499
42500    # Try to remove the string !OBJDUMP! from our list.
42501    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42502    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42503      # If it failed, the variable was not from the command line. Ignore it,
42504      # but warn the user (except for BASH, which is always set by the calling BASH).
42505      if test "xOBJDUMP" != xBASH; then
42506        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42507$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42508      fi
42509      # Try to locate tool using the code snippet
42510      if test -n "$ac_tool_prefix"; then
42511  for ac_prog in gobjdump objdump
42512  do
42513    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42514set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42516$as_echo_n "checking for $ac_word... " >&6; }
42517if ${ac_cv_prog_OBJDUMP+:} false; then :
42518  $as_echo_n "(cached) " >&6
42519else
42520  if test -n "$OBJDUMP"; then
42521  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42522else
42523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42524for as_dir in $PATH
42525do
42526  IFS=$as_save_IFS
42527  test -z "$as_dir" && as_dir=.
42528    for ac_exec_ext in '' $ac_executable_extensions; do
42529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42530    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42532    break 2
42533  fi
42534done
42535  done
42536IFS=$as_save_IFS
42537
42538fi
42539fi
42540OBJDUMP=$ac_cv_prog_OBJDUMP
42541if test -n "$OBJDUMP"; then
42542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42543$as_echo "$OBJDUMP" >&6; }
42544else
42545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42546$as_echo "no" >&6; }
42547fi
42548
42549
42550    test -n "$OBJDUMP" && break
42551  done
42552fi
42553if test -z "$OBJDUMP"; then
42554  ac_ct_OBJDUMP=$OBJDUMP
42555  for ac_prog in gobjdump objdump
42556do
42557  # Extract the first word of "$ac_prog", so it can be a program name with args.
42558set dummy $ac_prog; ac_word=$2
42559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42560$as_echo_n "checking for $ac_word... " >&6; }
42561if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42562  $as_echo_n "(cached) " >&6
42563else
42564  if test -n "$ac_ct_OBJDUMP"; then
42565  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42566else
42567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42568for as_dir in $PATH
42569do
42570  IFS=$as_save_IFS
42571  test -z "$as_dir" && as_dir=.
42572    for ac_exec_ext in '' $ac_executable_extensions; do
42573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42574    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42576    break 2
42577  fi
42578done
42579  done
42580IFS=$as_save_IFS
42581
42582fi
42583fi
42584ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42585if test -n "$ac_ct_OBJDUMP"; then
42586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42587$as_echo "$ac_ct_OBJDUMP" >&6; }
42588else
42589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42590$as_echo "no" >&6; }
42591fi
42592
42593
42594  test -n "$ac_ct_OBJDUMP" && break
42595done
42596
42597  if test "x$ac_ct_OBJDUMP" = x; then
42598    OBJDUMP=""
42599  else
42600    case $cross_compiling:$ac_tool_warned in
42601yes:)
42602{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42603$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42604ac_tool_warned=yes ;;
42605esac
42606    OBJDUMP=$ac_ct_OBJDUMP
42607  fi
42608fi
42609
42610    else
42611      # If it succeeded, then it was overridden by the user. We will use it
42612      # for the tool.
42613
42614      # First remove it from the list of overridden variables, so we can test
42615      # for unknown variables in the end.
42616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42617
42618      # Check if we try to supply an empty value
42619      if test "x$OBJDUMP" = x; then
42620        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42621$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42623$as_echo_n "checking for OBJDUMP... " >&6; }
42624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42625$as_echo "disabled" >&6; }
42626      else
42627        # Check if the provided tool contains a complete path.
42628        tool_specified="$OBJDUMP"
42629        tool_basename="${tool_specified##*/}"
42630        if test "x$tool_basename" = "x$tool_specified"; then
42631          # A command without a complete path is provided, search $PATH.
42632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42633$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42634          # Extract the first word of "$tool_basename", so it can be a program name with args.
42635set dummy $tool_basename; ac_word=$2
42636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42637$as_echo_n "checking for $ac_word... " >&6; }
42638if ${ac_cv_path_OBJDUMP+:} false; then :
42639  $as_echo_n "(cached) " >&6
42640else
42641  case $OBJDUMP in
42642  [\\/]* | ?:[\\/]*)
42643  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42644  ;;
42645  *)
42646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42647for as_dir in $PATH
42648do
42649  IFS=$as_save_IFS
42650  test -z "$as_dir" && as_dir=.
42651    for ac_exec_ext in '' $ac_executable_extensions; do
42652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42653    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42655    break 2
42656  fi
42657done
42658  done
42659IFS=$as_save_IFS
42660
42661  ;;
42662esac
42663fi
42664OBJDUMP=$ac_cv_path_OBJDUMP
42665if test -n "$OBJDUMP"; then
42666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42667$as_echo "$OBJDUMP" >&6; }
42668else
42669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42670$as_echo "no" >&6; }
42671fi
42672
42673
42674          if test "x$OBJDUMP" = x; then
42675            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42676          fi
42677        else
42678          # Otherwise we believe it is a complete path. Use it as it is.
42679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42680$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42681          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42682$as_echo_n "checking for OBJDUMP... " >&6; }
42683          if test ! -x "$tool_specified"; then
42684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42685$as_echo "not found" >&6; }
42686            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42687          fi
42688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42689$as_echo "$tool_specified" >&6; }
42690        fi
42691      fi
42692    fi
42693
42694  fi
42695
42696
42697  if test "x$OBJDUMP" != x; then
42698    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42699    # bails if argument is missing.
42700
42701  # Only process if variable expands to non-empty
42702
42703  if test "x$OBJDUMP" != x; then
42704    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42705
42706  # First separate the path from the arguments. This will split at the first
42707  # space.
42708  complete="$OBJDUMP"
42709  path="${complete%% *}"
42710  tmp="$complete EOL"
42711  arguments="${tmp#* }"
42712
42713  # Input might be given as Windows format, start by converting to
42714  # unix format.
42715  new_path=`$CYGPATH -u "$path"`
42716
42717  # Now try to locate executable using which
42718  new_path=`$WHICH "$new_path" 2> /dev/null`
42719  # bat and cmd files are not always considered executable in cygwin causing which
42720  # to not find them
42721  if test "x$new_path" = x \
42722      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42723      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42724    new_path=`$CYGPATH -u "$path"`
42725  fi
42726  if test "x$new_path" = x; then
42727    # Oops. Which didn't find the executable.
42728    # The splitting of arguments from the executable at a space might have been incorrect,
42729    # since paths with space are more likely in Windows. Give it another try with the whole
42730    # argument.
42731    path="$complete"
42732    arguments="EOL"
42733    new_path=`$CYGPATH -u "$path"`
42734    new_path=`$WHICH "$new_path" 2> /dev/null`
42735    # bat and cmd files are not always considered executable in cygwin causing which
42736    # to not find them
42737    if test "x$new_path" = x \
42738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42740      new_path=`$CYGPATH -u "$path"`
42741    fi
42742    if test "x$new_path" = x; then
42743      # It's still not found. Now this is an unrecoverable error.
42744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42745$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42746      has_space=`$ECHO "$complete" | $GREP " "`
42747      if test "x$has_space" != x; then
42748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42750      fi
42751      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42752    fi
42753  fi
42754
42755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42758  # "foo.exe" is OK but "foo" is an error.
42759  #
42760  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42761  # It is also a way to make sure we got the proper file name for the real test later on.
42762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42763  if test "x$test_shortpath" = x; then
42764    # Short path failed, file does not exist as specified.
42765    # Try adding .exe or .cmd
42766    if test -f "${new_path}.exe"; then
42767      input_to_shortpath="${new_path}.exe"
42768    elif test -f "${new_path}.cmd"; then
42769      input_to_shortpath="${new_path}.cmd"
42770    else
42771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
42772$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
42773      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42774$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42775      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42776    fi
42777  else
42778    input_to_shortpath="$new_path"
42779  fi
42780
42781  # Call helper function which possibly converts this using DOS-style short mode.
42782  # If so, the updated path is stored in $new_path.
42783  new_path="$input_to_shortpath"
42784
42785  input_path="$input_to_shortpath"
42786  # Check if we need to convert this using DOS-style short mode. If the path
42787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42788  # take no chances and rewrite it.
42789  # Note: m4 eats our [], so we need to use [ and ] instead.
42790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42791  if test "x$has_forbidden_chars" != x; then
42792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42796      # Going to short mode and back again did indeed matter. Since short mode is
42797      # case insensitive, let's make it lowercase to improve readability.
42798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42799      # Now convert it back to Unix-style (cygpath)
42800      input_path=`$CYGPATH -u "$shortmode_path"`
42801      new_path="$input_path"
42802    fi
42803  fi
42804
42805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42806  if test "x$test_cygdrive_prefix" = x; then
42807    # As a simple fix, exclude /usr/bin since it's not a real path.
42808    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42810      # a path prefixed by /cygdrive for fixpath to work.
42811      new_path="$CYGWIN_ROOT_PATH$input_path"
42812    fi
42813  fi
42814
42815  # remove trailing .exe if any
42816  new_path="${new_path/%.exe/}"
42817
42818    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42819
42820  # First separate the path from the arguments. This will split at the first
42821  # space.
42822  complete="$OBJDUMP"
42823  path="${complete%% *}"
42824  tmp="$complete EOL"
42825  arguments="${tmp#* }"
42826
42827  # Input might be given as Windows format, start by converting to
42828  # unix format.
42829  new_path="$path"
42830
42831  windows_path="$new_path"
42832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42833    unix_path=`$CYGPATH -u "$windows_path"`
42834    new_path="$unix_path"
42835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42837    new_path="$unix_path"
42838  fi
42839
42840
42841  # Now try to locate executable using which
42842  new_path=`$WHICH "$new_path" 2> /dev/null`
42843
42844  if test "x$new_path" = x; then
42845    # Oops. Which didn't find the executable.
42846    # The splitting of arguments from the executable at a space might have been incorrect,
42847    # since paths with space are more likely in Windows. Give it another try with the whole
42848    # argument.
42849    path="$complete"
42850    arguments="EOL"
42851    new_path="$path"
42852
42853  windows_path="$new_path"
42854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42855    unix_path=`$CYGPATH -u "$windows_path"`
42856    new_path="$unix_path"
42857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42859    new_path="$unix_path"
42860  fi
42861
42862
42863    new_path=`$WHICH "$new_path" 2> /dev/null`
42864    # bat and cmd files are not always considered executable in MSYS causing which
42865    # to not find them
42866    if test "x$new_path" = x \
42867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42869      new_path="$path"
42870
42871  windows_path="$new_path"
42872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42873    unix_path=`$CYGPATH -u "$windows_path"`
42874    new_path="$unix_path"
42875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42877    new_path="$unix_path"
42878  fi
42879
42880    fi
42881
42882    if test "x$new_path" = x; then
42883      # It's still not found. Now this is an unrecoverable error.
42884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42885$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42886      has_space=`$ECHO "$complete" | $GREP " "`
42887      if test "x$has_space" != x; then
42888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42890      fi
42891      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42892    fi
42893  fi
42894
42895  # Now new_path has a complete unix path to the binary
42896  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42897    # Keep paths in /bin as-is, but remove trailing .exe if any
42898    new_path="${new_path/%.exe/}"
42899    # Do not save /bin paths to all_fixpath_prefixes!
42900  else
42901    # Not in mixed or Windows style, start by that.
42902    new_path=`cmd //c echo $new_path`
42903
42904  input_path="$new_path"
42905  # Check if we need to convert this using DOS-style short mode. If the path
42906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42907  # take no chances and rewrite it.
42908  # Note: m4 eats our [], so we need to use [ and ] instead.
42909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42910  if test "x$has_forbidden_chars" != x; then
42911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42913  fi
42914
42915    # Output is in $new_path
42916
42917  windows_path="$new_path"
42918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42919    unix_path=`$CYGPATH -u "$windows_path"`
42920    new_path="$unix_path"
42921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42923    new_path="$unix_path"
42924  fi
42925
42926    # remove trailing .exe if any
42927    new_path="${new_path/%.exe/}"
42928
42929    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42930    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42931  fi
42932
42933    else
42934      # We're on a unix platform. Hooray! :)
42935      # First separate the path from the arguments. This will split at the first
42936      # space.
42937      complete="$OBJDUMP"
42938      path="${complete%% *}"
42939      tmp="$complete EOL"
42940      arguments="${tmp#* }"
42941
42942      # Cannot rely on the command "which" here since it doesn't always work.
42943      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42944      if test -z "$is_absolute_path"; then
42945        # Path to executable is not absolute. Find it.
42946        IFS_save="$IFS"
42947        IFS=:
42948        for p in $PATH; do
42949          if test -f "$p/$path" && test -x "$p/$path"; then
42950            new_path="$p/$path"
42951            break
42952          fi
42953        done
42954        IFS="$IFS_save"
42955      else
42956        # This is an absolute path, we can use it without further modifications.
42957        new_path="$path"
42958      fi
42959
42960      if test "x$new_path" = x; then
42961        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
42962$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
42963        has_space=`$ECHO "$complete" | $GREP " "`
42964        if test "x$has_space" != x; then
42965          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42966$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42967        fi
42968        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
42969      fi
42970    fi
42971
42972    # Now join together the path and the arguments once again
42973    if test "x$arguments" != xEOL; then
42974      new_complete="$new_path ${arguments% *}"
42975    else
42976      new_complete="$new_path"
42977    fi
42978
42979    if test "x$complete" != "x$new_complete"; then
42980      OBJDUMP="$new_complete"
42981      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
42982$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
42983    fi
42984  fi
42985
42986  fi
42987
42988
42989  # Restore old path.
42990  PATH="$OLD_PATH"
42991
42992  # Restore the flags to the user specified values.
42993  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
42994  CFLAGS="$ORG_CFLAGS"
42995  CXXFLAGS="$ORG_CXXFLAGS"
42996
42997
42998# Finally do some processing after the detection phase
42999
43000  if test "x$COMPILE_TYPE" = "xcross"; then
43001    # Now we need to find a C/C++ compiler that can build executables for the
43002    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43003    # used once. Also, we need to do this without adding a tools dir to the
43004    # path, otherwise we might pick up cross-compilers which don't use standard
43005    # naming.
43006
43007    OLDPATH="$PATH"
43008
43009
43010# Check whether --with-build-devkit was given.
43011if test "${with_build_devkit+set}" = set; then :
43012  withval=$with_build_devkit;
43013fi
43014
43015    if test "x$with_build_devkit" = "xyes"; then
43016      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43017    elif test -n "$with_build_devkit"; then
43018      if test ! -d "$with_build_devkit"; then
43019        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43020      else
43021
43022  # Only process if variable expands to non-empty
43023
43024  if test "x$with_build_devkit" != x; then
43025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43026
43027  # Input might be given as Windows format, start by converting to
43028  # unix format.
43029  path="$with_build_devkit"
43030  new_path=`$CYGPATH -u "$path"`
43031
43032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43035  # "foo.exe" is OK but "foo" is an error.
43036  #
43037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43038  # It is also a way to make sure we got the proper file name for the real test later on.
43039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43040  if test "x$test_shortpath" = x; then
43041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43042$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43043    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43044  fi
43045
43046  # Call helper function which possibly converts this using DOS-style short mode.
43047  # If so, the updated path is stored in $new_path.
43048
43049  input_path="$new_path"
43050  # Check if we need to convert this using DOS-style short mode. If the path
43051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43052  # take no chances and rewrite it.
43053  # Note: m4 eats our [], so we need to use [ and ] instead.
43054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43055  if test "x$has_forbidden_chars" != x; then
43056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43060      # Going to short mode and back again did indeed matter. Since short mode is
43061      # case insensitive, let's make it lowercase to improve readability.
43062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43063      # Now convert it back to Unix-style (cygpath)
43064      input_path=`$CYGPATH -u "$shortmode_path"`
43065      new_path="$input_path"
43066    fi
43067  fi
43068
43069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43070  if test "x$test_cygdrive_prefix" = x; then
43071    # As a simple fix, exclude /usr/bin since it's not a real path.
43072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43074      # a path prefixed by /cygdrive for fixpath to work.
43075      new_path="$CYGWIN_ROOT_PATH$input_path"
43076    fi
43077  fi
43078
43079
43080  if test "x$path" != "x$new_path"; then
43081    with_build_devkit="$new_path"
43082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43083$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43084  fi
43085
43086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43087
43088  path="$with_build_devkit"
43089  has_colon=`$ECHO $path | $GREP ^.:`
43090  new_path="$path"
43091  if test "x$has_colon" = x; then
43092    # Not in mixed or Windows style, start by that.
43093    new_path=`cmd //c echo $path`
43094  fi
43095
43096
43097  input_path="$new_path"
43098  # Check if we need to convert this using DOS-style short mode. If the path
43099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43100  # take no chances and rewrite it.
43101  # Note: m4 eats our [], so we need to use [ and ] instead.
43102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43103  if test "x$has_forbidden_chars" != x; then
43104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43106  fi
43107
43108
43109  windows_path="$new_path"
43110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43111    unix_path=`$CYGPATH -u "$windows_path"`
43112    new_path="$unix_path"
43113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43115    new_path="$unix_path"
43116  fi
43117
43118  if test "x$path" != "x$new_path"; then
43119    with_build_devkit="$new_path"
43120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43121$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43122  fi
43123
43124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43126
43127    else
43128      # We're on a unix platform. Hooray! :)
43129      path="$with_build_devkit"
43130      has_space=`$ECHO "$path" | $GREP " "`
43131      if test "x$has_space" != x; then
43132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43133$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43135      fi
43136
43137      # Use eval to expand a potential ~
43138      eval path="$path"
43139      if test ! -f "$path" && test ! -d "$path"; then
43140        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43141      fi
43142
43143      if test -d "$path"; then
43144        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43145      else
43146        dir="`$DIRNAME "$path"`"
43147        base="`$BASENAME "$path"`"
43148        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43149      fi
43150    fi
43151  fi
43152
43153        BUILD_DEVKIT_ROOT="$with_build_devkit"
43154        # Check for a meta data info file in the root of the devkit
43155        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43156          # Process devkit.info so that existing devkit variables are not
43157          # modified by this
43158          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43159              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43160              -e "s/\$host/\$build/g" \
43161              $BUILD_DEVKIT_ROOT/devkit.info \
43162              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43163          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43164          # This potentially sets the following:
43165          # A descriptive name of the devkit
43166
43167  if test "x$BUILD_DEVKIT_NAME" = x; then
43168    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43169  fi
43170
43171          # Corresponds to --with-extra-path
43172
43173  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43174    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43175  fi
43176
43177          # Corresponds to --with-toolchain-path
43178
43179  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43180    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43181  fi
43182
43183          # Corresponds to --with-sysroot
43184
43185  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43186    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43187  fi
43188
43189          # Skip the Window specific parts
43190        fi
43191
43192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43193$as_echo_n "checking for build platform devkit... " >&6; }
43194        if test "x$BUILD_DEVKIT_NAME" != x; then
43195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43196$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43197        else
43198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43199$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43200        fi
43201
43202        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43203
43204  if test "x$BUILD_SYSROOT" != "x"; then
43205    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43206      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43207        # Solaris Studio does not have a concept of sysroot. Instead we must
43208        # make sure the default include and lib dirs are appended to each
43209        # compile and link command line.
43210        BUILD_SYSROOT_CFLAGS="-I$BUILD_SYSROOT/usr/include"
43211        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43212            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43213            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43214      fi
43215    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43216      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43217      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43218    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43219      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43220      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43221    fi
43222    # Propagate the sysroot args to hotspot
43223    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43224    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43225    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43226    # The global CFLAGS and LDFLAGS variables need these for configure to function
43227    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43228    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43229    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43230    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43231  fi
43232
43233  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43234    # We also need -iframework<path>/System/Library/Frameworks
43235    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43236    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43237    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43238    # set this here so it doesn't have to be peppered throughout the forest
43239    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43240    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43241  fi
43242
43243
43244
43245
43246
43247         # Fallback default of just /bin if DEVKIT_PATH is not defined
43248        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43249          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43250        fi
43251        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43252      fi
43253    fi
43254
43255    # FIXME: we should list the discovered compilers as an exclude pattern!
43256    # If we do that, we can do this detection before POST_DETECTION, and still
43257    # find the build compilers in the tools dir, if needed.
43258
43259
43260
43261  # Publish this variable in the help.
43262
43263
43264  if [ -z "${BUILD_CC+x}" ]; then
43265    # The variable is not set by user, try to locate tool using the code snippet
43266    for ac_prog in cl cc gcc
43267do
43268  # Extract the first word of "$ac_prog", so it can be a program name with args.
43269set dummy $ac_prog; ac_word=$2
43270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43271$as_echo_n "checking for $ac_word... " >&6; }
43272if ${ac_cv_path_BUILD_CC+:} false; then :
43273  $as_echo_n "(cached) " >&6
43274else
43275  case $BUILD_CC in
43276  [\\/]* | ?:[\\/]*)
43277  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43278  ;;
43279  *)
43280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43281for as_dir in $PATH
43282do
43283  IFS=$as_save_IFS
43284  test -z "$as_dir" && as_dir=.
43285    for ac_exec_ext in '' $ac_executable_extensions; do
43286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43287    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43289    break 2
43290  fi
43291done
43292  done
43293IFS=$as_save_IFS
43294
43295  ;;
43296esac
43297fi
43298BUILD_CC=$ac_cv_path_BUILD_CC
43299if test -n "$BUILD_CC"; then
43300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43301$as_echo "$BUILD_CC" >&6; }
43302else
43303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43304$as_echo "no" >&6; }
43305fi
43306
43307
43308  test -n "$BUILD_CC" && break
43309done
43310
43311  else
43312    # The variable is set, but is it from the command line or the environment?
43313
43314    # Try to remove the string !BUILD_CC! from our list.
43315    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43316    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43317      # If it failed, the variable was not from the command line. Ignore it,
43318      # but warn the user (except for BASH, which is always set by the calling BASH).
43319      if test "xBUILD_CC" != xBASH; then
43320        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43321$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43322      fi
43323      # Try to locate tool using the code snippet
43324      for ac_prog in cl cc gcc
43325do
43326  # Extract the first word of "$ac_prog", so it can be a program name with args.
43327set dummy $ac_prog; ac_word=$2
43328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43329$as_echo_n "checking for $ac_word... " >&6; }
43330if ${ac_cv_path_BUILD_CC+:} false; then :
43331  $as_echo_n "(cached) " >&6
43332else
43333  case $BUILD_CC in
43334  [\\/]* | ?:[\\/]*)
43335  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43336  ;;
43337  *)
43338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43339for as_dir in $PATH
43340do
43341  IFS=$as_save_IFS
43342  test -z "$as_dir" && as_dir=.
43343    for ac_exec_ext in '' $ac_executable_extensions; do
43344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43345    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43347    break 2
43348  fi
43349done
43350  done
43351IFS=$as_save_IFS
43352
43353  ;;
43354esac
43355fi
43356BUILD_CC=$ac_cv_path_BUILD_CC
43357if test -n "$BUILD_CC"; then
43358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43359$as_echo "$BUILD_CC" >&6; }
43360else
43361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43362$as_echo "no" >&6; }
43363fi
43364
43365
43366  test -n "$BUILD_CC" && break
43367done
43368
43369    else
43370      # If it succeeded, then it was overridden by the user. We will use it
43371      # for the tool.
43372
43373      # First remove it from the list of overridden variables, so we can test
43374      # for unknown variables in the end.
43375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43376
43377      # Check if we try to supply an empty value
43378      if test "x$BUILD_CC" = x; then
43379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43380$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43382$as_echo_n "checking for BUILD_CC... " >&6; }
43383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43384$as_echo "disabled" >&6; }
43385      else
43386        # Check if the provided tool contains a complete path.
43387        tool_specified="$BUILD_CC"
43388        tool_basename="${tool_specified##*/}"
43389        if test "x$tool_basename" = "x$tool_specified"; then
43390          # A command without a complete path is provided, search $PATH.
43391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43392$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43393          # Extract the first word of "$tool_basename", so it can be a program name with args.
43394set dummy $tool_basename; ac_word=$2
43395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43396$as_echo_n "checking for $ac_word... " >&6; }
43397if ${ac_cv_path_BUILD_CC+:} false; then :
43398  $as_echo_n "(cached) " >&6
43399else
43400  case $BUILD_CC in
43401  [\\/]* | ?:[\\/]*)
43402  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43403  ;;
43404  *)
43405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43406for as_dir in $PATH
43407do
43408  IFS=$as_save_IFS
43409  test -z "$as_dir" && as_dir=.
43410    for ac_exec_ext in '' $ac_executable_extensions; do
43411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43412    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43414    break 2
43415  fi
43416done
43417  done
43418IFS=$as_save_IFS
43419
43420  ;;
43421esac
43422fi
43423BUILD_CC=$ac_cv_path_BUILD_CC
43424if test -n "$BUILD_CC"; then
43425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43426$as_echo "$BUILD_CC" >&6; }
43427else
43428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43429$as_echo "no" >&6; }
43430fi
43431
43432
43433          if test "x$BUILD_CC" = x; then
43434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43435          fi
43436        else
43437          # Otherwise we believe it is a complete path. Use it as it is.
43438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43439$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43441$as_echo_n "checking for BUILD_CC... " >&6; }
43442          if test ! -x "$tool_specified"; then
43443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43444$as_echo "not found" >&6; }
43445            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43446          fi
43447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43448$as_echo "$tool_specified" >&6; }
43449        fi
43450      fi
43451    fi
43452
43453  fi
43454
43455
43456
43457  if test "x$BUILD_CC" = x; then
43458    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43459  fi
43460
43461
43462
43463  # Only process if variable expands to non-empty
43464
43465  if test "x$BUILD_CC" != x; then
43466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43467
43468  # First separate the path from the arguments. This will split at the first
43469  # space.
43470  complete="$BUILD_CC"
43471  path="${complete%% *}"
43472  tmp="$complete EOL"
43473  arguments="${tmp#* }"
43474
43475  # Input might be given as Windows format, start by converting to
43476  # unix format.
43477  new_path=`$CYGPATH -u "$path"`
43478
43479  # Now try to locate executable using which
43480  new_path=`$WHICH "$new_path" 2> /dev/null`
43481  # bat and cmd files are not always considered executable in cygwin causing which
43482  # to not find them
43483  if test "x$new_path" = x \
43484      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43485      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43486    new_path=`$CYGPATH -u "$path"`
43487  fi
43488  if test "x$new_path" = x; then
43489    # Oops. Which didn't find the executable.
43490    # The splitting of arguments from the executable at a space might have been incorrect,
43491    # since paths with space are more likely in Windows. Give it another try with the whole
43492    # argument.
43493    path="$complete"
43494    arguments="EOL"
43495    new_path=`$CYGPATH -u "$path"`
43496    new_path=`$WHICH "$new_path" 2> /dev/null`
43497    # bat and cmd files are not always considered executable in cygwin causing which
43498    # to not find them
43499    if test "x$new_path" = x \
43500        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43501        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43502      new_path=`$CYGPATH -u "$path"`
43503    fi
43504    if test "x$new_path" = x; then
43505      # It's still not found. Now this is an unrecoverable error.
43506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43507$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43508      has_space=`$ECHO "$complete" | $GREP " "`
43509      if test "x$has_space" != x; then
43510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43512      fi
43513      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43514    fi
43515  fi
43516
43517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43520  # "foo.exe" is OK but "foo" is an error.
43521  #
43522  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43523  # It is also a way to make sure we got the proper file name for the real test later on.
43524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43525  if test "x$test_shortpath" = x; then
43526    # Short path failed, file does not exist as specified.
43527    # Try adding .exe or .cmd
43528    if test -f "${new_path}.exe"; then
43529      input_to_shortpath="${new_path}.exe"
43530    elif test -f "${new_path}.cmd"; then
43531      input_to_shortpath="${new_path}.cmd"
43532    else
43533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43534$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43535      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43536$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43537      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43538    fi
43539  else
43540    input_to_shortpath="$new_path"
43541  fi
43542
43543  # Call helper function which possibly converts this using DOS-style short mode.
43544  # If so, the updated path is stored in $new_path.
43545  new_path="$input_to_shortpath"
43546
43547  input_path="$input_to_shortpath"
43548  # Check if we need to convert this using DOS-style short mode. If the path
43549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43550  # take no chances and rewrite it.
43551  # Note: m4 eats our [], so we need to use [ and ] instead.
43552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43553  if test "x$has_forbidden_chars" != x; then
43554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43558      # Going to short mode and back again did indeed matter. Since short mode is
43559      # case insensitive, let's make it lowercase to improve readability.
43560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43561      # Now convert it back to Unix-style (cygpath)
43562      input_path=`$CYGPATH -u "$shortmode_path"`
43563      new_path="$input_path"
43564    fi
43565  fi
43566
43567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43568  if test "x$test_cygdrive_prefix" = x; then
43569    # As a simple fix, exclude /usr/bin since it's not a real path.
43570    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43572      # a path prefixed by /cygdrive for fixpath to work.
43573      new_path="$CYGWIN_ROOT_PATH$input_path"
43574    fi
43575  fi
43576
43577  # remove trailing .exe if any
43578  new_path="${new_path/%.exe/}"
43579
43580    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43581
43582  # First separate the path from the arguments. This will split at the first
43583  # space.
43584  complete="$BUILD_CC"
43585  path="${complete%% *}"
43586  tmp="$complete EOL"
43587  arguments="${tmp#* }"
43588
43589  # Input might be given as Windows format, start by converting to
43590  # unix format.
43591  new_path="$path"
43592
43593  windows_path="$new_path"
43594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43595    unix_path=`$CYGPATH -u "$windows_path"`
43596    new_path="$unix_path"
43597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43599    new_path="$unix_path"
43600  fi
43601
43602
43603  # Now try to locate executable using which
43604  new_path=`$WHICH "$new_path" 2> /dev/null`
43605
43606  if test "x$new_path" = x; then
43607    # Oops. Which didn't find the executable.
43608    # The splitting of arguments from the executable at a space might have been incorrect,
43609    # since paths with space are more likely in Windows. Give it another try with the whole
43610    # argument.
43611    path="$complete"
43612    arguments="EOL"
43613    new_path="$path"
43614
43615  windows_path="$new_path"
43616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43617    unix_path=`$CYGPATH -u "$windows_path"`
43618    new_path="$unix_path"
43619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43621    new_path="$unix_path"
43622  fi
43623
43624
43625    new_path=`$WHICH "$new_path" 2> /dev/null`
43626    # bat and cmd files are not always considered executable in MSYS causing which
43627    # to not find them
43628    if test "x$new_path" = x \
43629        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43630        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43631      new_path="$path"
43632
43633  windows_path="$new_path"
43634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43635    unix_path=`$CYGPATH -u "$windows_path"`
43636    new_path="$unix_path"
43637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43639    new_path="$unix_path"
43640  fi
43641
43642    fi
43643
43644    if test "x$new_path" = x; then
43645      # It's still not found. Now this is an unrecoverable error.
43646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43647$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43648      has_space=`$ECHO "$complete" | $GREP " "`
43649      if test "x$has_space" != x; then
43650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43652      fi
43653      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43654    fi
43655  fi
43656
43657  # Now new_path has a complete unix path to the binary
43658  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43659    # Keep paths in /bin as-is, but remove trailing .exe if any
43660    new_path="${new_path/%.exe/}"
43661    # Do not save /bin paths to all_fixpath_prefixes!
43662  else
43663    # Not in mixed or Windows style, start by that.
43664    new_path=`cmd //c echo $new_path`
43665
43666  input_path="$new_path"
43667  # Check if we need to convert this using DOS-style short mode. If the path
43668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43669  # take no chances and rewrite it.
43670  # Note: m4 eats our [], so we need to use [ and ] instead.
43671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43672  if test "x$has_forbidden_chars" != x; then
43673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43675  fi
43676
43677    # Output is in $new_path
43678
43679  windows_path="$new_path"
43680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43681    unix_path=`$CYGPATH -u "$windows_path"`
43682    new_path="$unix_path"
43683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43685    new_path="$unix_path"
43686  fi
43687
43688    # remove trailing .exe if any
43689    new_path="${new_path/%.exe/}"
43690
43691    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43692    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43693  fi
43694
43695    else
43696      # We're on a unix platform. Hooray! :)
43697      # First separate the path from the arguments. This will split at the first
43698      # space.
43699      complete="$BUILD_CC"
43700      path="${complete%% *}"
43701      tmp="$complete EOL"
43702      arguments="${tmp#* }"
43703
43704      # Cannot rely on the command "which" here since it doesn't always work.
43705      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43706      if test -z "$is_absolute_path"; then
43707        # Path to executable is not absolute. Find it.
43708        IFS_save="$IFS"
43709        IFS=:
43710        for p in $PATH; do
43711          if test -f "$p/$path" && test -x "$p/$path"; then
43712            new_path="$p/$path"
43713            break
43714          fi
43715        done
43716        IFS="$IFS_save"
43717      else
43718        # This is an absolute path, we can use it without further modifications.
43719        new_path="$path"
43720      fi
43721
43722      if test "x$new_path" = x; then
43723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43724$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43725        has_space=`$ECHO "$complete" | $GREP " "`
43726        if test "x$has_space" != x; then
43727          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43728$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43729        fi
43730        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43731      fi
43732    fi
43733
43734    # Now join together the path and the arguments once again
43735    if test "x$arguments" != xEOL; then
43736      new_complete="$new_path ${arguments% *}"
43737    else
43738      new_complete="$new_path"
43739    fi
43740
43741    if test "x$complete" != "x$new_complete"; then
43742      BUILD_CC="$new_complete"
43743      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
43744$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
43745    fi
43746  fi
43747
43748
43749
43750
43751  # Publish this variable in the help.
43752
43753
43754  if [ -z "${BUILD_CXX+x}" ]; then
43755    # The variable is not set by user, try to locate tool using the code snippet
43756    for ac_prog in cl CC g++
43757do
43758  # Extract the first word of "$ac_prog", so it can be a program name with args.
43759set dummy $ac_prog; ac_word=$2
43760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43761$as_echo_n "checking for $ac_word... " >&6; }
43762if ${ac_cv_path_BUILD_CXX+:} false; then :
43763  $as_echo_n "(cached) " >&6
43764else
43765  case $BUILD_CXX in
43766  [\\/]* | ?:[\\/]*)
43767  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43768  ;;
43769  *)
43770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43771for as_dir in $PATH
43772do
43773  IFS=$as_save_IFS
43774  test -z "$as_dir" && as_dir=.
43775    for ac_exec_ext in '' $ac_executable_extensions; do
43776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43777    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43779    break 2
43780  fi
43781done
43782  done
43783IFS=$as_save_IFS
43784
43785  ;;
43786esac
43787fi
43788BUILD_CXX=$ac_cv_path_BUILD_CXX
43789if test -n "$BUILD_CXX"; then
43790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43791$as_echo "$BUILD_CXX" >&6; }
43792else
43793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43794$as_echo "no" >&6; }
43795fi
43796
43797
43798  test -n "$BUILD_CXX" && break
43799done
43800
43801  else
43802    # The variable is set, but is it from the command line or the environment?
43803
43804    # Try to remove the string !BUILD_CXX! from our list.
43805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
43806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43807      # If it failed, the variable was not from the command line. Ignore it,
43808      # but warn the user (except for BASH, which is always set by the calling BASH).
43809      if test "xBUILD_CXX" != xBASH; then
43810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
43811$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
43812      fi
43813      # Try to locate tool using the code snippet
43814      for ac_prog in cl CC g++
43815do
43816  # Extract the first word of "$ac_prog", so it can be a program name with args.
43817set dummy $ac_prog; ac_word=$2
43818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43819$as_echo_n "checking for $ac_word... " >&6; }
43820if ${ac_cv_path_BUILD_CXX+:} false; then :
43821  $as_echo_n "(cached) " >&6
43822else
43823  case $BUILD_CXX in
43824  [\\/]* | ?:[\\/]*)
43825  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43826  ;;
43827  *)
43828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43829for as_dir in $PATH
43830do
43831  IFS=$as_save_IFS
43832  test -z "$as_dir" && as_dir=.
43833    for ac_exec_ext in '' $ac_executable_extensions; do
43834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43835    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43837    break 2
43838  fi
43839done
43840  done
43841IFS=$as_save_IFS
43842
43843  ;;
43844esac
43845fi
43846BUILD_CXX=$ac_cv_path_BUILD_CXX
43847if test -n "$BUILD_CXX"; then
43848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43849$as_echo "$BUILD_CXX" >&6; }
43850else
43851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43852$as_echo "no" >&6; }
43853fi
43854
43855
43856  test -n "$BUILD_CXX" && break
43857done
43858
43859    else
43860      # If it succeeded, then it was overridden by the user. We will use it
43861      # for the tool.
43862
43863      # First remove it from the list of overridden variables, so we can test
43864      # for unknown variables in the end.
43865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43866
43867      # Check if we try to supply an empty value
43868      if test "x$BUILD_CXX" = x; then
43869        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
43870$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
43871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43872$as_echo_n "checking for BUILD_CXX... " >&6; }
43873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43874$as_echo "disabled" >&6; }
43875      else
43876        # Check if the provided tool contains a complete path.
43877        tool_specified="$BUILD_CXX"
43878        tool_basename="${tool_specified##*/}"
43879        if test "x$tool_basename" = "x$tool_specified"; then
43880          # A command without a complete path is provided, search $PATH.
43881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
43882$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
43883          # Extract the first word of "$tool_basename", so it can be a program name with args.
43884set dummy $tool_basename; ac_word=$2
43885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43886$as_echo_n "checking for $ac_word... " >&6; }
43887if ${ac_cv_path_BUILD_CXX+:} false; then :
43888  $as_echo_n "(cached) " >&6
43889else
43890  case $BUILD_CXX in
43891  [\\/]* | ?:[\\/]*)
43892  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
43893  ;;
43894  *)
43895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43896for as_dir in $PATH
43897do
43898  IFS=$as_save_IFS
43899  test -z "$as_dir" && as_dir=.
43900    for ac_exec_ext in '' $ac_executable_extensions; do
43901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43902    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
43903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43904    break 2
43905  fi
43906done
43907  done
43908IFS=$as_save_IFS
43909
43910  ;;
43911esac
43912fi
43913BUILD_CXX=$ac_cv_path_BUILD_CXX
43914if test -n "$BUILD_CXX"; then
43915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
43916$as_echo "$BUILD_CXX" >&6; }
43917else
43918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43919$as_echo "no" >&6; }
43920fi
43921
43922
43923          if test "x$BUILD_CXX" = x; then
43924            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43925          fi
43926        else
43927          # Otherwise we believe it is a complete path. Use it as it is.
43928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
43929$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
43930          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
43931$as_echo_n "checking for BUILD_CXX... " >&6; }
43932          if test ! -x "$tool_specified"; then
43933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43934$as_echo "not found" >&6; }
43935            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
43936          fi
43937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43938$as_echo "$tool_specified" >&6; }
43939        fi
43940      fi
43941    fi
43942
43943  fi
43944
43945
43946
43947  if test "x$BUILD_CXX" = x; then
43948    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
43949  fi
43950
43951
43952
43953  # Only process if variable expands to non-empty
43954
43955  if test "x$BUILD_CXX" != x; then
43956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43957
43958  # First separate the path from the arguments. This will split at the first
43959  # space.
43960  complete="$BUILD_CXX"
43961  path="${complete%% *}"
43962  tmp="$complete EOL"
43963  arguments="${tmp#* }"
43964
43965  # Input might be given as Windows format, start by converting to
43966  # unix format.
43967  new_path=`$CYGPATH -u "$path"`
43968
43969  # Now try to locate executable using which
43970  new_path=`$WHICH "$new_path" 2> /dev/null`
43971  # bat and cmd files are not always considered executable in cygwin causing which
43972  # to not find them
43973  if test "x$new_path" = x \
43974      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43975      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43976    new_path=`$CYGPATH -u "$path"`
43977  fi
43978  if test "x$new_path" = x; then
43979    # Oops. Which didn't find the executable.
43980    # The splitting of arguments from the executable at a space might have been incorrect,
43981    # since paths with space are more likely in Windows. Give it another try with the whole
43982    # argument.
43983    path="$complete"
43984    arguments="EOL"
43985    new_path=`$CYGPATH -u "$path"`
43986    new_path=`$WHICH "$new_path" 2> /dev/null`
43987    # bat and cmd files are not always considered executable in cygwin causing which
43988    # to not find them
43989    if test "x$new_path" = x \
43990        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43991        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43992      new_path=`$CYGPATH -u "$path"`
43993    fi
43994    if test "x$new_path" = x; then
43995      # It's still not found. Now this is an unrecoverable error.
43996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
43997$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
43998      has_space=`$ECHO "$complete" | $GREP " "`
43999      if test "x$has_space" != x; then
44000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44002      fi
44003      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44004    fi
44005  fi
44006
44007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44010  # "foo.exe" is OK but "foo" is an error.
44011  #
44012  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44013  # It is also a way to make sure we got the proper file name for the real test later on.
44014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44015  if test "x$test_shortpath" = x; then
44016    # Short path failed, file does not exist as specified.
44017    # Try adding .exe or .cmd
44018    if test -f "${new_path}.exe"; then
44019      input_to_shortpath="${new_path}.exe"
44020    elif test -f "${new_path}.cmd"; then
44021      input_to_shortpath="${new_path}.cmd"
44022    else
44023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44024$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44025      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44026$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44027      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44028    fi
44029  else
44030    input_to_shortpath="$new_path"
44031  fi
44032
44033  # Call helper function which possibly converts this using DOS-style short mode.
44034  # If so, the updated path is stored in $new_path.
44035  new_path="$input_to_shortpath"
44036
44037  input_path="$input_to_shortpath"
44038  # Check if we need to convert this using DOS-style short mode. If the path
44039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44040  # take no chances and rewrite it.
44041  # Note: m4 eats our [], so we need to use [ and ] instead.
44042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44043  if test "x$has_forbidden_chars" != x; then
44044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44048      # Going to short mode and back again did indeed matter. Since short mode is
44049      # case insensitive, let's make it lowercase to improve readability.
44050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44051      # Now convert it back to Unix-style (cygpath)
44052      input_path=`$CYGPATH -u "$shortmode_path"`
44053      new_path="$input_path"
44054    fi
44055  fi
44056
44057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44058  if test "x$test_cygdrive_prefix" = x; then
44059    # As a simple fix, exclude /usr/bin since it's not a real path.
44060    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44062      # a path prefixed by /cygdrive for fixpath to work.
44063      new_path="$CYGWIN_ROOT_PATH$input_path"
44064    fi
44065  fi
44066
44067  # remove trailing .exe if any
44068  new_path="${new_path/%.exe/}"
44069
44070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44071
44072  # First separate the path from the arguments. This will split at the first
44073  # space.
44074  complete="$BUILD_CXX"
44075  path="${complete%% *}"
44076  tmp="$complete EOL"
44077  arguments="${tmp#* }"
44078
44079  # Input might be given as Windows format, start by converting to
44080  # unix format.
44081  new_path="$path"
44082
44083  windows_path="$new_path"
44084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44085    unix_path=`$CYGPATH -u "$windows_path"`
44086    new_path="$unix_path"
44087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44089    new_path="$unix_path"
44090  fi
44091
44092
44093  # Now try to locate executable using which
44094  new_path=`$WHICH "$new_path" 2> /dev/null`
44095
44096  if test "x$new_path" = x; then
44097    # Oops. Which didn't find the executable.
44098    # The splitting of arguments from the executable at a space might have been incorrect,
44099    # since paths with space are more likely in Windows. Give it another try with the whole
44100    # argument.
44101    path="$complete"
44102    arguments="EOL"
44103    new_path="$path"
44104
44105  windows_path="$new_path"
44106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44107    unix_path=`$CYGPATH -u "$windows_path"`
44108    new_path="$unix_path"
44109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44111    new_path="$unix_path"
44112  fi
44113
44114
44115    new_path=`$WHICH "$new_path" 2> /dev/null`
44116    # bat and cmd files are not always considered executable in MSYS causing which
44117    # to not find them
44118    if test "x$new_path" = x \
44119        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44120        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44121      new_path="$path"
44122
44123  windows_path="$new_path"
44124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44125    unix_path=`$CYGPATH -u "$windows_path"`
44126    new_path="$unix_path"
44127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44129    new_path="$unix_path"
44130  fi
44131
44132    fi
44133
44134    if test "x$new_path" = x; then
44135      # It's still not found. Now this is an unrecoverable error.
44136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44137$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44138      has_space=`$ECHO "$complete" | $GREP " "`
44139      if test "x$has_space" != x; then
44140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44142      fi
44143      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44144    fi
44145  fi
44146
44147  # Now new_path has a complete unix path to the binary
44148  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44149    # Keep paths in /bin as-is, but remove trailing .exe if any
44150    new_path="${new_path/%.exe/}"
44151    # Do not save /bin paths to all_fixpath_prefixes!
44152  else
44153    # Not in mixed or Windows style, start by that.
44154    new_path=`cmd //c echo $new_path`
44155
44156  input_path="$new_path"
44157  # Check if we need to convert this using DOS-style short mode. If the path
44158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44159  # take no chances and rewrite it.
44160  # Note: m4 eats our [], so we need to use [ and ] instead.
44161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44162  if test "x$has_forbidden_chars" != x; then
44163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44165  fi
44166
44167    # Output is in $new_path
44168
44169  windows_path="$new_path"
44170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44171    unix_path=`$CYGPATH -u "$windows_path"`
44172    new_path="$unix_path"
44173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44175    new_path="$unix_path"
44176  fi
44177
44178    # remove trailing .exe if any
44179    new_path="${new_path/%.exe/}"
44180
44181    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44182    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44183  fi
44184
44185    else
44186      # We're on a unix platform. Hooray! :)
44187      # First separate the path from the arguments. This will split at the first
44188      # space.
44189      complete="$BUILD_CXX"
44190      path="${complete%% *}"
44191      tmp="$complete EOL"
44192      arguments="${tmp#* }"
44193
44194      # Cannot rely on the command "which" here since it doesn't always work.
44195      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44196      if test -z "$is_absolute_path"; then
44197        # Path to executable is not absolute. Find it.
44198        IFS_save="$IFS"
44199        IFS=:
44200        for p in $PATH; do
44201          if test -f "$p/$path" && test -x "$p/$path"; then
44202            new_path="$p/$path"
44203            break
44204          fi
44205        done
44206        IFS="$IFS_save"
44207      else
44208        # This is an absolute path, we can use it without further modifications.
44209        new_path="$path"
44210      fi
44211
44212      if test "x$new_path" = x; then
44213        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44214$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44215        has_space=`$ECHO "$complete" | $GREP " "`
44216        if test "x$has_space" != x; then
44217          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44218$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44219        fi
44220        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44221      fi
44222    fi
44223
44224    # Now join together the path and the arguments once again
44225    if test "x$arguments" != xEOL; then
44226      new_complete="$new_path ${arguments% *}"
44227    else
44228      new_complete="$new_path"
44229    fi
44230
44231    if test "x$complete" != "x$new_complete"; then
44232      BUILD_CXX="$new_complete"
44233      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44234$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44235    fi
44236  fi
44237
44238
44239
44240  # Publish this variable in the help.
44241
44242
44243  if [ -z "${BUILD_NM+x}" ]; then
44244    # The variable is not set by user, try to locate tool using the code snippet
44245    for ac_prog in nm gcc-nm
44246do
44247  # Extract the first word of "$ac_prog", so it can be a program name with args.
44248set dummy $ac_prog; ac_word=$2
44249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44250$as_echo_n "checking for $ac_word... " >&6; }
44251if ${ac_cv_path_BUILD_NM+:} false; then :
44252  $as_echo_n "(cached) " >&6
44253else
44254  case $BUILD_NM in
44255  [\\/]* | ?:[\\/]*)
44256  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44257  ;;
44258  *)
44259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44260for as_dir in $PATH
44261do
44262  IFS=$as_save_IFS
44263  test -z "$as_dir" && as_dir=.
44264    for ac_exec_ext in '' $ac_executable_extensions; do
44265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44266    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44268    break 2
44269  fi
44270done
44271  done
44272IFS=$as_save_IFS
44273
44274  ;;
44275esac
44276fi
44277BUILD_NM=$ac_cv_path_BUILD_NM
44278if test -n "$BUILD_NM"; then
44279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44280$as_echo "$BUILD_NM" >&6; }
44281else
44282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44283$as_echo "no" >&6; }
44284fi
44285
44286
44287  test -n "$BUILD_NM" && break
44288done
44289
44290  else
44291    # The variable is set, but is it from the command line or the environment?
44292
44293    # Try to remove the string !BUILD_NM! from our list.
44294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44296      # If it failed, the variable was not from the command line. Ignore it,
44297      # but warn the user (except for BASH, which is always set by the calling BASH).
44298      if test "xBUILD_NM" != xBASH; then
44299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44300$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44301      fi
44302      # Try to locate tool using the code snippet
44303      for ac_prog in nm gcc-nm
44304do
44305  # Extract the first word of "$ac_prog", so it can be a program name with args.
44306set dummy $ac_prog; ac_word=$2
44307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44308$as_echo_n "checking for $ac_word... " >&6; }
44309if ${ac_cv_path_BUILD_NM+:} false; then :
44310  $as_echo_n "(cached) " >&6
44311else
44312  case $BUILD_NM in
44313  [\\/]* | ?:[\\/]*)
44314  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44315  ;;
44316  *)
44317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44318for as_dir in $PATH
44319do
44320  IFS=$as_save_IFS
44321  test -z "$as_dir" && as_dir=.
44322    for ac_exec_ext in '' $ac_executable_extensions; do
44323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44324    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44326    break 2
44327  fi
44328done
44329  done
44330IFS=$as_save_IFS
44331
44332  ;;
44333esac
44334fi
44335BUILD_NM=$ac_cv_path_BUILD_NM
44336if test -n "$BUILD_NM"; then
44337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44338$as_echo "$BUILD_NM" >&6; }
44339else
44340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44341$as_echo "no" >&6; }
44342fi
44343
44344
44345  test -n "$BUILD_NM" && break
44346done
44347
44348    else
44349      # If it succeeded, then it was overridden by the user. We will use it
44350      # for the tool.
44351
44352      # First remove it from the list of overridden variables, so we can test
44353      # for unknown variables in the end.
44354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44355
44356      # Check if we try to supply an empty value
44357      if test "x$BUILD_NM" = x; then
44358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44359$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44361$as_echo_n "checking for BUILD_NM... " >&6; }
44362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44363$as_echo "disabled" >&6; }
44364      else
44365        # Check if the provided tool contains a complete path.
44366        tool_specified="$BUILD_NM"
44367        tool_basename="${tool_specified##*/}"
44368        if test "x$tool_basename" = "x$tool_specified"; then
44369          # A command without a complete path is provided, search $PATH.
44370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44371$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44372          # Extract the first word of "$tool_basename", so it can be a program name with args.
44373set dummy $tool_basename; ac_word=$2
44374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44375$as_echo_n "checking for $ac_word... " >&6; }
44376if ${ac_cv_path_BUILD_NM+:} false; then :
44377  $as_echo_n "(cached) " >&6
44378else
44379  case $BUILD_NM in
44380  [\\/]* | ?:[\\/]*)
44381  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44382  ;;
44383  *)
44384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44385for as_dir in $PATH
44386do
44387  IFS=$as_save_IFS
44388  test -z "$as_dir" && as_dir=.
44389    for ac_exec_ext in '' $ac_executable_extensions; do
44390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44391    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44393    break 2
44394  fi
44395done
44396  done
44397IFS=$as_save_IFS
44398
44399  ;;
44400esac
44401fi
44402BUILD_NM=$ac_cv_path_BUILD_NM
44403if test -n "$BUILD_NM"; then
44404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44405$as_echo "$BUILD_NM" >&6; }
44406else
44407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44408$as_echo "no" >&6; }
44409fi
44410
44411
44412          if test "x$BUILD_NM" = x; then
44413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44414          fi
44415        else
44416          # Otherwise we believe it is a complete path. Use it as it is.
44417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44418$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44420$as_echo_n "checking for BUILD_NM... " >&6; }
44421          if test ! -x "$tool_specified"; then
44422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44423$as_echo "not found" >&6; }
44424            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44425          fi
44426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44427$as_echo "$tool_specified" >&6; }
44428        fi
44429      fi
44430    fi
44431
44432  fi
44433
44434
44435
44436  # Only process if variable expands to non-empty
44437
44438  if test "x$BUILD_NM" != x; then
44439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44440
44441  # First separate the path from the arguments. This will split at the first
44442  # space.
44443  complete="$BUILD_NM"
44444  path="${complete%% *}"
44445  tmp="$complete EOL"
44446  arguments="${tmp#* }"
44447
44448  # Input might be given as Windows format, start by converting to
44449  # unix format.
44450  new_path=`$CYGPATH -u "$path"`
44451
44452  # Now try to locate executable using which
44453  new_path=`$WHICH "$new_path" 2> /dev/null`
44454  # bat and cmd files are not always considered executable in cygwin causing which
44455  # to not find them
44456  if test "x$new_path" = x \
44457      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44458      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44459    new_path=`$CYGPATH -u "$path"`
44460  fi
44461  if test "x$new_path" = x; then
44462    # Oops. Which didn't find the executable.
44463    # The splitting of arguments from the executable at a space might have been incorrect,
44464    # since paths with space are more likely in Windows. Give it another try with the whole
44465    # argument.
44466    path="$complete"
44467    arguments="EOL"
44468    new_path=`$CYGPATH -u "$path"`
44469    new_path=`$WHICH "$new_path" 2> /dev/null`
44470    # bat and cmd files are not always considered executable in cygwin causing which
44471    # to not find them
44472    if test "x$new_path" = x \
44473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44475      new_path=`$CYGPATH -u "$path"`
44476    fi
44477    if test "x$new_path" = x; then
44478      # It's still not found. Now this is an unrecoverable error.
44479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44480$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44481      has_space=`$ECHO "$complete" | $GREP " "`
44482      if test "x$has_space" != x; then
44483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44485      fi
44486      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44487    fi
44488  fi
44489
44490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44493  # "foo.exe" is OK but "foo" is an error.
44494  #
44495  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44496  # It is also a way to make sure we got the proper file name for the real test later on.
44497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44498  if test "x$test_shortpath" = x; then
44499    # Short path failed, file does not exist as specified.
44500    # Try adding .exe or .cmd
44501    if test -f "${new_path}.exe"; then
44502      input_to_shortpath="${new_path}.exe"
44503    elif test -f "${new_path}.cmd"; then
44504      input_to_shortpath="${new_path}.cmd"
44505    else
44506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44507$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44508      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44509$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44510      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44511    fi
44512  else
44513    input_to_shortpath="$new_path"
44514  fi
44515
44516  # Call helper function which possibly converts this using DOS-style short mode.
44517  # If so, the updated path is stored in $new_path.
44518  new_path="$input_to_shortpath"
44519
44520  input_path="$input_to_shortpath"
44521  # Check if we need to convert this using DOS-style short mode. If the path
44522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44523  # take no chances and rewrite it.
44524  # Note: m4 eats our [], so we need to use [ and ] instead.
44525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44526  if test "x$has_forbidden_chars" != x; then
44527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44531      # Going to short mode and back again did indeed matter. Since short mode is
44532      # case insensitive, let's make it lowercase to improve readability.
44533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44534      # Now convert it back to Unix-style (cygpath)
44535      input_path=`$CYGPATH -u "$shortmode_path"`
44536      new_path="$input_path"
44537    fi
44538  fi
44539
44540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44541  if test "x$test_cygdrive_prefix" = x; then
44542    # As a simple fix, exclude /usr/bin since it's not a real path.
44543    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44545      # a path prefixed by /cygdrive for fixpath to work.
44546      new_path="$CYGWIN_ROOT_PATH$input_path"
44547    fi
44548  fi
44549
44550  # remove trailing .exe if any
44551  new_path="${new_path/%.exe/}"
44552
44553    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44554
44555  # First separate the path from the arguments. This will split at the first
44556  # space.
44557  complete="$BUILD_NM"
44558  path="${complete%% *}"
44559  tmp="$complete EOL"
44560  arguments="${tmp#* }"
44561
44562  # Input might be given as Windows format, start by converting to
44563  # unix format.
44564  new_path="$path"
44565
44566  windows_path="$new_path"
44567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44568    unix_path=`$CYGPATH -u "$windows_path"`
44569    new_path="$unix_path"
44570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44572    new_path="$unix_path"
44573  fi
44574
44575
44576  # Now try to locate executable using which
44577  new_path=`$WHICH "$new_path" 2> /dev/null`
44578
44579  if test "x$new_path" = x; then
44580    # Oops. Which didn't find the executable.
44581    # The splitting of arguments from the executable at a space might have been incorrect,
44582    # since paths with space are more likely in Windows. Give it another try with the whole
44583    # argument.
44584    path="$complete"
44585    arguments="EOL"
44586    new_path="$path"
44587
44588  windows_path="$new_path"
44589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44590    unix_path=`$CYGPATH -u "$windows_path"`
44591    new_path="$unix_path"
44592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44594    new_path="$unix_path"
44595  fi
44596
44597
44598    new_path=`$WHICH "$new_path" 2> /dev/null`
44599    # bat and cmd files are not always considered executable in MSYS causing which
44600    # to not find them
44601    if test "x$new_path" = x \
44602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44604      new_path="$path"
44605
44606  windows_path="$new_path"
44607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44608    unix_path=`$CYGPATH -u "$windows_path"`
44609    new_path="$unix_path"
44610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44612    new_path="$unix_path"
44613  fi
44614
44615    fi
44616
44617    if test "x$new_path" = x; then
44618      # It's still not found. Now this is an unrecoverable error.
44619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44620$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44621      has_space=`$ECHO "$complete" | $GREP " "`
44622      if test "x$has_space" != x; then
44623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44625      fi
44626      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44627    fi
44628  fi
44629
44630  # Now new_path has a complete unix path to the binary
44631  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44632    # Keep paths in /bin as-is, but remove trailing .exe if any
44633    new_path="${new_path/%.exe/}"
44634    # Do not save /bin paths to all_fixpath_prefixes!
44635  else
44636    # Not in mixed or Windows style, start by that.
44637    new_path=`cmd //c echo $new_path`
44638
44639  input_path="$new_path"
44640  # Check if we need to convert this using DOS-style short mode. If the path
44641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44642  # take no chances and rewrite it.
44643  # Note: m4 eats our [], so we need to use [ and ] instead.
44644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44645  if test "x$has_forbidden_chars" != x; then
44646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44648  fi
44649
44650    # Output is in $new_path
44651
44652  windows_path="$new_path"
44653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44654    unix_path=`$CYGPATH -u "$windows_path"`
44655    new_path="$unix_path"
44656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44658    new_path="$unix_path"
44659  fi
44660
44661    # remove trailing .exe if any
44662    new_path="${new_path/%.exe/}"
44663
44664    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44665    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44666  fi
44667
44668    else
44669      # We're on a unix platform. Hooray! :)
44670      # First separate the path from the arguments. This will split at the first
44671      # space.
44672      complete="$BUILD_NM"
44673      path="${complete%% *}"
44674      tmp="$complete EOL"
44675      arguments="${tmp#* }"
44676
44677      # Cannot rely on the command "which" here since it doesn't always work.
44678      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44679      if test -z "$is_absolute_path"; then
44680        # Path to executable is not absolute. Find it.
44681        IFS_save="$IFS"
44682        IFS=:
44683        for p in $PATH; do
44684          if test -f "$p/$path" && test -x "$p/$path"; then
44685            new_path="$p/$path"
44686            break
44687          fi
44688        done
44689        IFS="$IFS_save"
44690      else
44691        # This is an absolute path, we can use it without further modifications.
44692        new_path="$path"
44693      fi
44694
44695      if test "x$new_path" = x; then
44696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44697$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44698        has_space=`$ECHO "$complete" | $GREP " "`
44699        if test "x$has_space" != x; then
44700          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44701$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44702        fi
44703        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44704      fi
44705    fi
44706
44707    # Now join together the path and the arguments once again
44708    if test "x$arguments" != xEOL; then
44709      new_complete="$new_path ${arguments% *}"
44710    else
44711      new_complete="$new_path"
44712    fi
44713
44714    if test "x$complete" != "x$new_complete"; then
44715      BUILD_NM="$new_complete"
44716      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
44717$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
44718    fi
44719  fi
44720
44721
44722
44723  # Publish this variable in the help.
44724
44725
44726  if [ -z "${BUILD_AR+x}" ]; then
44727    # The variable is not set by user, try to locate tool using the code snippet
44728    for ac_prog in ar gcc-ar
44729do
44730  # Extract the first word of "$ac_prog", so it can be a program name with args.
44731set dummy $ac_prog; ac_word=$2
44732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44733$as_echo_n "checking for $ac_word... " >&6; }
44734if ${ac_cv_path_BUILD_AR+:} false; then :
44735  $as_echo_n "(cached) " >&6
44736else
44737  case $BUILD_AR in
44738  [\\/]* | ?:[\\/]*)
44739  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44740  ;;
44741  *)
44742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44743for as_dir in $PATH
44744do
44745  IFS=$as_save_IFS
44746  test -z "$as_dir" && as_dir=.
44747    for ac_exec_ext in '' $ac_executable_extensions; do
44748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44749    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44751    break 2
44752  fi
44753done
44754  done
44755IFS=$as_save_IFS
44756
44757  ;;
44758esac
44759fi
44760BUILD_AR=$ac_cv_path_BUILD_AR
44761if test -n "$BUILD_AR"; then
44762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44763$as_echo "$BUILD_AR" >&6; }
44764else
44765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44766$as_echo "no" >&6; }
44767fi
44768
44769
44770  test -n "$BUILD_AR" && break
44771done
44772
44773  else
44774    # The variable is set, but is it from the command line or the environment?
44775
44776    # Try to remove the string !BUILD_AR! from our list.
44777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
44778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44779      # If it failed, the variable was not from the command line. Ignore it,
44780      # but warn the user (except for BASH, which is always set by the calling BASH).
44781      if test "xBUILD_AR" != xBASH; then
44782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
44783$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
44784      fi
44785      # Try to locate tool using the code snippet
44786      for ac_prog in ar gcc-ar
44787do
44788  # Extract the first word of "$ac_prog", so it can be a program name with args.
44789set dummy $ac_prog; ac_word=$2
44790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44791$as_echo_n "checking for $ac_word... " >&6; }
44792if ${ac_cv_path_BUILD_AR+:} false; then :
44793  $as_echo_n "(cached) " >&6
44794else
44795  case $BUILD_AR in
44796  [\\/]* | ?:[\\/]*)
44797  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44798  ;;
44799  *)
44800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44801for as_dir in $PATH
44802do
44803  IFS=$as_save_IFS
44804  test -z "$as_dir" && as_dir=.
44805    for ac_exec_ext in '' $ac_executable_extensions; do
44806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44807    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44809    break 2
44810  fi
44811done
44812  done
44813IFS=$as_save_IFS
44814
44815  ;;
44816esac
44817fi
44818BUILD_AR=$ac_cv_path_BUILD_AR
44819if test -n "$BUILD_AR"; then
44820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44821$as_echo "$BUILD_AR" >&6; }
44822else
44823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44824$as_echo "no" >&6; }
44825fi
44826
44827
44828  test -n "$BUILD_AR" && break
44829done
44830
44831    else
44832      # If it succeeded, then it was overridden by the user. We will use it
44833      # for the tool.
44834
44835      # First remove it from the list of overridden variables, so we can test
44836      # for unknown variables in the end.
44837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44838
44839      # Check if we try to supply an empty value
44840      if test "x$BUILD_AR" = x; then
44841        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
44842$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
44843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44844$as_echo_n "checking for BUILD_AR... " >&6; }
44845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44846$as_echo "disabled" >&6; }
44847      else
44848        # Check if the provided tool contains a complete path.
44849        tool_specified="$BUILD_AR"
44850        tool_basename="${tool_specified##*/}"
44851        if test "x$tool_basename" = "x$tool_specified"; then
44852          # A command without a complete path is provided, search $PATH.
44853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
44854$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
44855          # Extract the first word of "$tool_basename", so it can be a program name with args.
44856set dummy $tool_basename; ac_word=$2
44857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44858$as_echo_n "checking for $ac_word... " >&6; }
44859if ${ac_cv_path_BUILD_AR+:} false; then :
44860  $as_echo_n "(cached) " >&6
44861else
44862  case $BUILD_AR in
44863  [\\/]* | ?:[\\/]*)
44864  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
44865  ;;
44866  *)
44867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44868for as_dir in $PATH
44869do
44870  IFS=$as_save_IFS
44871  test -z "$as_dir" && as_dir=.
44872    for ac_exec_ext in '' $ac_executable_extensions; do
44873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44874    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
44875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44876    break 2
44877  fi
44878done
44879  done
44880IFS=$as_save_IFS
44881
44882  ;;
44883esac
44884fi
44885BUILD_AR=$ac_cv_path_BUILD_AR
44886if test -n "$BUILD_AR"; then
44887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
44888$as_echo "$BUILD_AR" >&6; }
44889else
44890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44891$as_echo "no" >&6; }
44892fi
44893
44894
44895          if test "x$BUILD_AR" = x; then
44896            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44897          fi
44898        else
44899          # Otherwise we believe it is a complete path. Use it as it is.
44900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
44901$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
44902          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
44903$as_echo_n "checking for BUILD_AR... " >&6; }
44904          if test ! -x "$tool_specified"; then
44905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44906$as_echo "not found" >&6; }
44907            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
44908          fi
44909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44910$as_echo "$tool_specified" >&6; }
44911        fi
44912      fi
44913    fi
44914
44915  fi
44916
44917
44918
44919  # Only process if variable expands to non-empty
44920
44921  if test "x$BUILD_AR" != x; then
44922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44923
44924  # First separate the path from the arguments. This will split at the first
44925  # space.
44926  complete="$BUILD_AR"
44927  path="${complete%% *}"
44928  tmp="$complete EOL"
44929  arguments="${tmp#* }"
44930
44931  # Input might be given as Windows format, start by converting to
44932  # unix format.
44933  new_path=`$CYGPATH -u "$path"`
44934
44935  # Now try to locate executable using which
44936  new_path=`$WHICH "$new_path" 2> /dev/null`
44937  # bat and cmd files are not always considered executable in cygwin causing which
44938  # to not find them
44939  if test "x$new_path" = x \
44940      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44941      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44942    new_path=`$CYGPATH -u "$path"`
44943  fi
44944  if test "x$new_path" = x; then
44945    # Oops. Which didn't find the executable.
44946    # The splitting of arguments from the executable at a space might have been incorrect,
44947    # since paths with space are more likely in Windows. Give it another try with the whole
44948    # argument.
44949    path="$complete"
44950    arguments="EOL"
44951    new_path=`$CYGPATH -u "$path"`
44952    new_path=`$WHICH "$new_path" 2> /dev/null`
44953    # bat and cmd files are not always considered executable in cygwin causing which
44954    # to not find them
44955    if test "x$new_path" = x \
44956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44958      new_path=`$CYGPATH -u "$path"`
44959    fi
44960    if test "x$new_path" = x; then
44961      # It's still not found. Now this is an unrecoverable error.
44962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
44963$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
44964      has_space=`$ECHO "$complete" | $GREP " "`
44965      if test "x$has_space" != x; then
44966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44968      fi
44969      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44970    fi
44971  fi
44972
44973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44976  # "foo.exe" is OK but "foo" is an error.
44977  #
44978  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44979  # It is also a way to make sure we got the proper file name for the real test later on.
44980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44981  if test "x$test_shortpath" = x; then
44982    # Short path failed, file does not exist as specified.
44983    # Try adding .exe or .cmd
44984    if test -f "${new_path}.exe"; then
44985      input_to_shortpath="${new_path}.exe"
44986    elif test -f "${new_path}.cmd"; then
44987      input_to_shortpath="${new_path}.cmd"
44988    else
44989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
44990$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
44991      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44992$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44993      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
44994    fi
44995  else
44996    input_to_shortpath="$new_path"
44997  fi
44998
44999  # Call helper function which possibly converts this using DOS-style short mode.
45000  # If so, the updated path is stored in $new_path.
45001  new_path="$input_to_shortpath"
45002
45003  input_path="$input_to_shortpath"
45004  # Check if we need to convert this using DOS-style short mode. If the path
45005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45006  # take no chances and rewrite it.
45007  # Note: m4 eats our [], so we need to use [ and ] instead.
45008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45009  if test "x$has_forbidden_chars" != x; then
45010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45014      # Going to short mode and back again did indeed matter. Since short mode is
45015      # case insensitive, let's make it lowercase to improve readability.
45016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45017      # Now convert it back to Unix-style (cygpath)
45018      input_path=`$CYGPATH -u "$shortmode_path"`
45019      new_path="$input_path"
45020    fi
45021  fi
45022
45023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45024  if test "x$test_cygdrive_prefix" = x; then
45025    # As a simple fix, exclude /usr/bin since it's not a real path.
45026    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45028      # a path prefixed by /cygdrive for fixpath to work.
45029      new_path="$CYGWIN_ROOT_PATH$input_path"
45030    fi
45031  fi
45032
45033  # remove trailing .exe if any
45034  new_path="${new_path/%.exe/}"
45035
45036    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45037
45038  # First separate the path from the arguments. This will split at the first
45039  # space.
45040  complete="$BUILD_AR"
45041  path="${complete%% *}"
45042  tmp="$complete EOL"
45043  arguments="${tmp#* }"
45044
45045  # Input might be given as Windows format, start by converting to
45046  # unix format.
45047  new_path="$path"
45048
45049  windows_path="$new_path"
45050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45051    unix_path=`$CYGPATH -u "$windows_path"`
45052    new_path="$unix_path"
45053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45055    new_path="$unix_path"
45056  fi
45057
45058
45059  # Now try to locate executable using which
45060  new_path=`$WHICH "$new_path" 2> /dev/null`
45061
45062  if test "x$new_path" = x; then
45063    # Oops. Which didn't find the executable.
45064    # The splitting of arguments from the executable at a space might have been incorrect,
45065    # since paths with space are more likely in Windows. Give it another try with the whole
45066    # argument.
45067    path="$complete"
45068    arguments="EOL"
45069    new_path="$path"
45070
45071  windows_path="$new_path"
45072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45073    unix_path=`$CYGPATH -u "$windows_path"`
45074    new_path="$unix_path"
45075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45077    new_path="$unix_path"
45078  fi
45079
45080
45081    new_path=`$WHICH "$new_path" 2> /dev/null`
45082    # bat and cmd files are not always considered executable in MSYS causing which
45083    # to not find them
45084    if test "x$new_path" = x \
45085        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45086        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45087      new_path="$path"
45088
45089  windows_path="$new_path"
45090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45091    unix_path=`$CYGPATH -u "$windows_path"`
45092    new_path="$unix_path"
45093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45095    new_path="$unix_path"
45096  fi
45097
45098    fi
45099
45100    if test "x$new_path" = x; then
45101      # It's still not found. Now this is an unrecoverable error.
45102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45103$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45104      has_space=`$ECHO "$complete" | $GREP " "`
45105      if test "x$has_space" != x; then
45106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45108      fi
45109      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45110    fi
45111  fi
45112
45113  # Now new_path has a complete unix path to the binary
45114  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45115    # Keep paths in /bin as-is, but remove trailing .exe if any
45116    new_path="${new_path/%.exe/}"
45117    # Do not save /bin paths to all_fixpath_prefixes!
45118  else
45119    # Not in mixed or Windows style, start by that.
45120    new_path=`cmd //c echo $new_path`
45121
45122  input_path="$new_path"
45123  # Check if we need to convert this using DOS-style short mode. If the path
45124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45125  # take no chances and rewrite it.
45126  # Note: m4 eats our [], so we need to use [ and ] instead.
45127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45128  if test "x$has_forbidden_chars" != x; then
45129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45131  fi
45132
45133    # Output is in $new_path
45134
45135  windows_path="$new_path"
45136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45137    unix_path=`$CYGPATH -u "$windows_path"`
45138    new_path="$unix_path"
45139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45141    new_path="$unix_path"
45142  fi
45143
45144    # remove trailing .exe if any
45145    new_path="${new_path/%.exe/}"
45146
45147    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45148    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45149  fi
45150
45151    else
45152      # We're on a unix platform. Hooray! :)
45153      # First separate the path from the arguments. This will split at the first
45154      # space.
45155      complete="$BUILD_AR"
45156      path="${complete%% *}"
45157      tmp="$complete EOL"
45158      arguments="${tmp#* }"
45159
45160      # Cannot rely on the command "which" here since it doesn't always work.
45161      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45162      if test -z "$is_absolute_path"; then
45163        # Path to executable is not absolute. Find it.
45164        IFS_save="$IFS"
45165        IFS=:
45166        for p in $PATH; do
45167          if test -f "$p/$path" && test -x "$p/$path"; then
45168            new_path="$p/$path"
45169            break
45170          fi
45171        done
45172        IFS="$IFS_save"
45173      else
45174        # This is an absolute path, we can use it without further modifications.
45175        new_path="$path"
45176      fi
45177
45178      if test "x$new_path" = x; then
45179        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45180$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45181        has_space=`$ECHO "$complete" | $GREP " "`
45182        if test "x$has_space" != x; then
45183          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45184$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45185        fi
45186        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45187      fi
45188    fi
45189
45190    # Now join together the path and the arguments once again
45191    if test "x$arguments" != xEOL; then
45192      new_complete="$new_path ${arguments% *}"
45193    else
45194      new_complete="$new_path"
45195    fi
45196
45197    if test "x$complete" != "x$new_complete"; then
45198      BUILD_AR="$new_complete"
45199      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45200$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45201    fi
45202  fi
45203
45204    # Assume the C compiler is the assembler
45205    BUILD_AS="$BUILD_CC -c"
45206    # Just like for the target compiler, use the compiler as linker
45207    BUILD_LD="$BUILD_CC"
45208
45209    PATH="$OLDPATH"
45210  else
45211    # If we are not cross compiling, use the normal target compilers for
45212    # building the build platform executables.
45213    BUILD_CC="$CC"
45214    BUILD_CXX="$CXX"
45215    BUILD_LD="$LD"
45216    BUILD_NM="$NM"
45217    BUILD_AS="$AS"
45218    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
45219    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
45220    BUILD_AR="$AR"
45221  fi
45222
45223
45224
45225
45226
45227
45228
45229
45230
45231
45232
45233  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45234    # For hotspot, we need these in Windows mixed path,
45235    # so rewrite them all. Need added .exe suffix.
45236    HOTSPOT_CXX="$CXX.exe"
45237    HOTSPOT_LD="$LD.exe"
45238    HOTSPOT_MT="$MT.exe"
45239    HOTSPOT_RC="$RC.exe"
45240
45241  unix_path="$HOTSPOT_CXX"
45242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45243    windows_path=`$CYGPATH -m "$unix_path"`
45244    HOTSPOT_CXX="$windows_path"
45245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45246    windows_path=`cmd //c echo $unix_path`
45247    HOTSPOT_CXX="$windows_path"
45248  fi
45249
45250
45251  unix_path="$HOTSPOT_LD"
45252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45253    windows_path=`$CYGPATH -m "$unix_path"`
45254    HOTSPOT_LD="$windows_path"
45255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45256    windows_path=`cmd //c echo $unix_path`
45257    HOTSPOT_LD="$windows_path"
45258  fi
45259
45260
45261  unix_path="$HOTSPOT_MT"
45262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45263    windows_path=`$CYGPATH -m "$unix_path"`
45264    HOTSPOT_MT="$windows_path"
45265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45266    windows_path=`cmd //c echo $unix_path`
45267    HOTSPOT_MT="$windows_path"
45268  fi
45269
45270
45271  unix_path="$HOTSPOT_RC"
45272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45273    windows_path=`$CYGPATH -m "$unix_path"`
45274    HOTSPOT_RC="$windows_path"
45275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45276    windows_path=`cmd //c echo $unix_path`
45277    HOTSPOT_RC="$windows_path"
45278  fi
45279
45280
45281
45282  else
45283    HOTSPOT_CXX="$CXX"
45284    HOTSPOT_LD="$LD"
45285  fi
45286
45287
45288
45289  if test  "x$TOOLCHAIN_TYPE" = xclang; then
45290    USE_CLANG=true
45291  fi
45292
45293
45294
45295
45296
45297  # The package path is used only on macosx?
45298  # FIXME: clean this up, and/or move it elsewhere.
45299  PACKAGE_PATH=/opt/local
45300
45301
45302  # Check for extra potential brokenness.
45303  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45304    # On Windows, double-check that we got the right compiler.
45305    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
45306    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
45307    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
45308      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
45309        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
45310      fi
45311    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
45312      if test "x$COMPILER_CPU_TEST" != "xx64"; then
45313        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
45314      fi
45315    fi
45316  fi
45317
45318  if test "x$TOOLCHAIN_TYPE" = xgcc; then
45319    # If this is a --hash-style=gnu system, use --hash-style=both, why?
45320    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
45321    # This is later checked when setting flags.
45322
45323    # "-Og" suppported for GCC 4.8 and later
45324    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
45325
45326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
45327$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
45328  supports=yes
45329
45330  saved_cflags="$CFLAGS"
45331  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
45332  ac_ext=c
45333ac_cpp='$CPP $CPPFLAGS'
45334ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45335ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45336ac_compiler_gnu=$ac_cv_c_compiler_gnu
45337
45338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45339/* end confdefs.h.  */
45340int i;
45341_ACEOF
45342if ac_fn_c_try_compile "$LINENO"; then :
45343
45344else
45345  supports=no
45346fi
45347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45348  ac_ext=cpp
45349ac_cpp='$CXXCPP $CPPFLAGS'
45350ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45351ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45352ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45353
45354  CFLAGS="$saved_cflags"
45355
45356  saved_cxxflags="$CXXFLAGS"
45357  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
45358  ac_ext=cpp
45359ac_cpp='$CXXCPP $CPPFLAGS'
45360ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45361ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45362ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45363
45364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45365/* end confdefs.h.  */
45366int i;
45367_ACEOF
45368if ac_fn_cxx_try_compile "$LINENO"; then :
45369
45370else
45371  supports=no
45372fi
45373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45374  ac_ext=cpp
45375ac_cpp='$CXXCPP $CPPFLAGS'
45376ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45377ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45378ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45379
45380  CXXFLAGS="$saved_cxxflags"
45381
45382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45383$as_echo "$supports" >&6; }
45384  if test "x$supports" = "xyes" ; then
45385    HAS_CFLAG_OPTIMIZE_DEBUG=true
45386  else
45387    HAS_CFLAG_OPTIMIZE_DEBUG=false
45388  fi
45389
45390
45391    # "-z relro" supported in GNU binutils 2.17 and later
45392    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
45393
45394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
45395$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
45396  supports=yes
45397
45398  saved_ldflags="$LDFLAGS"
45399  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
45400  ac_ext=c
45401ac_cpp='$CPP $CPPFLAGS'
45402ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45403ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45404ac_compiler_gnu=$ac_cv_c_compiler_gnu
45405
45406  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45407/* end confdefs.h.  */
45408
45409int
45410main ()
45411{
45412
45413  ;
45414  return 0;
45415}
45416_ACEOF
45417if ac_fn_c_try_link "$LINENO"; then :
45418
45419else
45420  supports=no
45421fi
45422rm -f core conftest.err conftest.$ac_objext \
45423    conftest$ac_exeext conftest.$ac_ext
45424  ac_ext=cpp
45425ac_cpp='$CXXCPP $CPPFLAGS'
45426ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45427ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45428ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45429
45430  LDFLAGS="$saved_ldflags"
45431
45432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45433$as_echo "$supports" >&6; }
45434  if test "x$supports" = "xyes" ; then
45435    HAS_LINKER_RELRO=true
45436  else
45437    HAS_LINKER_RELRO=false
45438  fi
45439
45440
45441    # "-z now" supported in GNU binutils 2.11 and later
45442    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
45443
45444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
45445$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
45446  supports=yes
45447
45448  saved_ldflags="$LDFLAGS"
45449  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
45450  ac_ext=c
45451ac_cpp='$CPP $CPPFLAGS'
45452ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45453ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45454ac_compiler_gnu=$ac_cv_c_compiler_gnu
45455
45456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45457/* end confdefs.h.  */
45458
45459int
45460main ()
45461{
45462
45463  ;
45464  return 0;
45465}
45466_ACEOF
45467if ac_fn_c_try_link "$LINENO"; then :
45468
45469else
45470  supports=no
45471fi
45472rm -f core conftest.err conftest.$ac_objext \
45473    conftest$ac_exeext conftest.$ac_ext
45474  ac_ext=cpp
45475ac_cpp='$CXXCPP $CPPFLAGS'
45476ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
45477ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
45478ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
45479
45480  LDFLAGS="$saved_ldflags"
45481
45482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
45483$as_echo "$supports" >&6; }
45484  if test "x$supports" = "xyes" ; then
45485    HAS_LINKER_NOW=true
45486  else
45487    HAS_LINKER_NOW=false
45488  fi
45489
45490  fi
45491
45492  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
45493  # in executable.'
45494  USING_BROKEN_SUSE_LD=no
45495  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
45496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
45497$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
45498    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
45499    $ECHO "int main() { }" > main.c
45500    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
45501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45502$as_echo "no" >&6; }
45503      USING_BROKEN_SUSE_LD=no
45504    else
45505      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45506$as_echo "yes" >&6; }
45507      USING_BROKEN_SUSE_LD=yes
45508    fi
45509    rm -rf version-script.map main.c a.out
45510  fi
45511
45512
45513
45514# Setup the JTReg Regression Test Harness.
45515
45516
45517# Check whether --with-jtreg was given.
45518if test "${with_jtreg+set}" = set; then :
45519  withval=$with_jtreg;
45520else
45521  with_jtreg=no
45522fi
45523
45524
45525  if test "x$with_jtreg" = xno; then
45526    # jtreg disabled
45527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45528$as_echo_n "checking for jtreg... " >&6; }
45529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45530$as_echo "no" >&6; }
45531  else
45532    if test "x$with_jtreg" != xyes; then
45533      # with path specified.
45534      JT_HOME="$with_jtreg"
45535    fi
45536
45537    if test "x$JT_HOME" != x; then
45538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
45539$as_echo_n "checking for jtreg... " >&6; }
45540
45541      # use JT_HOME enviroment var.
45542
45543  # Only process if variable expands to non-empty
45544
45545  if test "x$JT_HOME" != x; then
45546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45547
45548  # Input might be given as Windows format, start by converting to
45549  # unix format.
45550  path="$JT_HOME"
45551  new_path=`$CYGPATH -u "$path"`
45552
45553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45556  # "foo.exe" is OK but "foo" is an error.
45557  #
45558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45559  # It is also a way to make sure we got the proper file name for the real test later on.
45560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45561  if test "x$test_shortpath" = x; then
45562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45563$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45564    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
45565  fi
45566
45567  # Call helper function which possibly converts this using DOS-style short mode.
45568  # If so, the updated path is stored in $new_path.
45569
45570  input_path="$new_path"
45571  # Check if we need to convert this using DOS-style short mode. If the path
45572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45573  # take no chances and rewrite it.
45574  # Note: m4 eats our [], so we need to use [ and ] instead.
45575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45576  if test "x$has_forbidden_chars" != x; then
45577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45581      # Going to short mode and back again did indeed matter. Since short mode is
45582      # case insensitive, let's make it lowercase to improve readability.
45583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45584      # Now convert it back to Unix-style (cygpath)
45585      input_path=`$CYGPATH -u "$shortmode_path"`
45586      new_path="$input_path"
45587    fi
45588  fi
45589
45590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45591  if test "x$test_cygdrive_prefix" = x; then
45592    # As a simple fix, exclude /usr/bin since it's not a real path.
45593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45595      # a path prefixed by /cygdrive for fixpath to work.
45596      new_path="$CYGWIN_ROOT_PATH$input_path"
45597    fi
45598  fi
45599
45600
45601  if test "x$path" != "x$new_path"; then
45602    JT_HOME="$new_path"
45603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45604$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45605  fi
45606
45607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45608
45609  path="$JT_HOME"
45610  has_colon=`$ECHO $path | $GREP ^.:`
45611  new_path="$path"
45612  if test "x$has_colon" = x; then
45613    # Not in mixed or Windows style, start by that.
45614    new_path=`cmd //c echo $path`
45615  fi
45616
45617
45618  input_path="$new_path"
45619  # Check if we need to convert this using DOS-style short mode. If the path
45620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45621  # take no chances and rewrite it.
45622  # Note: m4 eats our [], so we need to use [ and ] instead.
45623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45624  if test "x$has_forbidden_chars" != x; then
45625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45627  fi
45628
45629
45630  windows_path="$new_path"
45631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45632    unix_path=`$CYGPATH -u "$windows_path"`
45633    new_path="$unix_path"
45634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45636    new_path="$unix_path"
45637  fi
45638
45639  if test "x$path" != "x$new_path"; then
45640    JT_HOME="$new_path"
45641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
45642$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
45643  fi
45644
45645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45647
45648    else
45649      # We're on a unix platform. Hooray! :)
45650      path="$JT_HOME"
45651      has_space=`$ECHO "$path" | $GREP " "`
45652      if test "x$has_space" != x; then
45653        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
45654$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
45655        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45656      fi
45657
45658      # Use eval to expand a potential ~
45659      eval path="$path"
45660      if test ! -f "$path" && test ! -d "$path"; then
45661        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
45662      fi
45663
45664      if test -d "$path"; then
45665        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
45666      else
45667        dir="`$DIRNAME "$path"`"
45668        base="`$BASENAME "$path"`"
45669        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
45670      fi
45671    fi
45672  fi
45673
45674
45675      # jtreg win32 script works for everybody
45676      JTREGEXE="$JT_HOME/bin/jtreg"
45677
45678      if test ! -f "$JTREGEXE"; then
45679        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
45680      fi
45681
45682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45683$as_echo "$JTREGEXE" >&6; }
45684    else
45685      # try to find jtreg on path
45686
45687
45688
45689  # Publish this variable in the help.
45690
45691
45692  if [ -z "${JTREGEXE+x}" ]; then
45693    # The variable is not set by user, try to locate tool using the code snippet
45694    for ac_prog in jtreg
45695do
45696  # Extract the first word of "$ac_prog", so it can be a program name with args.
45697set dummy $ac_prog; ac_word=$2
45698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45699$as_echo_n "checking for $ac_word... " >&6; }
45700if ${ac_cv_path_JTREGEXE+:} false; then :
45701  $as_echo_n "(cached) " >&6
45702else
45703  case $JTREGEXE in
45704  [\\/]* | ?:[\\/]*)
45705  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45706  ;;
45707  *)
45708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45709for as_dir in $PATH
45710do
45711  IFS=$as_save_IFS
45712  test -z "$as_dir" && as_dir=.
45713    for ac_exec_ext in '' $ac_executable_extensions; do
45714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45715    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45717    break 2
45718  fi
45719done
45720  done
45721IFS=$as_save_IFS
45722
45723  ;;
45724esac
45725fi
45726JTREGEXE=$ac_cv_path_JTREGEXE
45727if test -n "$JTREGEXE"; then
45728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45729$as_echo "$JTREGEXE" >&6; }
45730else
45731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45732$as_echo "no" >&6; }
45733fi
45734
45735
45736  test -n "$JTREGEXE" && break
45737done
45738
45739  else
45740    # The variable is set, but is it from the command line or the environment?
45741
45742    # Try to remove the string !JTREGEXE! from our list.
45743    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
45744    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45745      # If it failed, the variable was not from the command line. Ignore it,
45746      # but warn the user (except for BASH, which is always set by the calling BASH).
45747      if test "xJTREGEXE" != xBASH; then
45748        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
45749$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
45750      fi
45751      # Try to locate tool using the code snippet
45752      for ac_prog in jtreg
45753do
45754  # Extract the first word of "$ac_prog", so it can be a program name with args.
45755set dummy $ac_prog; ac_word=$2
45756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45757$as_echo_n "checking for $ac_word... " >&6; }
45758if ${ac_cv_path_JTREGEXE+:} false; then :
45759  $as_echo_n "(cached) " >&6
45760else
45761  case $JTREGEXE in
45762  [\\/]* | ?:[\\/]*)
45763  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45764  ;;
45765  *)
45766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45767for as_dir in $PATH
45768do
45769  IFS=$as_save_IFS
45770  test -z "$as_dir" && as_dir=.
45771    for ac_exec_ext in '' $ac_executable_extensions; do
45772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45773    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45775    break 2
45776  fi
45777done
45778  done
45779IFS=$as_save_IFS
45780
45781  ;;
45782esac
45783fi
45784JTREGEXE=$ac_cv_path_JTREGEXE
45785if test -n "$JTREGEXE"; then
45786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45787$as_echo "$JTREGEXE" >&6; }
45788else
45789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45790$as_echo "no" >&6; }
45791fi
45792
45793
45794  test -n "$JTREGEXE" && break
45795done
45796
45797    else
45798      # If it succeeded, then it was overridden by the user. We will use it
45799      # for the tool.
45800
45801      # First remove it from the list of overridden variables, so we can test
45802      # for unknown variables in the end.
45803      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45804
45805      # Check if we try to supply an empty value
45806      if test "x$JTREGEXE" = x; then
45807        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
45808$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
45809        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45810$as_echo_n "checking for JTREGEXE... " >&6; }
45811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45812$as_echo "disabled" >&6; }
45813      else
45814        # Check if the provided tool contains a complete path.
45815        tool_specified="$JTREGEXE"
45816        tool_basename="${tool_specified##*/}"
45817        if test "x$tool_basename" = "x$tool_specified"; then
45818          # A command without a complete path is provided, search $PATH.
45819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
45820$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
45821          # Extract the first word of "$tool_basename", so it can be a program name with args.
45822set dummy $tool_basename; ac_word=$2
45823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45824$as_echo_n "checking for $ac_word... " >&6; }
45825if ${ac_cv_path_JTREGEXE+:} false; then :
45826  $as_echo_n "(cached) " >&6
45827else
45828  case $JTREGEXE in
45829  [\\/]* | ?:[\\/]*)
45830  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
45831  ;;
45832  *)
45833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45834for as_dir in $PATH
45835do
45836  IFS=$as_save_IFS
45837  test -z "$as_dir" && as_dir=.
45838    for ac_exec_ext in '' $ac_executable_extensions; do
45839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45840    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
45841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45842    break 2
45843  fi
45844done
45845  done
45846IFS=$as_save_IFS
45847
45848  ;;
45849esac
45850fi
45851JTREGEXE=$ac_cv_path_JTREGEXE
45852if test -n "$JTREGEXE"; then
45853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
45854$as_echo "$JTREGEXE" >&6; }
45855else
45856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45857$as_echo "no" >&6; }
45858fi
45859
45860
45861          if test "x$JTREGEXE" = x; then
45862            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45863          fi
45864        else
45865          # Otherwise we believe it is a complete path. Use it as it is.
45866          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
45867$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
45868          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
45869$as_echo_n "checking for JTREGEXE... " >&6; }
45870          if test ! -x "$tool_specified"; then
45871            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45872$as_echo "not found" >&6; }
45873            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
45874          fi
45875          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45876$as_echo "$tool_specified" >&6; }
45877        fi
45878      fi
45879    fi
45880
45881  fi
45882
45883
45884
45885  if test "x$JTREGEXE" = x; then
45886    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
45887  fi
45888
45889
45890      JT_HOME="`$DIRNAME $JTREGEXE`"
45891    fi
45892  fi
45893
45894
45895
45896
45897
45898
45899  # Option used to tell the compiler whether to create 32- or 64-bit executables
45900  if test "x$TOOLCHAIN_TYPE" = xxlc; then
45901    COMPILER_TARGET_BITS_FLAG="-q"
45902  else
45903    COMPILER_TARGET_BITS_FLAG="-m"
45904  fi
45905
45906
45907  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
45908  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45909    ARFLAGS="-r"
45910  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45911    ARFLAGS="-X64"
45912  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
45913    # lib.exe is used as AR to create static libraries.
45914    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
45915  else
45916    ARFLAGS=""
45917  fi
45918
45919
45920  ## Setup strip.
45921  # FIXME: should this really be per platform, or should it be per toolchain type?
45922  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
45923  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
45924  if test "x$OPENJDK_TARGET_OS" = xlinux; then
45925    STRIPFLAGS="-g"
45926  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
45927    STRIPFLAGS="-x"
45928  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
45929    STRIPFLAGS="-S"
45930  elif test "x$OPENJDK_TARGET_OS" = xaix; then
45931    STRIPFLAGS="-X32_64"
45932  fi
45933
45934
45935
45936  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45937    CC_OUT_OPTION=-Fo
45938    EXE_OUT_OPTION=-out:
45939    LD_OUT_OPTION=-out:
45940    AR_OUT_OPTION=-out:
45941  else
45942    # The option used to specify the target .o,.a or .so file.
45943    # When compiling, how to specify the to be created object file.
45944    CC_OUT_OPTION='-o$(SPACE)'
45945    # When linking, how to specify the to be created executable.
45946    EXE_OUT_OPTION='-o$(SPACE)'
45947    # When linking, how to specify the to be created dynamically linkable library.
45948    LD_OUT_OPTION='-o$(SPACE)'
45949    # When archiving, how to specify the to be create static archive for object files.
45950    AR_OUT_OPTION='rcs$(SPACE)'
45951  fi
45952
45953
45954
45955
45956
45957  # On Windows, we need to set RC flags.
45958  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45959    RC_FLAGS="-nologo -l0x409"
45960    if test "x$VARIANT" = xOPT; then
45961      RC_FLAGS="$RC_FLAGS -DNDEBUG"
45962    fi
45963
45964    # The version variables used to create RC_FLAGS may be overridden
45965    # in a custom configure script, or possibly the command line.
45966    # Let those variables be expanded at make time in spec.gmk.
45967    # The \$ are escaped to the shell, and the $(...) variables
45968    # are evaluated by make.
45969    RC_FLAGS="$RC_FLAGS \
45970        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
45971        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
45972        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
45973        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
45974        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
45975        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
45976        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
45977  fi
45978
45979
45980  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
45981    # silence copyright notice and other headers.
45982    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
45983  fi
45984
45985
45986# FIXME: Currently we must test this after toolchain but before flags. Fix!
45987
45988# Now we can test some aspects on the target using configure macros.
45989
45990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
45991$as_echo_n "checking for ANSI C header files... " >&6; }
45992if ${ac_cv_header_stdc+:} false; then :
45993  $as_echo_n "(cached) " >&6
45994else
45995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45996/* end confdefs.h.  */
45997#include <stdlib.h>
45998#include <stdarg.h>
45999#include <string.h>
46000#include <float.h>
46001
46002int
46003main ()
46004{
46005
46006  ;
46007  return 0;
46008}
46009_ACEOF
46010if ac_fn_cxx_try_compile "$LINENO"; then :
46011  ac_cv_header_stdc=yes
46012else
46013  ac_cv_header_stdc=no
46014fi
46015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46016
46017if test $ac_cv_header_stdc = yes; then
46018  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
46019  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46020/* end confdefs.h.  */
46021#include <string.h>
46022
46023_ACEOF
46024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46025  $EGREP "memchr" >/dev/null 2>&1; then :
46026
46027else
46028  ac_cv_header_stdc=no
46029fi
46030rm -f conftest*
46031
46032fi
46033
46034if test $ac_cv_header_stdc = yes; then
46035  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
46036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46037/* end confdefs.h.  */
46038#include <stdlib.h>
46039
46040_ACEOF
46041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
46042  $EGREP "free" >/dev/null 2>&1; then :
46043
46044else
46045  ac_cv_header_stdc=no
46046fi
46047rm -f conftest*
46048
46049fi
46050
46051if test $ac_cv_header_stdc = yes; then
46052  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
46053  if test "$cross_compiling" = yes; then :
46054  :
46055else
46056  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46057/* end confdefs.h.  */
46058#include <ctype.h>
46059#include <stdlib.h>
46060#if ((' ' & 0x0FF) == 0x020)
46061# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
46062# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
46063#else
46064# define ISLOWER(c) \
46065		   (('a' <= (c) && (c) <= 'i') \
46066		     || ('j' <= (c) && (c) <= 'r') \
46067		     || ('s' <= (c) && (c) <= 'z'))
46068# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
46069#endif
46070
46071#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
46072int
46073main ()
46074{
46075  int i;
46076  for (i = 0; i < 256; i++)
46077    if (XOR (islower (i), ISLOWER (i))
46078	|| toupper (i) != TOUPPER (i))
46079      return 2;
46080  return 0;
46081}
46082_ACEOF
46083if ac_fn_cxx_try_run "$LINENO"; then :
46084
46085else
46086  ac_cv_header_stdc=no
46087fi
46088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46089  conftest.$ac_objext conftest.beam conftest.$ac_ext
46090fi
46091
46092fi
46093fi
46094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
46095$as_echo "$ac_cv_header_stdc" >&6; }
46096if test $ac_cv_header_stdc = yes; then
46097
46098$as_echo "#define STDC_HEADERS 1" >>confdefs.h
46099
46100fi
46101
46102# On IRIX 5.3, sys/types and inttypes.h are conflicting.
46103for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
46104		  inttypes.h stdint.h unistd.h
46105do :
46106  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
46107ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
46108"
46109if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
46110  cat >>confdefs.h <<_ACEOF
46111#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
46112_ACEOF
46113
46114fi
46115
46116done
46117
46118
46119
46120  ###############################################################################
46121  #
46122  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
46123  # (The JVM can use 32 or 64 bit Java pointers but that decision
46124  # is made at runtime.)
46125  #
46126
46127  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
46128    # Always specify -m flag on Solaris
46129    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
46130
46131  # When we add flags to the "official" CFLAGS etc, we need to
46132  # keep track of these additions in ADDED_CFLAGS etc. These
46133  # will later be checked to make sure only controlled additions
46134  # have been made to CFLAGS etc.
46135  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46136  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46137  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46138
46139  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46140  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46141  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46142
46143  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46144  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46145  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46146
46147  elif test "x$COMPILE_TYPE" = xreduced; then
46148    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
46149      # Specify -m if running reduced on unix platforms
46150
46151  # When we add flags to the "official" CFLAGS etc, we need to
46152  # keep track of these additions in ADDED_CFLAGS etc. These
46153  # will later be checked to make sure only controlled additions
46154  # have been made to CFLAGS etc.
46155  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46156  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46157  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46158
46159  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46160  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46161  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46162
46163  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46164  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46165  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46166
46167    fi
46168  fi
46169
46170  # Make compilation sanity check
46171  for ac_header in stdio.h
46172do :
46173  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
46174if test "x$ac_cv_header_stdio_h" = xyes; then :
46175  cat >>confdefs.h <<_ACEOF
46176#define HAVE_STDIO_H 1
46177_ACEOF
46178
46179else
46180
46181    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
46182$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
46183    if test "x$COMPILE_TYPE" = xreduced; then
46184
46185  # Print a helpful message on how to acquire the necessary build dependency.
46186  # reduced is the help tag: freetype, cups, alsa etc
46187  MISSING_DEPENDENCY=reduced
46188
46189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46190    cygwin_help $MISSING_DEPENDENCY
46191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46192    msys_help $MISSING_DEPENDENCY
46193  else
46194    PKGHANDLER_COMMAND=
46195
46196    case $PKGHANDLER in
46197      apt-get)
46198        apt_help     $MISSING_DEPENDENCY ;;
46199      yum)
46200        yum_help     $MISSING_DEPENDENCY ;;
46201      port)
46202        port_help    $MISSING_DEPENDENCY ;;
46203      pkgutil)
46204        pkgutil_help $MISSING_DEPENDENCY ;;
46205      pkgadd)
46206        pkgadd_help  $MISSING_DEPENDENCY ;;
46207    esac
46208
46209    if test "x$PKGHANDLER_COMMAND" != x; then
46210      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46211    fi
46212  fi
46213
46214      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46215$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46216    elif test "x$COMPILE_TYPE" = xcross; then
46217      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46218$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46219    fi
46220    as_fn_error $? "Cannot continue." "$LINENO" 5
46221
46222fi
46223
46224done
46225
46226
46227  # The cast to long int works around a bug in the HP C Compiler
46228# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46229# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46230# This bug is HP SR number 8606223364.
46231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46232$as_echo_n "checking size of int *... " >&6; }
46233if ${ac_cv_sizeof_int_p+:} false; then :
46234  $as_echo_n "(cached) " >&6
46235else
46236  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46237
46238else
46239  if test "$ac_cv_type_int_p" = yes; then
46240     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46242as_fn_error 77 "cannot compute sizeof (int *)
46243See \`config.log' for more details" "$LINENO" 5; }
46244   else
46245     ac_cv_sizeof_int_p=0
46246   fi
46247fi
46248
46249fi
46250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46251$as_echo "$ac_cv_sizeof_int_p" >&6; }
46252
46253
46254
46255cat >>confdefs.h <<_ACEOF
46256#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46257_ACEOF
46258
46259
46260
46261  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
46262  if test "x$ac_cv_sizeof_int_p" = x; then
46263    # The test failed, lets stick to the assumed value.
46264    { $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
46265$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
46266  else
46267    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46268
46269    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46270      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
46271      # Let's try to implicitely set the compilers target architecture and retry the test
46272      { $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
46273$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;}
46274      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
46275$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
46276
46277  # When we add flags to the "official" CFLAGS etc, we need to
46278  # keep track of these additions in ADDED_CFLAGS etc. These
46279  # will later be checked to make sure only controlled additions
46280  # have been made to CFLAGS etc.
46281  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46282  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46283  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
46284
46285  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
46286  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
46287  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
46288
46289  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
46290  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
46291  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
46292
46293
46294      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
46295      unset ac_cv_sizeof_int_p
46296      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
46297      cat >>confdefs.h <<_ACEOF
46298#undef SIZEOF_INT_P
46299_ACEOF
46300
46301      # The cast to long int works around a bug in the HP C Compiler
46302# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
46303# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
46304# This bug is HP SR number 8606223364.
46305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
46306$as_echo_n "checking size of int *... " >&6; }
46307if ${ac_cv_sizeof_int_p+:} false; then :
46308  $as_echo_n "(cached) " >&6
46309else
46310  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
46311
46312else
46313  if test "$ac_cv_type_int_p" = yes; then
46314     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
46315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
46316as_fn_error 77 "cannot compute sizeof (int *)
46317See \`config.log' for more details" "$LINENO" 5; }
46318   else
46319     ac_cv_sizeof_int_p=0
46320   fi
46321fi
46322
46323fi
46324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
46325$as_echo "$ac_cv_sizeof_int_p" >&6; }
46326
46327
46328
46329cat >>confdefs.h <<_ACEOF
46330#define SIZEOF_INT_P $ac_cv_sizeof_int_p
46331_ACEOF
46332
46333
46334
46335      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
46336
46337      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
46338        { $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
46339$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;}
46340        if test "x$COMPILE_TYPE" = xreduced; then
46341
46342  # Print a helpful message on how to acquire the necessary build dependency.
46343  # reduced is the help tag: freetype, cups, alsa etc
46344  MISSING_DEPENDENCY=reduced
46345
46346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46347    cygwin_help $MISSING_DEPENDENCY
46348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46349    msys_help $MISSING_DEPENDENCY
46350  else
46351    PKGHANDLER_COMMAND=
46352
46353    case $PKGHANDLER in
46354      apt-get)
46355        apt_help     $MISSING_DEPENDENCY ;;
46356      yum)
46357        yum_help     $MISSING_DEPENDENCY ;;
46358      port)
46359        port_help    $MISSING_DEPENDENCY ;;
46360      pkgutil)
46361        pkgutil_help $MISSING_DEPENDENCY ;;
46362      pkgadd)
46363        pkgadd_help  $MISSING_DEPENDENCY ;;
46364    esac
46365
46366    if test "x$PKGHANDLER_COMMAND" != x; then
46367      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46368    fi
46369  fi
46370
46371          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
46372$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
46373        elif test "x$COMPILE_TYPE" = xcross; then
46374          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
46375$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
46376        fi
46377        as_fn_error $? "Cannot continue." "$LINENO" 5
46378      fi
46379    fi
46380  fi
46381
46382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
46383$as_echo_n "checking for target address size... " >&6; }
46384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
46385$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
46386
46387
46388  ###############################################################################
46389  #
46390  # Is the target little of big endian?
46391  #
46392   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
46393$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
46394if ${ac_cv_c_bigendian+:} false; then :
46395  $as_echo_n "(cached) " >&6
46396else
46397  ac_cv_c_bigendian=unknown
46398    # See if we're dealing with a universal compiler.
46399    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46400/* end confdefs.h.  */
46401#ifndef __APPLE_CC__
46402	       not a universal capable compiler
46403	     #endif
46404	     typedef int dummy;
46405
46406_ACEOF
46407if ac_fn_cxx_try_compile "$LINENO"; then :
46408
46409	# Check for potential -arch flags.  It is not universal unless
46410	# there are at least two -arch flags with different values.
46411	ac_arch=
46412	ac_prev=
46413	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
46414	 if test -n "$ac_prev"; then
46415	   case $ac_word in
46416	     i?86 | x86_64 | ppc | ppc64)
46417	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
46418		 ac_arch=$ac_word
46419	       else
46420		 ac_cv_c_bigendian=universal
46421		 break
46422	       fi
46423	       ;;
46424	   esac
46425	   ac_prev=
46426	 elif test "x$ac_word" = "x-arch"; then
46427	   ac_prev=arch
46428	 fi
46429       done
46430fi
46431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46432    if test $ac_cv_c_bigendian = unknown; then
46433      # See if sys/param.h defines the BYTE_ORDER macro.
46434      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46435/* end confdefs.h.  */
46436#include <sys/types.h>
46437	     #include <sys/param.h>
46438
46439int
46440main ()
46441{
46442#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
46443		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
46444		     && LITTLE_ENDIAN)
46445	      bogus endian macros
46446	     #endif
46447
46448  ;
46449  return 0;
46450}
46451_ACEOF
46452if ac_fn_cxx_try_compile "$LINENO"; then :
46453  # It does; now see whether it defined to BIG_ENDIAN or not.
46454	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46455/* end confdefs.h.  */
46456#include <sys/types.h>
46457		#include <sys/param.h>
46458
46459int
46460main ()
46461{
46462#if BYTE_ORDER != BIG_ENDIAN
46463		 not big endian
46464		#endif
46465
46466  ;
46467  return 0;
46468}
46469_ACEOF
46470if ac_fn_cxx_try_compile "$LINENO"; then :
46471  ac_cv_c_bigendian=yes
46472else
46473  ac_cv_c_bigendian=no
46474fi
46475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46476fi
46477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46478    fi
46479    if test $ac_cv_c_bigendian = unknown; then
46480      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
46481      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46482/* end confdefs.h.  */
46483#include <limits.h>
46484
46485int
46486main ()
46487{
46488#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
46489	      bogus endian macros
46490	     #endif
46491
46492  ;
46493  return 0;
46494}
46495_ACEOF
46496if ac_fn_cxx_try_compile "$LINENO"; then :
46497  # It does; now see whether it defined to _BIG_ENDIAN or not.
46498	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46499/* end confdefs.h.  */
46500#include <limits.h>
46501
46502int
46503main ()
46504{
46505#ifndef _BIG_ENDIAN
46506		 not big endian
46507		#endif
46508
46509  ;
46510  return 0;
46511}
46512_ACEOF
46513if ac_fn_cxx_try_compile "$LINENO"; then :
46514  ac_cv_c_bigendian=yes
46515else
46516  ac_cv_c_bigendian=no
46517fi
46518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46519fi
46520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46521    fi
46522    if test $ac_cv_c_bigendian = unknown; then
46523      # Compile a test program.
46524      if test "$cross_compiling" = yes; then :
46525  # Try to guess by grepping values from an object file.
46526	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46527/* end confdefs.h.  */
46528short int ascii_mm[] =
46529		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
46530		short int ascii_ii[] =
46531		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
46532		int use_ascii (int i) {
46533		  return ascii_mm[i] + ascii_ii[i];
46534		}
46535		short int ebcdic_ii[] =
46536		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
46537		short int ebcdic_mm[] =
46538		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
46539		int use_ebcdic (int i) {
46540		  return ebcdic_mm[i] + ebcdic_ii[i];
46541		}
46542		extern int foo;
46543
46544int
46545main ()
46546{
46547return use_ascii (foo) == use_ebcdic (foo);
46548  ;
46549  return 0;
46550}
46551_ACEOF
46552if ac_fn_cxx_try_compile "$LINENO"; then :
46553  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
46554	      ac_cv_c_bigendian=yes
46555	    fi
46556	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
46557	      if test "$ac_cv_c_bigendian" = unknown; then
46558		ac_cv_c_bigendian=no
46559	      else
46560		# finding both strings is unlikely to happen, but who knows?
46561		ac_cv_c_bigendian=unknown
46562	      fi
46563	    fi
46564fi
46565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46566else
46567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46568/* end confdefs.h.  */
46569$ac_includes_default
46570int
46571main ()
46572{
46573
46574	     /* Are we little or big endian?  From Harbison&Steele.  */
46575	     union
46576	     {
46577	       long int l;
46578	       char c[sizeof (long int)];
46579	     } u;
46580	     u.l = 1;
46581	     return u.c[sizeof (long int) - 1] == 1;
46582
46583  ;
46584  return 0;
46585}
46586_ACEOF
46587if ac_fn_cxx_try_run "$LINENO"; then :
46588  ac_cv_c_bigendian=no
46589else
46590  ac_cv_c_bigendian=yes
46591fi
46592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
46593  conftest.$ac_objext conftest.beam conftest.$ac_ext
46594fi
46595
46596    fi
46597fi
46598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
46599$as_echo "$ac_cv_c_bigendian" >&6; }
46600 case $ac_cv_c_bigendian in #(
46601   yes)
46602     ENDIAN="big";; #(
46603   no)
46604     ENDIAN="little" ;; #(
46605   universal)
46606     ENDIAN="universal_endianness"
46607     ;; #(
46608   *)
46609     ENDIAN="unknown" ;;
46610 esac
46611
46612
46613  if test "x$ENDIAN" = xuniversal_endianness; then
46614    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
46615  fi
46616  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
46617    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
46618  fi
46619
46620
46621# Configure flags for the tools
46622
46623  ###############################################################################
46624  #
46625  # How to compile shared libraries.
46626  #
46627
46628  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46629    PICFLAG="-fPIC"
46630    C_FLAG_REORDER=''
46631    CXX_FLAG_REORDER=''
46632
46633    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46634      # Linking is different on MacOSX
46635      if test "x$STATIC_BUILD" = xtrue; then
46636        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
46637      else
46638        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46639      fi
46640      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46641      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46642      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46643      SET_SHARED_LIBRARY_MAPFILE=''
46644    else
46645      # Default works for linux, might work on other platforms as well.
46646      SHARED_LIBRARY_FLAGS='-shared'
46647      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46648      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46649      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46650      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46651    fi
46652  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46653    PICFLAG=''
46654    C_FLAG_REORDER=''
46655    CXX_FLAG_REORDER=''
46656
46657    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46658      # Linking is different on MacOSX
46659      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
46660      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
46661      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46662      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
46663      SET_SHARED_LIBRARY_MAPFILE=''
46664    else
46665      # Default works for linux, might work on other platforms as well.
46666      SHARED_LIBRARY_FLAGS='-shared'
46667      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
46668      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
46669      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
46670      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
46671    fi
46672  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46673    PICFLAG="-KPIC"
46674    C_FLAG_REORDER='-xF'
46675    CXX_FLAG_REORDER='-xF'
46676    SHARED_LIBRARY_FLAGS="-G"
46677    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
46678    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
46679    SET_SHARED_LIBRARY_NAME=''
46680    SET_SHARED_LIBRARY_MAPFILE='-M$1'
46681  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46682    PICFLAG="-qpic=large"
46683    C_FLAG_REORDER=''
46684    CXX_FLAG_REORDER=''
46685    SHARED_LIBRARY_FLAGS="-qmkshrobj"
46686    SET_EXECUTABLE_ORIGIN=""
46687    SET_SHARED_LIBRARY_ORIGIN=''
46688    SET_SHARED_LIBRARY_NAME=''
46689    SET_SHARED_LIBRARY_MAPFILE=''
46690  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46691    PICFLAG=""
46692    C_FLAG_REORDER=''
46693    CXX_FLAG_REORDER=''
46694    SHARED_LIBRARY_FLAGS="-LD"
46695    SET_EXECUTABLE_ORIGIN=''
46696    SET_SHARED_LIBRARY_ORIGIN=''
46697    SET_SHARED_LIBRARY_NAME=''
46698    SET_SHARED_LIBRARY_MAPFILE=''
46699  fi
46700
46701
46702
46703
46704
46705
46706
46707
46708  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46709    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
46710    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
46711    CFLAGS_JDKLIB_EXTRA='-xstrconst'
46712  fi
46713  # The (cross) compiler is now configured, we can now test capabilities
46714  # of the target platform.
46715
46716
46717
46718  ###############################################################################
46719  #
46720  # Setup the opt flags for different compilers
46721  # and different operating systems.
46722  #
46723
46724  # FIXME: this was indirectly the old default, but just inherited.
46725  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46726  #   C_FLAG_DEPS="-MMD -MF"
46727  # fi
46728
46729  # Generate make dependency files
46730  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46731    C_FLAG_DEPS="-MMD -MF"
46732  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46733    C_FLAG_DEPS="-MMD -MF"
46734  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46735    C_FLAG_DEPS="-xMMD -xMF"
46736  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46737    C_FLAG_DEPS="-qmakedep=gcc -MF"
46738  fi
46739  CXX_FLAG_DEPS="$C_FLAG_DEPS"
46740
46741
46742
46743  # Debug symbols
46744  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46745    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
46746      # reduce from default "-g2" option to save space
46747      CFLAGS_DEBUG_SYMBOLS="-g1"
46748      CXXFLAGS_DEBUG_SYMBOLS="-g1"
46749    else
46750      CFLAGS_DEBUG_SYMBOLS="-g"
46751      CXXFLAGS_DEBUG_SYMBOLS="-g"
46752    fi
46753  elif test "x$TOOLCHAIN_TYPE" = xclang; then
46754    CFLAGS_DEBUG_SYMBOLS="-g"
46755    CXXFLAGS_DEBUG_SYMBOLS="-g"
46756  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46757    CFLAGS_DEBUG_SYMBOLS="-g -xs"
46758    # FIXME: likely a bug, this disables debug symbols rather than enables them
46759    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
46760  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46761    CFLAGS_DEBUG_SYMBOLS="-g"
46762    CXXFLAGS_DEBUG_SYMBOLS="-g"
46763  fi
46764
46765
46766
46767  # bounds, memory and behavior checking options
46768  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46769    case $DEBUG_LEVEL in
46770    release )
46771      # no adjustment
46772      ;;
46773    fastdebug )
46774      # no adjustment
46775      ;;
46776    slowdebug )
46777      # Add runtime stack smashing and undefined behavior checks.
46778      # Not all versions of gcc support -fstack-protector
46779      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
46780
46781  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
46782$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
46783  supports=yes
46784
46785  saved_cflags="$CFLAGS"
46786  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
46787  ac_ext=c
46788ac_cpp='$CPP $CPPFLAGS'
46789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46791ac_compiler_gnu=$ac_cv_c_compiler_gnu
46792
46793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46794/* end confdefs.h.  */
46795int i;
46796_ACEOF
46797if ac_fn_c_try_compile "$LINENO"; then :
46798
46799else
46800  supports=no
46801fi
46802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46803  ac_ext=cpp
46804ac_cpp='$CXXCPP $CPPFLAGS'
46805ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46806ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46807ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46808
46809  CFLAGS="$saved_cflags"
46810
46811  saved_cxxflags="$CXXFLAGS"
46812  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
46813  ac_ext=cpp
46814ac_cpp='$CXXCPP $CPPFLAGS'
46815ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46816ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46817ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46818
46819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46820/* end confdefs.h.  */
46821int i;
46822_ACEOF
46823if ac_fn_cxx_try_compile "$LINENO"; then :
46824
46825else
46826  supports=no
46827fi
46828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46829  ac_ext=cpp
46830ac_cpp='$CXXCPP $CPPFLAGS'
46831ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46832ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46833ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46834
46835  CXXFLAGS="$saved_cxxflags"
46836
46837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46838$as_echo "$supports" >&6; }
46839  if test "x$supports" = "xyes" ; then
46840    :
46841  else
46842    STACK_PROTECTOR_CFLAG=""
46843  fi
46844
46845
46846      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46847      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
46848      ;;
46849    esac
46850  fi
46851
46852  # Optimization levels
46853  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46854    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
46855
46856    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
46857      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
46858      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
46859      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
46860      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
46861      C_O_FLAG_DEBUG="-xregs=no%frameptr"
46862      C_O_FLAG_NONE="-xregs=no%frameptr"
46863      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
46864      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
46865      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
46866      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
46867      CXX_O_FLAG_NONE="-xregs=no%frameptr"
46868      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
46869        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
46870        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
46871      fi
46872    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46873      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
46874      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46875      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
46876      C_O_FLAG_DEBUG=""
46877      C_O_FLAG_NONE=""
46878      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
46879      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46880      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
46881      C_O_FLAG_DEBUG=""
46882      CXX_O_FLAG_NONE=""
46883    fi
46884  else
46885    # The remaining toolchains share opt flags between CC and CXX;
46886    # setup for C and duplicate afterwards.
46887    if test "x$TOOLCHAIN_TYPE" = xgcc; then
46888      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46889        # On MacOSX we optimize for size, something
46890        # we should do for all platforms?
46891        C_O_FLAG_HIGHEST="-Os"
46892        C_O_FLAG_HI="-Os"
46893        C_O_FLAG_NORM="-Os"
46894      else
46895        C_O_FLAG_HIGHEST="-O3"
46896        C_O_FLAG_HI="-O3"
46897        C_O_FLAG_NORM="-O2"
46898      fi
46899      C_O_FLAG_DEBUG="-O0"
46900      C_O_FLAG_NONE="-O0"
46901    elif test "x$TOOLCHAIN_TYPE" = xclang; then
46902      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46903        # On MacOSX we optimize for size, something
46904        # we should do for all platforms?
46905        C_O_FLAG_HIGHEST="-Os"
46906        C_O_FLAG_HI="-Os"
46907        C_O_FLAG_NORM="-Os"
46908      else
46909        C_O_FLAG_HIGHEST="-O3"
46910        C_O_FLAG_HI="-O3"
46911        C_O_FLAG_NORM="-O2"
46912      fi
46913      C_O_FLAG_DEBUG="-O0"
46914      C_O_FLAG_NONE="-O0"
46915    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46916      C_O_FLAG_HIGHEST="-O3"
46917      C_O_FLAG_HI="-O3 -qstrict"
46918      C_O_FLAG_NORM="-O2"
46919      C_O_FLAG_DEBUG="-qnoopt"
46920      C_O_FLAG_NONE="-qnoop"
46921    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46922      C_O_FLAG_HIGHEST="-O2"
46923      C_O_FLAG_HI="-O1"
46924      C_O_FLAG_NORM="-O1"
46925      C_O_FLAG_DEBUG="-Od"
46926      C_O_FLAG_NONE="-Od"
46927    fi
46928    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
46929    CXX_O_FLAG_HI="$C_O_FLAG_HI"
46930    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
46931    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
46932    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
46933  fi
46934
46935  # Adjust optimization flags according to debug level.
46936  case $DEBUG_LEVEL in
46937    release )
46938      # no adjustment
46939      ;;
46940    fastdebug )
46941      # Not quite so much optimization
46942      C_O_FLAG_HI="$C_O_FLAG_NORM"
46943      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
46944      ;;
46945    slowdebug )
46946      # Disable optimization
46947      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
46948      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
46949      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
46950      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
46951      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
46952      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
46953      ;;
46954  esac
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968  # Special extras...
46969  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46970    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
46971      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46972      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
46973    fi
46974    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46975    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
46976  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46977    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46978    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
46979  fi
46980
46981  CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
46982  CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
46983  LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
46984
46985  ###############################################################################
46986  #
46987  # Now setup the CFLAGS and LDFLAGS for the JDK build.
46988  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
46989  #
46990
46991  # Setup compiler/platform specific flags into
46992  #    CFLAGS_JDK    - C Compiler flags
46993  #    CXXFLAGS_JDK  - C++ Compiler flags
46994  #    COMMON_CCXXFLAGS_JDK - common to C and C++
46995  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46996    if test "x$OPENJDK_TARGET_CPU" = xx86; then
46997      # Force compatibility with i586 on 32 bit intel platforms.
46998      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
46999    fi
47000    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
47001        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
47002    case $OPENJDK_TARGET_CPU_ARCH in
47003      arm )
47004        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47005        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47006        ;;
47007      ppc )
47008        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
47009        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47010        ;;
47011      * )
47012        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
47013        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
47014        ;;
47015    esac
47016  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47017    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
47018    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
47019      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
47020    fi
47021
47022    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
47023    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
47024  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47025    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47026    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
47027  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47028    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
47029        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
47030        -DWIN32_LEAN_AND_MEAN \
47031        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
47032        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
47033        -DWIN32 -DIAL"
47034    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
47035      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
47036    else
47037      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
47038    fi
47039    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
47040    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
47041    # studio.
47042    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
47043      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47044          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
47045    fi
47046  fi
47047
47048  ###############################################################################
47049
47050  # Adjust flags according to debug level.
47051  case $DEBUG_LEVEL in
47052    fastdebug | slowdebug )
47053      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
47054      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
47055      JAVAC_FLAGS="$JAVAC_FLAGS -g"
47056      ;;
47057    release )
47058      ;;
47059    * )
47060      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47061      ;;
47062  esac
47063
47064  # Setup LP64
47065  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
47066
47067  # Set some common defines. These works for all compilers, but assume
47068  # -D is universally accepted.
47069
47070  # Setup endianness
47071  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
47072    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
47073    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
47074    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
47075    #   Note: -Dmacro         is the same as    #define macro 1
47076    #         -Dmacro=        is the same as    #define macro
47077    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47078      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
47079    else
47080      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
47081    fi
47082  else
47083    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
47084    # are defined in the system?
47085    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47086      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
47087    else
47088      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
47089    fi
47090  fi
47091
47092  # Setup target OS define. Use OS target name but in upper case.
47093  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
47094  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
47095
47096  # Setup target CPU
47097  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
47098
47099  # Setup debug/release defines
47100  if test "x$DEBUG_LEVEL" = xrelease; then
47101    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
47102    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
47103      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
47104    fi
47105  else
47106    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
47107  fi
47108
47109  # Set some additional per-OS defines.
47110  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47111    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
47112  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47113    # FIXME: PPC64 should not be here.
47114    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
47115  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
47116    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
47117  fi
47118
47119  # Additional macosx handling
47120  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47121    # Setting these parameters makes it an error to link to macosx APIs that are
47122    # newer than the given OS version and makes the linked binaries compatible
47123    # even if built on a newer version of the OS.
47124    # The expected format is X.Y.Z
47125    MACOSX_VERSION_MIN=10.7.0
47126
47127
47128    # The macro takes the version with no dots, ex: 1070
47129    # Let the flags variables get resolved in make for easier override on make
47130    # command line.
47131    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47132    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
47133  fi
47134
47135  # Setup some hard coded includes
47136  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
47137      -I${JDK_TOPDIR}/src/java.base/share/native/include \
47138      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
47139      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
47140      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
47141      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
47142
47143  # The shared libraries are compiled using the picflag.
47144  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47145  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47146
47147  # Executable flags
47148  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47149  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47150
47151
47152
47153
47154
47155
47156  # Flags for compiling test libraries
47157  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
47158  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
47159
47160  # Flags for compiling test executables
47161  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
47162  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
47163
47164
47165
47166
47167
47168
47169  # Setup LDFLAGS et al.
47170  #
47171
47172  # Now this is odd. The JDK native libraries have to link against libjvm.so
47173  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
47174  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
47175  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
47176  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
47177  # libraries will link to whatever is in memory. Yuck.
47178  #
47179  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
47180  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47181    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
47182    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
47183      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
47184    fi
47185    # TODO: make -debug optional "--disable-full-debug-symbols"
47186    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
47187  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
47188    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47189    # We have previously set HAS_GNU_HASH if this is the case
47190    if test -n "$HAS_GNU_HASH"; then
47191      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
47192    fi
47193    if test "x$OPENJDK_TARGET_OS" = xlinux; then
47194      # And since we now know that the linker is gnu, then add -z defs, to forbid
47195      # undefined symbols in object files.
47196      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
47197      case $DEBUG_LEVEL in
47198        release )
47199          # tell linker to optimize libraries.
47200          # Should this be supplied to the OSS linker as well?
47201          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
47202          ;;
47203        slowdebug )
47204          if test "x$HAS_LINKER_NOW" = "xtrue"; then
47205            # do relocations at load
47206            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
47207            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
47208          fi
47209          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47210            # mark relocations read only
47211            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47212            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47213          fi
47214          ;;
47215        fastdebug )
47216          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
47217            # mark relocations read only
47218            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
47219            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
47220          fi
47221          ;;
47222        * )
47223          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
47224          ;;
47225        esac
47226    fi
47227  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47228    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
47229    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
47230  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47231    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok"
47232  fi
47233
47234  # Customize LDFLAGS for executables
47235
47236  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
47237
47238  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47239    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
47240      LDFLAGS_STACK_SIZE=1048576
47241    else
47242      LDFLAGS_STACK_SIZE=327680
47243    fi
47244    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
47245  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
47246    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
47247  fi
47248
47249  # Customize LDFLAGS for libs
47250  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
47251
47252  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47253    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
47254    JDKLIB_LIBS=""
47255  else
47256    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
47257        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
47258
47259    # On some platforms (mac) the linker warns about non existing -L dirs.
47260    # Add server first if available. Linking aginst client does not always produce the same results.
47261    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
47262    # Default to server for other variants.
47263    if test "x$JVM_VARIANT_SERVER" = xtrue; then
47264      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47265    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
47266      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
47267    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
47268      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
47269    else
47270      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
47271    fi
47272
47273    JDKLIB_LIBS="-ljava -ljvm"
47274    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47275      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
47276    fi
47277  fi
47278
47279
47280
47281
47282
47283
47284
47285  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
47286  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
47287
47288
47289
47290
47291
47292  # Some Zero and Shark settings.
47293  # ZERO_ARCHFLAG tells the compiler which mode to build for
47294  case "${OPENJDK_TARGET_CPU}" in
47295    s390)
47296      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
47297      ;;
47298    *)
47299      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47300  esac
47301
47302  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
47303$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
47304  supports=yes
47305
47306  saved_cflags="$CFLAGS"
47307  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
47308  ac_ext=c
47309ac_cpp='$CPP $CPPFLAGS'
47310ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47311ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47312ac_compiler_gnu=$ac_cv_c_compiler_gnu
47313
47314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47315/* end confdefs.h.  */
47316int i;
47317_ACEOF
47318if ac_fn_c_try_compile "$LINENO"; then :
47319
47320else
47321  supports=no
47322fi
47323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47324  ac_ext=cpp
47325ac_cpp='$CXXCPP $CPPFLAGS'
47326ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47327ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47328ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47329
47330  CFLAGS="$saved_cflags"
47331
47332  saved_cxxflags="$CXXFLAGS"
47333  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
47334  ac_ext=cpp
47335ac_cpp='$CXXCPP $CPPFLAGS'
47336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47339
47340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47341/* end confdefs.h.  */
47342int i;
47343_ACEOF
47344if ac_fn_cxx_try_compile "$LINENO"; then :
47345
47346else
47347  supports=no
47348fi
47349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47350  ac_ext=cpp
47351ac_cpp='$CXXCPP $CPPFLAGS'
47352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47353ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47355
47356  CXXFLAGS="$saved_cxxflags"
47357
47358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47359$as_echo "$supports" >&6; }
47360  if test "x$supports" = "xyes" ; then
47361    :
47362  else
47363    ZERO_ARCHFLAG=""
47364  fi
47365
47366
47367
47368  # Check that the compiler supports -mX (or -qX on AIX) flags
47369  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
47370
47371  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
47372$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
47373  supports=yes
47374
47375  saved_cflags="$CFLAGS"
47376  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47377  ac_ext=c
47378ac_cpp='$CPP $CPPFLAGS'
47379ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47380ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47381ac_compiler_gnu=$ac_cv_c_compiler_gnu
47382
47383  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47384/* end confdefs.h.  */
47385int i;
47386_ACEOF
47387if ac_fn_c_try_compile "$LINENO"; then :
47388
47389else
47390  supports=no
47391fi
47392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47393  ac_ext=cpp
47394ac_cpp='$CXXCPP $CPPFLAGS'
47395ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47396ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47397ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47398
47399  CFLAGS="$saved_cflags"
47400
47401  saved_cxxflags="$CXXFLAGS"
47402  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47403  ac_ext=cpp
47404ac_cpp='$CXXCPP $CPPFLAGS'
47405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47408
47409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47410/* end confdefs.h.  */
47411int i;
47412_ACEOF
47413if ac_fn_cxx_try_compile "$LINENO"; then :
47414
47415else
47416  supports=no
47417fi
47418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47419  ac_ext=cpp
47420ac_cpp='$CXXCPP $CPPFLAGS'
47421ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47422ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47423ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47424
47425  CXXFLAGS="$saved_cxxflags"
47426
47427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47428$as_echo "$supports" >&6; }
47429  if test "x$supports" = "xyes" ; then
47430    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
47431  else
47432    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
47433  fi
47434
47435
47436
47437  # Check whether --enable-warnings-as-errors was given.
47438if test "${enable_warnings_as_errors+set}" = set; then :
47439  enableval=$enable_warnings_as_errors;
47440fi
47441
47442
47443  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
47444$as_echo_n "checking if native warnings are errors... " >&6; }
47445  if test "x$enable_warnings_as_errors" = "xyes"; then
47446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
47447$as_echo "yes (explicitely set)" >&6; }
47448    WARNINGS_AS_ERRORS=true
47449  elif test "x$enable_warnings_as_errors" = "xno"; then
47450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47451$as_echo "no" >&6; }
47452    WARNINGS_AS_ERRORS=false
47453  elif test "x$enable_warnings_as_errors" = "x"; then
47454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
47455$as_echo "yes (default)" >&6; }
47456    WARNINGS_AS_ERRORS=true
47457  else
47458    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
47459  fi
47460
47461  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
47462    # Set legacy hotspot variable
47463    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
47464  else
47465    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
47466  fi
47467
47468
47469
47470
47471  case "${TOOLCHAIN_TYPE}" in
47472    microsoft)
47473      DISABLE_WARNING_PREFIX="-wd"
47474      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
47475      ;;
47476    solstudio)
47477      DISABLE_WARNING_PREFIX="-erroff="
47478      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
47479      ;;
47480    gcc)
47481      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
47482
47483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47484$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47485  supports=yes
47486
47487  saved_cflags="$CFLAGS"
47488  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47489  ac_ext=c
47490ac_cpp='$CPP $CPPFLAGS'
47491ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47492ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47493ac_compiler_gnu=$ac_cv_c_compiler_gnu
47494
47495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47496/* end confdefs.h.  */
47497int i;
47498_ACEOF
47499if ac_fn_c_try_compile "$LINENO"; then :
47500
47501else
47502  supports=no
47503fi
47504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47505  ac_ext=cpp
47506ac_cpp='$CXXCPP $CPPFLAGS'
47507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47510
47511  CFLAGS="$saved_cflags"
47512
47513  saved_cxxflags="$CXXFLAGS"
47514  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47515  ac_ext=cpp
47516ac_cpp='$CXXCPP $CPPFLAGS'
47517ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47518ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47519ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47520
47521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47522/* end confdefs.h.  */
47523int i;
47524_ACEOF
47525if ac_fn_cxx_try_compile "$LINENO"; then :
47526
47527else
47528  supports=no
47529fi
47530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47531  ac_ext=cpp
47532ac_cpp='$CXXCPP $CPPFLAGS'
47533ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47534ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47535ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47536
47537  CXXFLAGS="$saved_cxxflags"
47538
47539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47540$as_echo "$supports" >&6; }
47541  if test "x$supports" = "xyes" ; then
47542    GCC_CAN_DISABLE_WARNINGS=true
47543  else
47544    GCC_CAN_DISABLE_WARNINGS=false
47545
47546  fi
47547
47548      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47549        DISABLE_WARNING_PREFIX="-Wno-"
47550      else
47551        DISABLE_WARNING_PREFIX=
47552      fi
47553      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47554      # Repeate the check for the BUILD_CC
47555      CC_OLD="$CC"
47556      CC="$BUILD_CC"
47557
47558  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
47559$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
47560  supports=yes
47561
47562  saved_cflags="$CFLAGS"
47563  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
47564  ac_ext=c
47565ac_cpp='$CPP $CPPFLAGS'
47566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47568ac_compiler_gnu=$ac_cv_c_compiler_gnu
47569
47570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47571/* end confdefs.h.  */
47572int i;
47573_ACEOF
47574if ac_fn_c_try_compile "$LINENO"; then :
47575
47576else
47577  supports=no
47578fi
47579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47580  ac_ext=cpp
47581ac_cpp='$CXXCPP $CPPFLAGS'
47582ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47583ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47584ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47585
47586  CFLAGS="$saved_cflags"
47587
47588  saved_cxxflags="$CXXFLAGS"
47589  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
47590  ac_ext=cpp
47591ac_cpp='$CXXCPP $CPPFLAGS'
47592ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47593ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47594ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47595
47596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47597/* end confdefs.h.  */
47598int i;
47599_ACEOF
47600if ac_fn_cxx_try_compile "$LINENO"; then :
47601
47602else
47603  supports=no
47604fi
47605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47606  ac_ext=cpp
47607ac_cpp='$CXXCPP $CPPFLAGS'
47608ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47609ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47610ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47611
47612  CXXFLAGS="$saved_cxxflags"
47613
47614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47615$as_echo "$supports" >&6; }
47616  if test "x$supports" = "xyes" ; then
47617    BUILD_CC_CAN_DISABLE_WARNINGS=true
47618  else
47619    BUILD_CC_CAN_DISABLE_WARNINGS=false
47620
47621  fi
47622
47623      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
47624        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
47625      else
47626        BUILD_CC_DISABLE_WARNING_PREFIX=
47627      fi
47628      CC="$CC_OLD"
47629      ;;
47630    clang)
47631      DISABLE_WARNING_PREFIX="-Wno-"
47632      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
47633      ;;
47634  esac
47635
47636
47637
47638
47639# Setup debug symbols (need objcopy from the toolchain for that)
47640
47641  #
47642  # ENABLE_DEBUG_SYMBOLS
47643  # This must be done after the toolchain is setup, since we're looking at objcopy.
47644  #
47645  # Check whether --enable-debug-symbols was given.
47646if test "${enable_debug_symbols+set}" = set; then :
47647  enableval=$enable_debug_symbols;
47648fi
47649
47650
47651  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
47652$as_echo_n "checking if we should generate debug symbols... " >&6; }
47653
47654  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
47655    # explicit enabling of enable-debug-symbols and can't find objcopy
47656    #   this is an error
47657    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
47658  fi
47659
47660  if test "x$enable_debug_symbols" = "xyes"; then
47661    ENABLE_DEBUG_SYMBOLS=true
47662  elif test "x$enable_debug_symbols" = "xno"; then
47663    ENABLE_DEBUG_SYMBOLS=false
47664  else
47665    # Default is on if objcopy is found
47666    if test "x$OBJCOPY" != x; then
47667      ENABLE_DEBUG_SYMBOLS=true
47668    # MacOS X and Windows don't use objcopy but default is on for those OSes
47669    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
47670      ENABLE_DEBUG_SYMBOLS=true
47671    else
47672      ENABLE_DEBUG_SYMBOLS=false
47673    fi
47674  fi
47675
47676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
47677$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
47678
47679  #
47680  # ZIP_DEBUGINFO_FILES
47681  #
47682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
47683$as_echo_n "checking if we should zip debug-info files... " >&6; }
47684  # Check whether --enable-zip-debug-info was given.
47685if test "${enable_zip_debug_info+set}" = set; then :
47686  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
47687else
47688  enable_zip_debug_info="yes"
47689fi
47690
47691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
47692$as_echo "${enable_zip_debug_info}" >&6; }
47693
47694  if test "x${enable_zip_debug_info}" = "xno"; then
47695    ZIP_DEBUGINFO_FILES=false
47696  else
47697    ZIP_DEBUGINFO_FILES=true
47698  fi
47699
47700
47701
47702
47703
47704  # Check whether --enable-native-coverage was given.
47705if test "${enable_native_coverage+set}" = set; then :
47706  enableval=$enable_native_coverage;
47707fi
47708
47709  GCOV_ENABLED="false"
47710  if test "x$enable_native_coverage" = "xyes"; then
47711    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
47712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47713$as_echo_n "checking if native coverage is enabled... " >&6; }
47714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47715$as_echo "yes" >&6; }
47716      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
47717      GCOV_LDFLAGS="-fprofile-arcs"
47718      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
47719      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
47720      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
47721      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
47722      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
47723      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
47724      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
47725      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
47726      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
47727      GCOV_ENABLED="true"
47728    else
47729      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
47730    fi
47731  elif test "x$enable_native_coverage" = "xno"; then
47732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
47733$as_echo_n "checking if native coverage is enabled... " >&6; }
47734    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47735$as_echo "no" >&6; }
47736  elif test "x$enable_native_coverage" != "x"; then
47737    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
47738  fi
47739
47740
47741
47742
47743###############################################################################
47744#
47745# Check dependencies for external and internal libraries.
47746#
47747###############################################################################
47748
47749# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
47750
47751  # When using cygwin or msys, we need a wrapper binary that renames
47752  # /cygdrive/c/ arguments into c:/ arguments and peeks into
47753  # @files and rewrites these too! This wrapper binary is
47754  # called fixpath.
47755  FIXPATH=
47756  if test "x$OPENJDK_BUILD_OS" = xwindows; then
47757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
47758$as_echo_n "checking if fixpath can be created... " >&6; }
47759    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
47760    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
47761    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
47762    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
47763      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
47764      FIXPATH="$FIXPATH_BIN -c"
47765    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
47766      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
47767      # @ was chosen as separator to minimize risk of other tools messing around with it
47768      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
47769          | tr ' ' '\n' | grep '^/./' | sort | uniq`
47770      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
47771      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
47772    fi
47773    FIXPATH_SRC_W="$FIXPATH_SRC"
47774    FIXPATH_BIN_W="$FIXPATH_BIN"
47775
47776  unix_path="$FIXPATH_SRC_W"
47777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47778    windows_path=`$CYGPATH -m "$unix_path"`
47779    FIXPATH_SRC_W="$windows_path"
47780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47781    windows_path=`cmd //c echo $unix_path`
47782    FIXPATH_SRC_W="$windows_path"
47783  fi
47784
47785
47786  unix_path="$FIXPATH_BIN_W"
47787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47788    windows_path=`$CYGPATH -m "$unix_path"`
47789    FIXPATH_BIN_W="$windows_path"
47790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47791    windows_path=`cmd //c echo $unix_path`
47792    FIXPATH_BIN_W="$windows_path"
47793  fi
47794
47795    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
47796    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
47797    cd $FIXPATH_DIR
47798    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
47799    cd $CURDIR
47800
47801    if test ! -x $FIXPATH_BIN; then
47802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47803$as_echo "no" >&6; }
47804      cat $FIXPATH_DIR/fixpath1.log
47805      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
47806    fi
47807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47808$as_echo "yes" >&6; }
47809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
47810$as_echo_n "checking if fixpath.exe works... " >&6; }
47811    cd $FIXPATH_DIR
47812    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
47813        > $FIXPATH_DIR/fixpath2.log 2>&1
47814    cd $CURDIR
47815    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
47816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47817$as_echo "no" >&6; }
47818      cat $FIXPATH_DIR/fixpath2.log
47819      as_fn_error $? "fixpath did not work!" "$LINENO" 5
47820    fi
47821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47822$as_echo "yes" >&6; }
47823
47824    FIXPATH_DETACH_FLAG="--detach"
47825  fi
47826
47827
47828
47829
47830
47831
47832  # Check if X11 is needed
47833  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
47834    # No X11 support on windows or macosx
47835    NEEDS_LIB_X11=false
47836  else
47837    if test "x$SUPPORT_HEADFUL" = xno; then
47838      # No X11 support if building headless-only
47839      NEEDS_LIB_X11=false
47840    else
47841      # All other instances need X11
47842      NEEDS_LIB_X11=true
47843    fi
47844  fi
47845
47846  # Check if cups is needed
47847  if test "x$OPENJDK_TARGET_OS" = xwindows; then
47848    # Windows have a separate print system
47849    NEEDS_LIB_CUPS=false
47850  else
47851    NEEDS_LIB_CUPS=true
47852  fi
47853
47854  # Check if freetype is needed
47855  if test "x$OPENJDK" = "xtrue"; then
47856    NEEDS_LIB_FREETYPE=true
47857  else
47858    NEEDS_LIB_FREETYPE=false
47859  fi
47860
47861  # Check if alsa is needed
47862  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47863    NEEDS_LIB_ALSA=true
47864  else
47865    NEEDS_LIB_ALSA=false
47866  fi
47867
47868  # Check if ffi is needed
47869  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47870    NEEDS_LIB_FFI=true
47871  else
47872    NEEDS_LIB_FFI=false
47873  fi
47874
47875
47876  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47877  # dynamic build is configured on command line.
47878
47879# Check whether --with-stdc++lib was given.
47880if test "${with_stdc__lib+set}" = set; then :
47881  withval=$with_stdc__lib;
47882        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47883                && test "x$with_stdc__lib" != xdefault; then
47884          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47885        fi
47886
47887else
47888  with_stdc__lib=default
47889
47890fi
47891
47892
47893  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47894    # Test if -lstdc++ works.
47895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47896$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47897    ac_ext=cpp
47898ac_cpp='$CXXCPP $CPPFLAGS'
47899ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47900ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47901ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47902
47903    OLD_CXXFLAGS="$CXXFLAGS"
47904    CXXFLAGS="$CXXFLAGS -lstdc++"
47905    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47906/* end confdefs.h.  */
47907
47908int
47909main ()
47910{
47911return 0;
47912  ;
47913  return 0;
47914}
47915_ACEOF
47916if ac_fn_cxx_try_link "$LINENO"; then :
47917  has_dynamic_libstdcxx=yes
47918else
47919  has_dynamic_libstdcxx=no
47920fi
47921rm -f core conftest.err conftest.$ac_objext \
47922    conftest$ac_exeext conftest.$ac_ext
47923    CXXFLAGS="$OLD_CXXFLAGS"
47924    ac_ext=cpp
47925ac_cpp='$CXXCPP $CPPFLAGS'
47926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47929
47930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47931$as_echo "$has_dynamic_libstdcxx" >&6; }
47932
47933    # Test if stdc++ can be linked statically.
47934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47935$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47936    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47937    ac_ext=cpp
47938ac_cpp='$CXXCPP $CPPFLAGS'
47939ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47940ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47941ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47942
47943    OLD_LIBS="$LIBS"
47944    OLD_CXX="$CXX"
47945    LIBS="$STATIC_STDCXX_FLAGS"
47946    CXX="$CC"
47947    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47948/* end confdefs.h.  */
47949
47950int
47951main ()
47952{
47953return 0;
47954  ;
47955  return 0;
47956}
47957_ACEOF
47958if ac_fn_cxx_try_link "$LINENO"; then :
47959  has_static_libstdcxx=yes
47960else
47961  has_static_libstdcxx=no
47962fi
47963rm -f core conftest.err conftest.$ac_objext \
47964    conftest$ac_exeext conftest.$ac_ext
47965    LIBS="$OLD_LIBS"
47966    CXX="$OLD_CXX"
47967    ac_ext=cpp
47968ac_cpp='$CXXCPP $CPPFLAGS'
47969ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47970ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47971ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47972
47973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47974$as_echo "$has_static_libstdcxx" >&6; }
47975
47976    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47977      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47978    fi
47979
47980    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47981      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47982    fi
47983
47984    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47985      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47986    fi
47987
47988    # If dynamic was requested, it's available since it would fail above otherwise.
47989    # If dynamic wasn't requested, go with static unless it isn't available.
47990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47991$as_echo_n "checking how to link with libstdc++... " >&6; }
47992    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47993      LIBCXX="$LIBCXX -lstdc++"
47994      LDCXX="$CXX"
47995      STATIC_CXX_SETTING="STATIC_CXX=false"
47996      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47997$as_echo "dynamic" >&6; }
47998    else
47999      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48000      LDCXX="$CC"
48001      STATIC_CXX_SETTING="STATIC_CXX=true"
48002      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48003$as_echo "static" >&6; }
48004    fi
48005  fi
48006
48007
48008  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48009  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48010    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48011  fi
48012
48013  # TODO better (platform agnostic) test
48014  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48015    LIBCXX="-lstdc++"
48016  fi
48017
48018
48019  # Setup Windows runtime dlls
48020  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48021
48022
48023# Check whether --with-msvcr-dll was given.
48024if test "${with_msvcr_dll+set}" = set; then :
48025  withval=$with_msvcr_dll;
48026fi
48027
48028
48029  if test "x$with_msvcr_dll" != x; then
48030    # If given explicitely by user, do not probe. If not present, fail directly.
48031
48032  DLL_NAME="$MSVCR_NAME"
48033  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
48034  METHOD="--with-msvcr-dll"
48035  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48036    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48037$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48038
48039    # Need to check if the found msvcr is correct architecture
48040    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48041$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48042    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48044      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48045      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48046      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48047        CORRECT_MSVCR_ARCH="PE32 executable"
48048      else
48049        CORRECT_MSVCR_ARCH="PE32+ executable"
48050      fi
48051    else
48052      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48053        CORRECT_MSVCR_ARCH=386
48054      else
48055        CORRECT_MSVCR_ARCH=x86-64
48056      fi
48057    fi
48058    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48059      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48060$as_echo "ok" >&6; }
48061      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48062
48063  # Only process if variable expands to non-empty
48064
48065  if test "x$MSVC_DLL" != x; then
48066    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48067
48068  # Input might be given as Windows format, start by converting to
48069  # unix format.
48070  path="$MSVC_DLL"
48071  new_path=`$CYGPATH -u "$path"`
48072
48073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48076  # "foo.exe" is OK but "foo" is an error.
48077  #
48078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48079  # It is also a way to make sure we got the proper file name for the real test later on.
48080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48081  if test "x$test_shortpath" = x; then
48082    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48083$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48084    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48085  fi
48086
48087  # Call helper function which possibly converts this using DOS-style short mode.
48088  # If so, the updated path is stored in $new_path.
48089
48090  input_path="$new_path"
48091  # Check if we need to convert this using DOS-style short mode. If the path
48092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48093  # take no chances and rewrite it.
48094  # Note: m4 eats our [], so we need to use [ and ] instead.
48095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48096  if test "x$has_forbidden_chars" != x; then
48097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48101      # Going to short mode and back again did indeed matter. Since short mode is
48102      # case insensitive, let's make it lowercase to improve readability.
48103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48104      # Now convert it back to Unix-style (cygpath)
48105      input_path=`$CYGPATH -u "$shortmode_path"`
48106      new_path="$input_path"
48107    fi
48108  fi
48109
48110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48111  if test "x$test_cygdrive_prefix" = x; then
48112    # As a simple fix, exclude /usr/bin since it's not a real path.
48113    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48115      # a path prefixed by /cygdrive for fixpath to work.
48116      new_path="$CYGWIN_ROOT_PATH$input_path"
48117    fi
48118  fi
48119
48120
48121  if test "x$path" != "x$new_path"; then
48122    MSVC_DLL="$new_path"
48123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48124$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48125  fi
48126
48127    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48128
48129  path="$MSVC_DLL"
48130  has_colon=`$ECHO $path | $GREP ^.:`
48131  new_path="$path"
48132  if test "x$has_colon" = x; then
48133    # Not in mixed or Windows style, start by that.
48134    new_path=`cmd //c echo $path`
48135  fi
48136
48137
48138  input_path="$new_path"
48139  # Check if we need to convert this using DOS-style short mode. If the path
48140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48141  # take no chances and rewrite it.
48142  # Note: m4 eats our [], so we need to use [ and ] instead.
48143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48144  if test "x$has_forbidden_chars" != x; then
48145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48147  fi
48148
48149
48150  windows_path="$new_path"
48151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48152    unix_path=`$CYGPATH -u "$windows_path"`
48153    new_path="$unix_path"
48154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48156    new_path="$unix_path"
48157  fi
48158
48159  if test "x$path" != "x$new_path"; then
48160    MSVC_DLL="$new_path"
48161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48162$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48163  fi
48164
48165  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48166  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48167
48168    else
48169      # We're on a unix platform. Hooray! :)
48170      path="$MSVC_DLL"
48171      has_space=`$ECHO "$path" | $GREP " "`
48172      if test "x$has_space" != x; then
48173        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48174$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48175        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48176      fi
48177
48178      # Use eval to expand a potential ~
48179      eval path="$path"
48180      if test ! -f "$path" && test ! -d "$path"; then
48181        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48182      fi
48183
48184      if test -d "$path"; then
48185        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48186      else
48187        dir="`$DIRNAME "$path"`"
48188        base="`$BASENAME "$path"`"
48189        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48190      fi
48191    fi
48192  fi
48193
48194      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48195$as_echo_n "checking for $DLL_NAME... " >&6; }
48196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48197$as_echo "$MSVC_DLL" >&6; }
48198    else
48199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48200$as_echo "incorrect, ignoring" >&6; }
48201      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48202$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48203    fi
48204  fi
48205
48206    if test "x$MSVC_DLL" = x; then
48207      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
48208    fi
48209    MSVCR_DLL="$MSVC_DLL"
48210  elif test "x$DEVKIT_MSVCR_DLL" != x; then
48211
48212  DLL_NAME="$MSVCR_NAME"
48213  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
48214  METHOD="devkit"
48215  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48216    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48217$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48218
48219    # Need to check if the found msvcr is correct architecture
48220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48221$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48222    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48224      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48225      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48226      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48227        CORRECT_MSVCR_ARCH="PE32 executable"
48228      else
48229        CORRECT_MSVCR_ARCH="PE32+ executable"
48230      fi
48231    else
48232      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48233        CORRECT_MSVCR_ARCH=386
48234      else
48235        CORRECT_MSVCR_ARCH=x86-64
48236      fi
48237    fi
48238    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48240$as_echo "ok" >&6; }
48241      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48242
48243  # Only process if variable expands to non-empty
48244
48245  if test "x$MSVC_DLL" != x; then
48246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48247
48248  # Input might be given as Windows format, start by converting to
48249  # unix format.
48250  path="$MSVC_DLL"
48251  new_path=`$CYGPATH -u "$path"`
48252
48253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48256  # "foo.exe" is OK but "foo" is an error.
48257  #
48258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48259  # It is also a way to make sure we got the proper file name for the real test later on.
48260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48261  if test "x$test_shortpath" = x; then
48262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48263$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48264    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48265  fi
48266
48267  # Call helper function which possibly converts this using DOS-style short mode.
48268  # If so, the updated path is stored in $new_path.
48269
48270  input_path="$new_path"
48271  # Check if we need to convert this using DOS-style short mode. If the path
48272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48273  # take no chances and rewrite it.
48274  # Note: m4 eats our [], so we need to use [ and ] instead.
48275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48276  if test "x$has_forbidden_chars" != x; then
48277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48281      # Going to short mode and back again did indeed matter. Since short mode is
48282      # case insensitive, let's make it lowercase to improve readability.
48283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48284      # Now convert it back to Unix-style (cygpath)
48285      input_path=`$CYGPATH -u "$shortmode_path"`
48286      new_path="$input_path"
48287    fi
48288  fi
48289
48290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48291  if test "x$test_cygdrive_prefix" = x; then
48292    # As a simple fix, exclude /usr/bin since it's not a real path.
48293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48295      # a path prefixed by /cygdrive for fixpath to work.
48296      new_path="$CYGWIN_ROOT_PATH$input_path"
48297    fi
48298  fi
48299
48300
48301  if test "x$path" != "x$new_path"; then
48302    MSVC_DLL="$new_path"
48303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48304$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48305  fi
48306
48307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48308
48309  path="$MSVC_DLL"
48310  has_colon=`$ECHO $path | $GREP ^.:`
48311  new_path="$path"
48312  if test "x$has_colon" = x; then
48313    # Not in mixed or Windows style, start by that.
48314    new_path=`cmd //c echo $path`
48315  fi
48316
48317
48318  input_path="$new_path"
48319  # Check if we need to convert this using DOS-style short mode. If the path
48320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48321  # take no chances and rewrite it.
48322  # Note: m4 eats our [], so we need to use [ and ] instead.
48323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48324  if test "x$has_forbidden_chars" != x; then
48325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48327  fi
48328
48329
48330  windows_path="$new_path"
48331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48332    unix_path=`$CYGPATH -u "$windows_path"`
48333    new_path="$unix_path"
48334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48336    new_path="$unix_path"
48337  fi
48338
48339  if test "x$path" != "x$new_path"; then
48340    MSVC_DLL="$new_path"
48341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48342$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48343  fi
48344
48345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48347
48348    else
48349      # We're on a unix platform. Hooray! :)
48350      path="$MSVC_DLL"
48351      has_space=`$ECHO "$path" | $GREP " "`
48352      if test "x$has_space" != x; then
48353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48354$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48356      fi
48357
48358      # Use eval to expand a potential ~
48359      eval path="$path"
48360      if test ! -f "$path" && test ! -d "$path"; then
48361        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48362      fi
48363
48364      if test -d "$path"; then
48365        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48366      else
48367        dir="`$DIRNAME "$path"`"
48368        base="`$BASENAME "$path"`"
48369        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48370      fi
48371    fi
48372  fi
48373
48374      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48375$as_echo_n "checking for $DLL_NAME... " >&6; }
48376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48377$as_echo "$MSVC_DLL" >&6; }
48378    else
48379      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48380$as_echo "incorrect, ignoring" >&6; }
48381      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48382$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48383    fi
48384  fi
48385
48386    if test "x$MSVC_DLL" = x; then
48387      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
48388    fi
48389    MSVCR_DLL="$MSVC_DLL"
48390  else
48391
48392  DLL_NAME="${MSVCR_NAME}"
48393  MSVC_DLL=
48394
48395  if test "x$MSVC_DLL" = x; then
48396    # Probe: Using well-known location from Visual Studio 10.0
48397    if test "x$VCINSTALLDIR" != x; then
48398      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48399
48400  windows_path="$CYGWIN_VC_INSTALL_DIR"
48401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48402    unix_path=`$CYGPATH -u "$windows_path"`
48403    CYGWIN_VC_INSTALL_DIR="$unix_path"
48404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48406    CYGWIN_VC_INSTALL_DIR="$unix_path"
48407  fi
48408
48409      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48410        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48411      else
48412        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
48413      fi
48414      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
48415
48416  DLL_NAME="$DLL_NAME"
48417  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48418  METHOD="well-known location in VCINSTALLDIR"
48419  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48420    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48421$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48422
48423    # Need to check if the found msvcr is correct architecture
48424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48425$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48426    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48428      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48429      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48430      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48431        CORRECT_MSVCR_ARCH="PE32 executable"
48432      else
48433        CORRECT_MSVCR_ARCH="PE32+ executable"
48434      fi
48435    else
48436      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48437        CORRECT_MSVCR_ARCH=386
48438      else
48439        CORRECT_MSVCR_ARCH=x86-64
48440      fi
48441    fi
48442    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48444$as_echo "ok" >&6; }
48445      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48446
48447  # Only process if variable expands to non-empty
48448
48449  if test "x$MSVC_DLL" != x; then
48450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48451
48452  # Input might be given as Windows format, start by converting to
48453  # unix format.
48454  path="$MSVC_DLL"
48455  new_path=`$CYGPATH -u "$path"`
48456
48457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48460  # "foo.exe" is OK but "foo" is an error.
48461  #
48462  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48463  # It is also a way to make sure we got the proper file name for the real test later on.
48464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48465  if test "x$test_shortpath" = x; then
48466    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48467$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48468    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48469  fi
48470
48471  # Call helper function which possibly converts this using DOS-style short mode.
48472  # If so, the updated path is stored in $new_path.
48473
48474  input_path="$new_path"
48475  # Check if we need to convert this using DOS-style short mode. If the path
48476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48477  # take no chances and rewrite it.
48478  # Note: m4 eats our [], so we need to use [ and ] instead.
48479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48480  if test "x$has_forbidden_chars" != x; then
48481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48485      # Going to short mode and back again did indeed matter. Since short mode is
48486      # case insensitive, let's make it lowercase to improve readability.
48487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48488      # Now convert it back to Unix-style (cygpath)
48489      input_path=`$CYGPATH -u "$shortmode_path"`
48490      new_path="$input_path"
48491    fi
48492  fi
48493
48494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48495  if test "x$test_cygdrive_prefix" = x; then
48496    # As a simple fix, exclude /usr/bin since it's not a real path.
48497    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48499      # a path prefixed by /cygdrive for fixpath to work.
48500      new_path="$CYGWIN_ROOT_PATH$input_path"
48501    fi
48502  fi
48503
48504
48505  if test "x$path" != "x$new_path"; then
48506    MSVC_DLL="$new_path"
48507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48508$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48509  fi
48510
48511    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48512
48513  path="$MSVC_DLL"
48514  has_colon=`$ECHO $path | $GREP ^.:`
48515  new_path="$path"
48516  if test "x$has_colon" = x; then
48517    # Not in mixed or Windows style, start by that.
48518    new_path=`cmd //c echo $path`
48519  fi
48520
48521
48522  input_path="$new_path"
48523  # Check if we need to convert this using DOS-style short mode. If the path
48524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48525  # take no chances and rewrite it.
48526  # Note: m4 eats our [], so we need to use [ and ] instead.
48527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48528  if test "x$has_forbidden_chars" != x; then
48529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48531  fi
48532
48533
48534  windows_path="$new_path"
48535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48536    unix_path=`$CYGPATH -u "$windows_path"`
48537    new_path="$unix_path"
48538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48540    new_path="$unix_path"
48541  fi
48542
48543  if test "x$path" != "x$new_path"; then
48544    MSVC_DLL="$new_path"
48545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48546$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48547  fi
48548
48549  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48550  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48551
48552    else
48553      # We're on a unix platform. Hooray! :)
48554      path="$MSVC_DLL"
48555      has_space=`$ECHO "$path" | $GREP " "`
48556      if test "x$has_space" != x; then
48557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48558$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48559        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48560      fi
48561
48562      # Use eval to expand a potential ~
48563      eval path="$path"
48564      if test ! -f "$path" && test ! -d "$path"; then
48565        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48566      fi
48567
48568      if test -d "$path"; then
48569        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48570      else
48571        dir="`$DIRNAME "$path"`"
48572        base="`$BASENAME "$path"`"
48573        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48574      fi
48575    fi
48576  fi
48577
48578      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48579$as_echo_n "checking for $DLL_NAME... " >&6; }
48580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48581$as_echo "$MSVC_DLL" >&6; }
48582    else
48583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48584$as_echo "incorrect, ignoring" >&6; }
48585      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48586$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48587    fi
48588  fi
48589
48590    fi
48591  fi
48592
48593  if test "x$MSVC_DLL" = x; then
48594    # Probe: Check in the Boot JDK directory.
48595    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
48596
48597  DLL_NAME="$DLL_NAME"
48598  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48599  METHOD="well-known location in Boot JDK"
48600  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48601    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48602$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48603
48604    # Need to check if the found msvcr is correct architecture
48605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48606$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48607    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48609      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48610      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48611      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48612        CORRECT_MSVCR_ARCH="PE32 executable"
48613      else
48614        CORRECT_MSVCR_ARCH="PE32+ executable"
48615      fi
48616    else
48617      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48618        CORRECT_MSVCR_ARCH=386
48619      else
48620        CORRECT_MSVCR_ARCH=x86-64
48621      fi
48622    fi
48623    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48625$as_echo "ok" >&6; }
48626      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48627
48628  # Only process if variable expands to non-empty
48629
48630  if test "x$MSVC_DLL" != x; then
48631    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48632
48633  # Input might be given as Windows format, start by converting to
48634  # unix format.
48635  path="$MSVC_DLL"
48636  new_path=`$CYGPATH -u "$path"`
48637
48638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48641  # "foo.exe" is OK but "foo" is an error.
48642  #
48643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48644  # It is also a way to make sure we got the proper file name for the real test later on.
48645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48646  if test "x$test_shortpath" = x; then
48647    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48648$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48649    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48650  fi
48651
48652  # Call helper function which possibly converts this using DOS-style short mode.
48653  # If so, the updated path is stored in $new_path.
48654
48655  input_path="$new_path"
48656  # Check if we need to convert this using DOS-style short mode. If the path
48657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48658  # take no chances and rewrite it.
48659  # Note: m4 eats our [], so we need to use [ and ] instead.
48660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48661  if test "x$has_forbidden_chars" != x; then
48662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48666      # Going to short mode and back again did indeed matter. Since short mode is
48667      # case insensitive, let's make it lowercase to improve readability.
48668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48669      # Now convert it back to Unix-style (cygpath)
48670      input_path=`$CYGPATH -u "$shortmode_path"`
48671      new_path="$input_path"
48672    fi
48673  fi
48674
48675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48676  if test "x$test_cygdrive_prefix" = x; then
48677    # As a simple fix, exclude /usr/bin since it's not a real path.
48678    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48680      # a path prefixed by /cygdrive for fixpath to work.
48681      new_path="$CYGWIN_ROOT_PATH$input_path"
48682    fi
48683  fi
48684
48685
48686  if test "x$path" != "x$new_path"; then
48687    MSVC_DLL="$new_path"
48688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48689$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48690  fi
48691
48692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48693
48694  path="$MSVC_DLL"
48695  has_colon=`$ECHO $path | $GREP ^.:`
48696  new_path="$path"
48697  if test "x$has_colon" = x; then
48698    # Not in mixed or Windows style, start by that.
48699    new_path=`cmd //c echo $path`
48700  fi
48701
48702
48703  input_path="$new_path"
48704  # Check if we need to convert this using DOS-style short mode. If the path
48705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48706  # take no chances and rewrite it.
48707  # Note: m4 eats our [], so we need to use [ and ] instead.
48708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48709  if test "x$has_forbidden_chars" != x; then
48710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48712  fi
48713
48714
48715  windows_path="$new_path"
48716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48717    unix_path=`$CYGPATH -u "$windows_path"`
48718    new_path="$unix_path"
48719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48721    new_path="$unix_path"
48722  fi
48723
48724  if test "x$path" != "x$new_path"; then
48725    MSVC_DLL="$new_path"
48726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48727$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48728  fi
48729
48730  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48731  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48732
48733    else
48734      # We're on a unix platform. Hooray! :)
48735      path="$MSVC_DLL"
48736      has_space=`$ECHO "$path" | $GREP " "`
48737      if test "x$has_space" != x; then
48738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48739$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48740        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48741      fi
48742
48743      # Use eval to expand a potential ~
48744      eval path="$path"
48745      if test ! -f "$path" && test ! -d "$path"; then
48746        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48747      fi
48748
48749      if test -d "$path"; then
48750        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48751      else
48752        dir="`$DIRNAME "$path"`"
48753        base="`$BASENAME "$path"`"
48754        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48755      fi
48756    fi
48757  fi
48758
48759      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48760$as_echo_n "checking for $DLL_NAME... " >&6; }
48761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48762$as_echo "$MSVC_DLL" >&6; }
48763    else
48764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48765$as_echo "incorrect, ignoring" >&6; }
48766      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48767$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48768    fi
48769  fi
48770
48771  fi
48772
48773  if test "x$MSVC_DLL" = x; then
48774    # Probe: Look in the Windows system32 directory
48775    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48776
48777  windows_path="$CYGWIN_SYSTEMROOT"
48778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48779    unix_path=`$CYGPATH -u "$windows_path"`
48780    CYGWIN_SYSTEMROOT="$unix_path"
48781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48783    CYGWIN_SYSTEMROOT="$unix_path"
48784  fi
48785
48786    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
48787
48788  DLL_NAME="$DLL_NAME"
48789  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48790  METHOD="well-known location in SYSTEMROOT"
48791  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48792    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48793$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48794
48795    # Need to check if the found msvcr is correct architecture
48796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48797$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48798    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48800      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48801      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
48802      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48803        CORRECT_MSVCR_ARCH="PE32 executable"
48804      else
48805        CORRECT_MSVCR_ARCH="PE32+ executable"
48806      fi
48807    else
48808      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48809        CORRECT_MSVCR_ARCH=386
48810      else
48811        CORRECT_MSVCR_ARCH=x86-64
48812      fi
48813    fi
48814    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
48815      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48816$as_echo "ok" >&6; }
48817      MSVC_DLL="$POSSIBLE_MSVC_DLL"
48818
48819  # Only process if variable expands to non-empty
48820
48821  if test "x$MSVC_DLL" != x; then
48822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48823
48824  # Input might be given as Windows format, start by converting to
48825  # unix format.
48826  path="$MSVC_DLL"
48827  new_path=`$CYGPATH -u "$path"`
48828
48829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48832  # "foo.exe" is OK but "foo" is an error.
48833  #
48834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48835  # It is also a way to make sure we got the proper file name for the real test later on.
48836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48837  if test "x$test_shortpath" = x; then
48838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48839$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48840    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
48841  fi
48842
48843  # Call helper function which possibly converts this using DOS-style short mode.
48844  # If so, the updated path is stored in $new_path.
48845
48846  input_path="$new_path"
48847  # Check if we need to convert this using DOS-style short mode. If the path
48848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48849  # take no chances and rewrite it.
48850  # Note: m4 eats our [], so we need to use [ and ] instead.
48851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48852  if test "x$has_forbidden_chars" != x; then
48853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48857      # Going to short mode and back again did indeed matter. Since short mode is
48858      # case insensitive, let's make it lowercase to improve readability.
48859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48860      # Now convert it back to Unix-style (cygpath)
48861      input_path=`$CYGPATH -u "$shortmode_path"`
48862      new_path="$input_path"
48863    fi
48864  fi
48865
48866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48867  if test "x$test_cygdrive_prefix" = x; then
48868    # As a simple fix, exclude /usr/bin since it's not a real path.
48869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48871      # a path prefixed by /cygdrive for fixpath to work.
48872      new_path="$CYGWIN_ROOT_PATH$input_path"
48873    fi
48874  fi
48875
48876
48877  if test "x$path" != "x$new_path"; then
48878    MSVC_DLL="$new_path"
48879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48880$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48881  fi
48882
48883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48884
48885  path="$MSVC_DLL"
48886  has_colon=`$ECHO $path | $GREP ^.:`
48887  new_path="$path"
48888  if test "x$has_colon" = x; then
48889    # Not in mixed or Windows style, start by that.
48890    new_path=`cmd //c echo $path`
48891  fi
48892
48893
48894  input_path="$new_path"
48895  # Check if we need to convert this using DOS-style short mode. If the path
48896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48897  # take no chances and rewrite it.
48898  # Note: m4 eats our [], so we need to use [ and ] instead.
48899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48900  if test "x$has_forbidden_chars" != x; then
48901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48903  fi
48904
48905
48906  windows_path="$new_path"
48907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48908    unix_path=`$CYGPATH -u "$windows_path"`
48909    new_path="$unix_path"
48910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48912    new_path="$unix_path"
48913  fi
48914
48915  if test "x$path" != "x$new_path"; then
48916    MSVC_DLL="$new_path"
48917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
48918$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
48919  fi
48920
48921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48923
48924    else
48925      # We're on a unix platform. Hooray! :)
48926      path="$MSVC_DLL"
48927      has_space=`$ECHO "$path" | $GREP " "`
48928      if test "x$has_space" != x; then
48929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
48930$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
48931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48932      fi
48933
48934      # Use eval to expand a potential ~
48935      eval path="$path"
48936      if test ! -f "$path" && test ! -d "$path"; then
48937        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48938      fi
48939
48940      if test -d "$path"; then
48941        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
48942      else
48943        dir="`$DIRNAME "$path"`"
48944        base="`$BASENAME "$path"`"
48945        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
48946      fi
48947    fi
48948  fi
48949
48950      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
48951$as_echo_n "checking for $DLL_NAME... " >&6; }
48952      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
48953$as_echo "$MSVC_DLL" >&6; }
48954    else
48955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48956$as_echo "incorrect, ignoring" >&6; }
48957      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
48958$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
48959    fi
48960  fi
48961
48962  fi
48963
48964  if test "x$MSVC_DLL" = x; then
48965    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48966    if test "x$VS100COMNTOOLS" != x; then
48967      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48968
48969  windows_path="$CYGWIN_VS_TOOLS_DIR"
48970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48971    unix_path=`$CYGPATH -u "$windows_path"`
48972    CYGWIN_VS_TOOLS_DIR="$unix_path"
48973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48975    CYGWIN_VS_TOOLS_DIR="$unix_path"
48976  fi
48977
48978      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48979        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48980	    | $GREP -i /x64/ | $HEAD --lines 1`
48981      else
48982        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
48983	    | $GREP -i /x86/ | $HEAD --lines 1`
48984      fi
48985
48986  DLL_NAME="$DLL_NAME"
48987  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
48988  METHOD="search of VS100COMNTOOLS"
48989  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
48990    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
48991$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
48992
48993    # Need to check if the found msvcr is correct architecture
48994    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
48995$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
48996    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
48997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48998      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
48999      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49000      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49001        CORRECT_MSVCR_ARCH="PE32 executable"
49002      else
49003        CORRECT_MSVCR_ARCH="PE32+ executable"
49004      fi
49005    else
49006      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49007        CORRECT_MSVCR_ARCH=386
49008      else
49009        CORRECT_MSVCR_ARCH=x86-64
49010      fi
49011    fi
49012    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49014$as_echo "ok" >&6; }
49015      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49016
49017  # Only process if variable expands to non-empty
49018
49019  if test "x$MSVC_DLL" != x; then
49020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49021
49022  # Input might be given as Windows format, start by converting to
49023  # unix format.
49024  path="$MSVC_DLL"
49025  new_path=`$CYGPATH -u "$path"`
49026
49027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49030  # "foo.exe" is OK but "foo" is an error.
49031  #
49032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49033  # It is also a way to make sure we got the proper file name for the real test later on.
49034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49035  if test "x$test_shortpath" = x; then
49036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49037$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49038    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49039  fi
49040
49041  # Call helper function which possibly converts this using DOS-style short mode.
49042  # If so, the updated path is stored in $new_path.
49043
49044  input_path="$new_path"
49045  # Check if we need to convert this using DOS-style short mode. If the path
49046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49047  # take no chances and rewrite it.
49048  # Note: m4 eats our [], so we need to use [ and ] instead.
49049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49050  if test "x$has_forbidden_chars" != x; then
49051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49055      # Going to short mode and back again did indeed matter. Since short mode is
49056      # case insensitive, let's make it lowercase to improve readability.
49057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49058      # Now convert it back to Unix-style (cygpath)
49059      input_path=`$CYGPATH -u "$shortmode_path"`
49060      new_path="$input_path"
49061    fi
49062  fi
49063
49064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49065  if test "x$test_cygdrive_prefix" = x; then
49066    # As a simple fix, exclude /usr/bin since it's not a real path.
49067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49069      # a path prefixed by /cygdrive for fixpath to work.
49070      new_path="$CYGWIN_ROOT_PATH$input_path"
49071    fi
49072  fi
49073
49074
49075  if test "x$path" != "x$new_path"; then
49076    MSVC_DLL="$new_path"
49077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49078$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49079  fi
49080
49081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49082
49083  path="$MSVC_DLL"
49084  has_colon=`$ECHO $path | $GREP ^.:`
49085  new_path="$path"
49086  if test "x$has_colon" = x; then
49087    # Not in mixed or Windows style, start by that.
49088    new_path=`cmd //c echo $path`
49089  fi
49090
49091
49092  input_path="$new_path"
49093  # Check if we need to convert this using DOS-style short mode. If the path
49094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49095  # take no chances and rewrite it.
49096  # Note: m4 eats our [], so we need to use [ and ] instead.
49097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49098  if test "x$has_forbidden_chars" != x; then
49099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49101  fi
49102
49103
49104  windows_path="$new_path"
49105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49106    unix_path=`$CYGPATH -u "$windows_path"`
49107    new_path="$unix_path"
49108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49110    new_path="$unix_path"
49111  fi
49112
49113  if test "x$path" != "x$new_path"; then
49114    MSVC_DLL="$new_path"
49115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49116$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49117  fi
49118
49119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49121
49122    else
49123      # We're on a unix platform. Hooray! :)
49124      path="$MSVC_DLL"
49125      has_space=`$ECHO "$path" | $GREP " "`
49126      if test "x$has_space" != x; then
49127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49128$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49130      fi
49131
49132      # Use eval to expand a potential ~
49133      eval path="$path"
49134      if test ! -f "$path" && test ! -d "$path"; then
49135        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49136      fi
49137
49138      if test -d "$path"; then
49139        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49140      else
49141        dir="`$DIRNAME "$path"`"
49142        base="`$BASENAME "$path"`"
49143        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49144      fi
49145    fi
49146  fi
49147
49148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49149$as_echo_n "checking for $DLL_NAME... " >&6; }
49150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49151$as_echo "$MSVC_DLL" >&6; }
49152    else
49153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49154$as_echo "incorrect, ignoring" >&6; }
49155      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49156$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49157    fi
49158  fi
49159
49160    fi
49161  fi
49162
49163  if test "x$MSVC_DLL" = x; then
49164    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49165    # (This was the original behaviour; kept since it might turn something up)
49166    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49167      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49168        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49169	    | $GREP x64 | $HEAD --lines 1`
49170      else
49171        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49172	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49173        if test "x$POSSIBLE_MSVC_DLL" = x; then
49174          # We're grasping at straws now...
49175          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49176	      | $HEAD --lines 1`
49177        fi
49178      fi
49179
49180
49181  DLL_NAME="$DLL_NAME"
49182  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49183  METHOD="search of VCINSTALLDIR"
49184  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49185    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49186$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49187
49188    # Need to check if the found msvcr is correct architecture
49189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49190$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49191    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49193      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49194      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49195      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49196        CORRECT_MSVCR_ARCH="PE32 executable"
49197      else
49198        CORRECT_MSVCR_ARCH="PE32+ executable"
49199      fi
49200    else
49201      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49202        CORRECT_MSVCR_ARCH=386
49203      else
49204        CORRECT_MSVCR_ARCH=x86-64
49205      fi
49206    fi
49207    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49208      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49209$as_echo "ok" >&6; }
49210      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49211
49212  # Only process if variable expands to non-empty
49213
49214  if test "x$MSVC_DLL" != x; then
49215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49216
49217  # Input might be given as Windows format, start by converting to
49218  # unix format.
49219  path="$MSVC_DLL"
49220  new_path=`$CYGPATH -u "$path"`
49221
49222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49225  # "foo.exe" is OK but "foo" is an error.
49226  #
49227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49228  # It is also a way to make sure we got the proper file name for the real test later on.
49229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49230  if test "x$test_shortpath" = x; then
49231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49232$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49233    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49234  fi
49235
49236  # Call helper function which possibly converts this using DOS-style short mode.
49237  # If so, the updated path is stored in $new_path.
49238
49239  input_path="$new_path"
49240  # Check if we need to convert this using DOS-style short mode. If the path
49241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49242  # take no chances and rewrite it.
49243  # Note: m4 eats our [], so we need to use [ and ] instead.
49244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49245  if test "x$has_forbidden_chars" != x; then
49246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49250      # Going to short mode and back again did indeed matter. Since short mode is
49251      # case insensitive, let's make it lowercase to improve readability.
49252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49253      # Now convert it back to Unix-style (cygpath)
49254      input_path=`$CYGPATH -u "$shortmode_path"`
49255      new_path="$input_path"
49256    fi
49257  fi
49258
49259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49260  if test "x$test_cygdrive_prefix" = x; then
49261    # As a simple fix, exclude /usr/bin since it's not a real path.
49262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49264      # a path prefixed by /cygdrive for fixpath to work.
49265      new_path="$CYGWIN_ROOT_PATH$input_path"
49266    fi
49267  fi
49268
49269
49270  if test "x$path" != "x$new_path"; then
49271    MSVC_DLL="$new_path"
49272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49273$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49274  fi
49275
49276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49277
49278  path="$MSVC_DLL"
49279  has_colon=`$ECHO $path | $GREP ^.:`
49280  new_path="$path"
49281  if test "x$has_colon" = x; then
49282    # Not in mixed or Windows style, start by that.
49283    new_path=`cmd //c echo $path`
49284  fi
49285
49286
49287  input_path="$new_path"
49288  # Check if we need to convert this using DOS-style short mode. If the path
49289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49290  # take no chances and rewrite it.
49291  # Note: m4 eats our [], so we need to use [ and ] instead.
49292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49293  if test "x$has_forbidden_chars" != x; then
49294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49296  fi
49297
49298
49299  windows_path="$new_path"
49300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49301    unix_path=`$CYGPATH -u "$windows_path"`
49302    new_path="$unix_path"
49303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49305    new_path="$unix_path"
49306  fi
49307
49308  if test "x$path" != "x$new_path"; then
49309    MSVC_DLL="$new_path"
49310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49311$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49312  fi
49313
49314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49316
49317    else
49318      # We're on a unix platform. Hooray! :)
49319      path="$MSVC_DLL"
49320      has_space=`$ECHO "$path" | $GREP " "`
49321      if test "x$has_space" != x; then
49322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49323$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49325      fi
49326
49327      # Use eval to expand a potential ~
49328      eval path="$path"
49329      if test ! -f "$path" && test ! -d "$path"; then
49330        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49331      fi
49332
49333      if test -d "$path"; then
49334        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49335      else
49336        dir="`$DIRNAME "$path"`"
49337        base="`$BASENAME "$path"`"
49338        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49339      fi
49340    fi
49341  fi
49342
49343      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49344$as_echo_n "checking for $DLL_NAME... " >&6; }
49345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49346$as_echo "$MSVC_DLL" >&6; }
49347    else
49348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49349$as_echo "incorrect, ignoring" >&6; }
49350      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49351$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49352    fi
49353  fi
49354
49355    fi
49356  fi
49357
49358  if test "x$MSVC_DLL" = x; then
49359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49360$as_echo_n "checking for $DLL_NAME... " >&6; }
49361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49362$as_echo "no" >&6; }
49363    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49364  fi
49365
49366    MSVCR_DLL="$MSVC_DLL"
49367  fi
49368
49369
49370
49371# Check whether --with-msvcp-dll was given.
49372if test "${with_msvcp_dll+set}" = set; then :
49373  withval=$with_msvcp_dll;
49374fi
49375
49376
49377  if test "x$MSVCP_NAME" != "x"; then
49378    if test "x$with_msvcp_dll" != x; then
49379      # If given explicitely by user, do not probe. If not present, fail directly.
49380
49381  DLL_NAME="$MSVCP_NAME"
49382  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
49383  METHOD="--with-msvcp-dll"
49384  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49385    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49386$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49387
49388    # Need to check if the found msvcr is correct architecture
49389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49390$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49391    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49393      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49394      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49395      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49396        CORRECT_MSVCR_ARCH="PE32 executable"
49397      else
49398        CORRECT_MSVCR_ARCH="PE32+ executable"
49399      fi
49400    else
49401      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49402        CORRECT_MSVCR_ARCH=386
49403      else
49404        CORRECT_MSVCR_ARCH=x86-64
49405      fi
49406    fi
49407    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49408      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49409$as_echo "ok" >&6; }
49410      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49411
49412  # Only process if variable expands to non-empty
49413
49414  if test "x$MSVC_DLL" != x; then
49415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49416
49417  # Input might be given as Windows format, start by converting to
49418  # unix format.
49419  path="$MSVC_DLL"
49420  new_path=`$CYGPATH -u "$path"`
49421
49422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49425  # "foo.exe" is OK but "foo" is an error.
49426  #
49427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49428  # It is also a way to make sure we got the proper file name for the real test later on.
49429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49430  if test "x$test_shortpath" = x; then
49431    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49432$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49433    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49434  fi
49435
49436  # Call helper function which possibly converts this using DOS-style short mode.
49437  # If so, the updated path is stored in $new_path.
49438
49439  input_path="$new_path"
49440  # Check if we need to convert this using DOS-style short mode. If the path
49441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49442  # take no chances and rewrite it.
49443  # Note: m4 eats our [], so we need to use [ and ] instead.
49444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49445  if test "x$has_forbidden_chars" != x; then
49446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49450      # Going to short mode and back again did indeed matter. Since short mode is
49451      # case insensitive, let's make it lowercase to improve readability.
49452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49453      # Now convert it back to Unix-style (cygpath)
49454      input_path=`$CYGPATH -u "$shortmode_path"`
49455      new_path="$input_path"
49456    fi
49457  fi
49458
49459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49460  if test "x$test_cygdrive_prefix" = x; then
49461    # As a simple fix, exclude /usr/bin since it's not a real path.
49462    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49464      # a path prefixed by /cygdrive for fixpath to work.
49465      new_path="$CYGWIN_ROOT_PATH$input_path"
49466    fi
49467  fi
49468
49469
49470  if test "x$path" != "x$new_path"; then
49471    MSVC_DLL="$new_path"
49472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49473$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49474  fi
49475
49476    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49477
49478  path="$MSVC_DLL"
49479  has_colon=`$ECHO $path | $GREP ^.:`
49480  new_path="$path"
49481  if test "x$has_colon" = x; then
49482    # Not in mixed or Windows style, start by that.
49483    new_path=`cmd //c echo $path`
49484  fi
49485
49486
49487  input_path="$new_path"
49488  # Check if we need to convert this using DOS-style short mode. If the path
49489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49490  # take no chances and rewrite it.
49491  # Note: m4 eats our [], so we need to use [ and ] instead.
49492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49493  if test "x$has_forbidden_chars" != x; then
49494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49496  fi
49497
49498
49499  windows_path="$new_path"
49500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49501    unix_path=`$CYGPATH -u "$windows_path"`
49502    new_path="$unix_path"
49503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49505    new_path="$unix_path"
49506  fi
49507
49508  if test "x$path" != "x$new_path"; then
49509    MSVC_DLL="$new_path"
49510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49511$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49512  fi
49513
49514  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49515  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49516
49517    else
49518      # We're on a unix platform. Hooray! :)
49519      path="$MSVC_DLL"
49520      has_space=`$ECHO "$path" | $GREP " "`
49521      if test "x$has_space" != x; then
49522        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49523$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49524        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49525      fi
49526
49527      # Use eval to expand a potential ~
49528      eval path="$path"
49529      if test ! -f "$path" && test ! -d "$path"; then
49530        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49531      fi
49532
49533      if test -d "$path"; then
49534        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49535      else
49536        dir="`$DIRNAME "$path"`"
49537        base="`$BASENAME "$path"`"
49538        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49539      fi
49540    fi
49541  fi
49542
49543      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49544$as_echo_n "checking for $DLL_NAME... " >&6; }
49545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49546$as_echo "$MSVC_DLL" >&6; }
49547    else
49548      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49549$as_echo "incorrect, ignoring" >&6; }
49550      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49551$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49552    fi
49553  fi
49554
49555      if test "x$MSVC_DLL" = x; then
49556        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
49557      fi
49558      MSVCP_DLL="$MSVC_DLL"
49559    elif test "x$DEVKIT_MSVCP_DLL" != x; then
49560
49561  DLL_NAME="$MSVCP_NAME"
49562  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
49563  METHOD="devkit"
49564  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49565    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49566$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49567
49568    # Need to check if the found msvcr is correct architecture
49569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49570$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49571    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49573      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49574      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49575      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49576        CORRECT_MSVCR_ARCH="PE32 executable"
49577      else
49578        CORRECT_MSVCR_ARCH="PE32+ executable"
49579      fi
49580    else
49581      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49582        CORRECT_MSVCR_ARCH=386
49583      else
49584        CORRECT_MSVCR_ARCH=x86-64
49585      fi
49586    fi
49587    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49588      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49589$as_echo "ok" >&6; }
49590      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49591
49592  # Only process if variable expands to non-empty
49593
49594  if test "x$MSVC_DLL" != x; then
49595    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49596
49597  # Input might be given as Windows format, start by converting to
49598  # unix format.
49599  path="$MSVC_DLL"
49600  new_path=`$CYGPATH -u "$path"`
49601
49602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49605  # "foo.exe" is OK but "foo" is an error.
49606  #
49607  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49608  # It is also a way to make sure we got the proper file name for the real test later on.
49609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49610  if test "x$test_shortpath" = x; then
49611    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49612$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49613    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49614  fi
49615
49616  # Call helper function which possibly converts this using DOS-style short mode.
49617  # If so, the updated path is stored in $new_path.
49618
49619  input_path="$new_path"
49620  # Check if we need to convert this using DOS-style short mode. If the path
49621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49622  # take no chances and rewrite it.
49623  # Note: m4 eats our [], so we need to use [ and ] instead.
49624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49625  if test "x$has_forbidden_chars" != x; then
49626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49630      # Going to short mode and back again did indeed matter. Since short mode is
49631      # case insensitive, let's make it lowercase to improve readability.
49632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49633      # Now convert it back to Unix-style (cygpath)
49634      input_path=`$CYGPATH -u "$shortmode_path"`
49635      new_path="$input_path"
49636    fi
49637  fi
49638
49639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49640  if test "x$test_cygdrive_prefix" = x; then
49641    # As a simple fix, exclude /usr/bin since it's not a real path.
49642    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49644      # a path prefixed by /cygdrive for fixpath to work.
49645      new_path="$CYGWIN_ROOT_PATH$input_path"
49646    fi
49647  fi
49648
49649
49650  if test "x$path" != "x$new_path"; then
49651    MSVC_DLL="$new_path"
49652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49653$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49654  fi
49655
49656    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49657
49658  path="$MSVC_DLL"
49659  has_colon=`$ECHO $path | $GREP ^.:`
49660  new_path="$path"
49661  if test "x$has_colon" = x; then
49662    # Not in mixed or Windows style, start by that.
49663    new_path=`cmd //c echo $path`
49664  fi
49665
49666
49667  input_path="$new_path"
49668  # Check if we need to convert this using DOS-style short mode. If the path
49669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49670  # take no chances and rewrite it.
49671  # Note: m4 eats our [], so we need to use [ and ] instead.
49672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49673  if test "x$has_forbidden_chars" != x; then
49674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49676  fi
49677
49678
49679  windows_path="$new_path"
49680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49681    unix_path=`$CYGPATH -u "$windows_path"`
49682    new_path="$unix_path"
49683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49685    new_path="$unix_path"
49686  fi
49687
49688  if test "x$path" != "x$new_path"; then
49689    MSVC_DLL="$new_path"
49690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49691$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49692  fi
49693
49694  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49695  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49696
49697    else
49698      # We're on a unix platform. Hooray! :)
49699      path="$MSVC_DLL"
49700      has_space=`$ECHO "$path" | $GREP " "`
49701      if test "x$has_space" != x; then
49702        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49703$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49704        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49705      fi
49706
49707      # Use eval to expand a potential ~
49708      eval path="$path"
49709      if test ! -f "$path" && test ! -d "$path"; then
49710        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49711      fi
49712
49713      if test -d "$path"; then
49714        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49715      else
49716        dir="`$DIRNAME "$path"`"
49717        base="`$BASENAME "$path"`"
49718        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49719      fi
49720    fi
49721  fi
49722
49723      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49724$as_echo_n "checking for $DLL_NAME... " >&6; }
49725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49726$as_echo "$MSVC_DLL" >&6; }
49727    else
49728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49729$as_echo "incorrect, ignoring" >&6; }
49730      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49731$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49732    fi
49733  fi
49734
49735      if test "x$MSVC_DLL" = x; then
49736        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
49737      fi
49738      MSVCP_DLL="$MSVC_DLL"
49739    else
49740
49741  DLL_NAME="${MSVCP_NAME}"
49742  MSVC_DLL=
49743
49744  if test "x$MSVC_DLL" = x; then
49745    # Probe: Using well-known location from Visual Studio 10.0
49746    if test "x$VCINSTALLDIR" != x; then
49747      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49748
49749  windows_path="$CYGWIN_VC_INSTALL_DIR"
49750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49751    unix_path=`$CYGPATH -u "$windows_path"`
49752    CYGWIN_VC_INSTALL_DIR="$unix_path"
49753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49755    CYGWIN_VC_INSTALL_DIR="$unix_path"
49756  fi
49757
49758      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49759        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49760      else
49761        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49762      fi
49763      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49764
49765  DLL_NAME="$DLL_NAME"
49766  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49767  METHOD="well-known location in VCINSTALLDIR"
49768  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49769    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49770$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49771
49772    # Need to check if the found msvcr is correct architecture
49773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49774$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49775    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49777      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49778      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49779      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49780        CORRECT_MSVCR_ARCH="PE32 executable"
49781      else
49782        CORRECT_MSVCR_ARCH="PE32+ executable"
49783      fi
49784    else
49785      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49786        CORRECT_MSVCR_ARCH=386
49787      else
49788        CORRECT_MSVCR_ARCH=x86-64
49789      fi
49790    fi
49791    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49793$as_echo "ok" >&6; }
49794      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49795
49796  # Only process if variable expands to non-empty
49797
49798  if test "x$MSVC_DLL" != x; then
49799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49800
49801  # Input might be given as Windows format, start by converting to
49802  # unix format.
49803  path="$MSVC_DLL"
49804  new_path=`$CYGPATH -u "$path"`
49805
49806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49809  # "foo.exe" is OK but "foo" is an error.
49810  #
49811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49812  # It is also a way to make sure we got the proper file name for the real test later on.
49813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49814  if test "x$test_shortpath" = x; then
49815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49816$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49817    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49818  fi
49819
49820  # Call helper function which possibly converts this using DOS-style short mode.
49821  # If so, the updated path is stored in $new_path.
49822
49823  input_path="$new_path"
49824  # Check if we need to convert this using DOS-style short mode. If the path
49825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49826  # take no chances and rewrite it.
49827  # Note: m4 eats our [], so we need to use [ and ] instead.
49828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49829  if test "x$has_forbidden_chars" != x; then
49830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49834      # Going to short mode and back again did indeed matter. Since short mode is
49835      # case insensitive, let's make it lowercase to improve readability.
49836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49837      # Now convert it back to Unix-style (cygpath)
49838      input_path=`$CYGPATH -u "$shortmode_path"`
49839      new_path="$input_path"
49840    fi
49841  fi
49842
49843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49844  if test "x$test_cygdrive_prefix" = x; then
49845    # As a simple fix, exclude /usr/bin since it's not a real path.
49846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49848      # a path prefixed by /cygdrive for fixpath to work.
49849      new_path="$CYGWIN_ROOT_PATH$input_path"
49850    fi
49851  fi
49852
49853
49854  if test "x$path" != "x$new_path"; then
49855    MSVC_DLL="$new_path"
49856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49857$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49858  fi
49859
49860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49861
49862  path="$MSVC_DLL"
49863  has_colon=`$ECHO $path | $GREP ^.:`
49864  new_path="$path"
49865  if test "x$has_colon" = x; then
49866    # Not in mixed or Windows style, start by that.
49867    new_path=`cmd //c echo $path`
49868  fi
49869
49870
49871  input_path="$new_path"
49872  # Check if we need to convert this using DOS-style short mode. If the path
49873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49874  # take no chances and rewrite it.
49875  # Note: m4 eats our [], so we need to use [ and ] instead.
49876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49877  if test "x$has_forbidden_chars" != x; then
49878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49880  fi
49881
49882
49883  windows_path="$new_path"
49884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49885    unix_path=`$CYGPATH -u "$windows_path"`
49886    new_path="$unix_path"
49887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49889    new_path="$unix_path"
49890  fi
49891
49892  if test "x$path" != "x$new_path"; then
49893    MSVC_DLL="$new_path"
49894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49895$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49896  fi
49897
49898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49900
49901    else
49902      # We're on a unix platform. Hooray! :)
49903      path="$MSVC_DLL"
49904      has_space=`$ECHO "$path" | $GREP " "`
49905      if test "x$has_space" != x; then
49906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49907$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49909      fi
49910
49911      # Use eval to expand a potential ~
49912      eval path="$path"
49913      if test ! -f "$path" && test ! -d "$path"; then
49914        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49915      fi
49916
49917      if test -d "$path"; then
49918        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49919      else
49920        dir="`$DIRNAME "$path"`"
49921        base="`$BASENAME "$path"`"
49922        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
49923      fi
49924    fi
49925  fi
49926
49927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49928$as_echo_n "checking for $DLL_NAME... " >&6; }
49929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49930$as_echo "$MSVC_DLL" >&6; }
49931    else
49932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49933$as_echo "incorrect, ignoring" >&6; }
49934      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49935$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49936    fi
49937  fi
49938
49939    fi
49940  fi
49941
49942  if test "x$MSVC_DLL" = x; then
49943    # Probe: Check in the Boot JDK directory.
49944    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49945
49946  DLL_NAME="$DLL_NAME"
49947  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49948  METHOD="well-known location in Boot JDK"
49949  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49950    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49951$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49952
49953    # Need to check if the found msvcr is correct architecture
49954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49955$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49956    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49958      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49959      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49960      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49961        CORRECT_MSVCR_ARCH="PE32 executable"
49962      else
49963        CORRECT_MSVCR_ARCH="PE32+ executable"
49964      fi
49965    else
49966      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49967        CORRECT_MSVCR_ARCH=386
49968      else
49969        CORRECT_MSVCR_ARCH=x86-64
49970      fi
49971    fi
49972    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49973      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49974$as_echo "ok" >&6; }
49975      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49976
49977  # Only process if variable expands to non-empty
49978
49979  if test "x$MSVC_DLL" != x; then
49980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49981
49982  # Input might be given as Windows format, start by converting to
49983  # unix format.
49984  path="$MSVC_DLL"
49985  new_path=`$CYGPATH -u "$path"`
49986
49987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49990  # "foo.exe" is OK but "foo" is an error.
49991  #
49992  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49993  # It is also a way to make sure we got the proper file name for the real test later on.
49994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49995  if test "x$test_shortpath" = x; then
49996    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49997$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49998    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49999  fi
50000
50001  # Call helper function which possibly converts this using DOS-style short mode.
50002  # If so, the updated path is stored in $new_path.
50003
50004  input_path="$new_path"
50005  # Check if we need to convert this using DOS-style short mode. If the path
50006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50007  # take no chances and rewrite it.
50008  # Note: m4 eats our [], so we need to use [ and ] instead.
50009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50010  if test "x$has_forbidden_chars" != x; then
50011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50012    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50013    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50014    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50015      # Going to short mode and back again did indeed matter. Since short mode is
50016      # case insensitive, let's make it lowercase to improve readability.
50017      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50018      # Now convert it back to Unix-style (cygpath)
50019      input_path=`$CYGPATH -u "$shortmode_path"`
50020      new_path="$input_path"
50021    fi
50022  fi
50023
50024  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50025  if test "x$test_cygdrive_prefix" = x; then
50026    # As a simple fix, exclude /usr/bin since it's not a real path.
50027    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50028      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50029      # a path prefixed by /cygdrive for fixpath to work.
50030      new_path="$CYGWIN_ROOT_PATH$input_path"
50031    fi
50032  fi
50033
50034
50035  if test "x$path" != "x$new_path"; then
50036    MSVC_DLL="$new_path"
50037    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50038$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50039  fi
50040
50041    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50042
50043  path="$MSVC_DLL"
50044  has_colon=`$ECHO $path | $GREP ^.:`
50045  new_path="$path"
50046  if test "x$has_colon" = x; then
50047    # Not in mixed or Windows style, start by that.
50048    new_path=`cmd //c echo $path`
50049  fi
50050
50051
50052  input_path="$new_path"
50053  # Check if we need to convert this using DOS-style short mode. If the path
50054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50055  # take no chances and rewrite it.
50056  # Note: m4 eats our [], so we need to use [ and ] instead.
50057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50058  if test "x$has_forbidden_chars" != x; then
50059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50061  fi
50062
50063
50064  windows_path="$new_path"
50065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50066    unix_path=`$CYGPATH -u "$windows_path"`
50067    new_path="$unix_path"
50068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50070    new_path="$unix_path"
50071  fi
50072
50073  if test "x$path" != "x$new_path"; then
50074    MSVC_DLL="$new_path"
50075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50076$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50077  fi
50078
50079  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50080  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50081
50082    else
50083      # We're on a unix platform. Hooray! :)
50084      path="$MSVC_DLL"
50085      has_space=`$ECHO "$path" | $GREP " "`
50086      if test "x$has_space" != x; then
50087        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50088$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50089        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50090      fi
50091
50092      # Use eval to expand a potential ~
50093      eval path="$path"
50094      if test ! -f "$path" && test ! -d "$path"; then
50095        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50096      fi
50097
50098      if test -d "$path"; then
50099        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50100      else
50101        dir="`$DIRNAME "$path"`"
50102        base="`$BASENAME "$path"`"
50103        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50104      fi
50105    fi
50106  fi
50107
50108      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50109$as_echo_n "checking for $DLL_NAME... " >&6; }
50110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50111$as_echo "$MSVC_DLL" >&6; }
50112    else
50113      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50114$as_echo "incorrect, ignoring" >&6; }
50115      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50116$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50117    fi
50118  fi
50119
50120  fi
50121
50122  if test "x$MSVC_DLL" = x; then
50123    # Probe: Look in the Windows system32 directory
50124    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50125
50126  windows_path="$CYGWIN_SYSTEMROOT"
50127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50128    unix_path=`$CYGPATH -u "$windows_path"`
50129    CYGWIN_SYSTEMROOT="$unix_path"
50130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50132    CYGWIN_SYSTEMROOT="$unix_path"
50133  fi
50134
50135    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50136
50137  DLL_NAME="$DLL_NAME"
50138  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50139  METHOD="well-known location in SYSTEMROOT"
50140  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50141    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50142$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50143
50144    # Need to check if the found msvcr is correct architecture
50145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50146$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50147    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50149      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50150      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50151      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50152        CORRECT_MSVCR_ARCH="PE32 executable"
50153      else
50154        CORRECT_MSVCR_ARCH="PE32+ executable"
50155      fi
50156    else
50157      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50158        CORRECT_MSVCR_ARCH=386
50159      else
50160        CORRECT_MSVCR_ARCH=x86-64
50161      fi
50162    fi
50163    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50165$as_echo "ok" >&6; }
50166      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50167
50168  # Only process if variable expands to non-empty
50169
50170  if test "x$MSVC_DLL" != x; then
50171    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50172
50173  # Input might be given as Windows format, start by converting to
50174  # unix format.
50175  path="$MSVC_DLL"
50176  new_path=`$CYGPATH -u "$path"`
50177
50178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50181  # "foo.exe" is OK but "foo" is an error.
50182  #
50183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50184  # It is also a way to make sure we got the proper file name for the real test later on.
50185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50186  if test "x$test_shortpath" = x; then
50187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50188$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50189    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50190  fi
50191
50192  # Call helper function which possibly converts this using DOS-style short mode.
50193  # If so, the updated path is stored in $new_path.
50194
50195  input_path="$new_path"
50196  # Check if we need to convert this using DOS-style short mode. If the path
50197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50198  # take no chances and rewrite it.
50199  # Note: m4 eats our [], so we need to use [ and ] instead.
50200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50201  if test "x$has_forbidden_chars" != x; then
50202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50206      # Going to short mode and back again did indeed matter. Since short mode is
50207      # case insensitive, let's make it lowercase to improve readability.
50208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50209      # Now convert it back to Unix-style (cygpath)
50210      input_path=`$CYGPATH -u "$shortmode_path"`
50211      new_path="$input_path"
50212    fi
50213  fi
50214
50215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50216  if test "x$test_cygdrive_prefix" = x; then
50217    # As a simple fix, exclude /usr/bin since it's not a real path.
50218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50220      # a path prefixed by /cygdrive for fixpath to work.
50221      new_path="$CYGWIN_ROOT_PATH$input_path"
50222    fi
50223  fi
50224
50225
50226  if test "x$path" != "x$new_path"; then
50227    MSVC_DLL="$new_path"
50228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50229$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50230  fi
50231
50232    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50233
50234  path="$MSVC_DLL"
50235  has_colon=`$ECHO $path | $GREP ^.:`
50236  new_path="$path"
50237  if test "x$has_colon" = x; then
50238    # Not in mixed or Windows style, start by that.
50239    new_path=`cmd //c echo $path`
50240  fi
50241
50242
50243  input_path="$new_path"
50244  # Check if we need to convert this using DOS-style short mode. If the path
50245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50246  # take no chances and rewrite it.
50247  # Note: m4 eats our [], so we need to use [ and ] instead.
50248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50249  if test "x$has_forbidden_chars" != x; then
50250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50252  fi
50253
50254
50255  windows_path="$new_path"
50256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50257    unix_path=`$CYGPATH -u "$windows_path"`
50258    new_path="$unix_path"
50259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50261    new_path="$unix_path"
50262  fi
50263
50264  if test "x$path" != "x$new_path"; then
50265    MSVC_DLL="$new_path"
50266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50267$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50268  fi
50269
50270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50272
50273    else
50274      # We're on a unix platform. Hooray! :)
50275      path="$MSVC_DLL"
50276      has_space=`$ECHO "$path" | $GREP " "`
50277      if test "x$has_space" != x; then
50278        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50279$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50280        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50281      fi
50282
50283      # Use eval to expand a potential ~
50284      eval path="$path"
50285      if test ! -f "$path" && test ! -d "$path"; then
50286        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50287      fi
50288
50289      if test -d "$path"; then
50290        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50291      else
50292        dir="`$DIRNAME "$path"`"
50293        base="`$BASENAME "$path"`"
50294        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50295      fi
50296    fi
50297  fi
50298
50299      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50300$as_echo_n "checking for $DLL_NAME... " >&6; }
50301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50302$as_echo "$MSVC_DLL" >&6; }
50303    else
50304      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50305$as_echo "incorrect, ignoring" >&6; }
50306      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50307$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50308    fi
50309  fi
50310
50311  fi
50312
50313  if test "x$MSVC_DLL" = x; then
50314    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50315    if test "x$VS100COMNTOOLS" != x; then
50316      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50317
50318  windows_path="$CYGWIN_VS_TOOLS_DIR"
50319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50320    unix_path=`$CYGPATH -u "$windows_path"`
50321    CYGWIN_VS_TOOLS_DIR="$unix_path"
50322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50324    CYGWIN_VS_TOOLS_DIR="$unix_path"
50325  fi
50326
50327      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50328        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50329	    | $GREP -i /x64/ | $HEAD --lines 1`
50330      else
50331        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50332	    | $GREP -i /x86/ | $HEAD --lines 1`
50333      fi
50334
50335  DLL_NAME="$DLL_NAME"
50336  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50337  METHOD="search of VS100COMNTOOLS"
50338  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50339    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50340$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50341
50342    # Need to check if the found msvcr is correct architecture
50343    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50344$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50345    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50347      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50348      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50349      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50350        CORRECT_MSVCR_ARCH="PE32 executable"
50351      else
50352        CORRECT_MSVCR_ARCH="PE32+ executable"
50353      fi
50354    else
50355      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50356        CORRECT_MSVCR_ARCH=386
50357      else
50358        CORRECT_MSVCR_ARCH=x86-64
50359      fi
50360    fi
50361    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50362      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50363$as_echo "ok" >&6; }
50364      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50365
50366  # Only process if variable expands to non-empty
50367
50368  if test "x$MSVC_DLL" != x; then
50369    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50370
50371  # Input might be given as Windows format, start by converting to
50372  # unix format.
50373  path="$MSVC_DLL"
50374  new_path=`$CYGPATH -u "$path"`
50375
50376  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50377  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50378  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50379  # "foo.exe" is OK but "foo" is an error.
50380  #
50381  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50382  # It is also a way to make sure we got the proper file name for the real test later on.
50383  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50384  if test "x$test_shortpath" = x; then
50385    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50386$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50387    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50388  fi
50389
50390  # Call helper function which possibly converts this using DOS-style short mode.
50391  # If so, the updated path is stored in $new_path.
50392
50393  input_path="$new_path"
50394  # Check if we need to convert this using DOS-style short mode. If the path
50395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50396  # take no chances and rewrite it.
50397  # Note: m4 eats our [], so we need to use [ and ] instead.
50398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50399  if test "x$has_forbidden_chars" != x; then
50400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50404      # Going to short mode and back again did indeed matter. Since short mode is
50405      # case insensitive, let's make it lowercase to improve readability.
50406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50407      # Now convert it back to Unix-style (cygpath)
50408      input_path=`$CYGPATH -u "$shortmode_path"`
50409      new_path="$input_path"
50410    fi
50411  fi
50412
50413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50414  if test "x$test_cygdrive_prefix" = x; then
50415    # As a simple fix, exclude /usr/bin since it's not a real path.
50416    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50418      # a path prefixed by /cygdrive for fixpath to work.
50419      new_path="$CYGWIN_ROOT_PATH$input_path"
50420    fi
50421  fi
50422
50423
50424  if test "x$path" != "x$new_path"; then
50425    MSVC_DLL="$new_path"
50426    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50427$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50428  fi
50429
50430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50431
50432  path="$MSVC_DLL"
50433  has_colon=`$ECHO $path | $GREP ^.:`
50434  new_path="$path"
50435  if test "x$has_colon" = x; then
50436    # Not in mixed or Windows style, start by that.
50437    new_path=`cmd //c echo $path`
50438  fi
50439
50440
50441  input_path="$new_path"
50442  # Check if we need to convert this using DOS-style short mode. If the path
50443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50444  # take no chances and rewrite it.
50445  # Note: m4 eats our [], so we need to use [ and ] instead.
50446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50447  if test "x$has_forbidden_chars" != x; then
50448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50450  fi
50451
50452
50453  windows_path="$new_path"
50454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50455    unix_path=`$CYGPATH -u "$windows_path"`
50456    new_path="$unix_path"
50457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50459    new_path="$unix_path"
50460  fi
50461
50462  if test "x$path" != "x$new_path"; then
50463    MSVC_DLL="$new_path"
50464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50465$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50466  fi
50467
50468  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50469  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50470
50471    else
50472      # We're on a unix platform. Hooray! :)
50473      path="$MSVC_DLL"
50474      has_space=`$ECHO "$path" | $GREP " "`
50475      if test "x$has_space" != x; then
50476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50477$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50478        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50479      fi
50480
50481      # Use eval to expand a potential ~
50482      eval path="$path"
50483      if test ! -f "$path" && test ! -d "$path"; then
50484        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50485      fi
50486
50487      if test -d "$path"; then
50488        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50489      else
50490        dir="`$DIRNAME "$path"`"
50491        base="`$BASENAME "$path"`"
50492        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50493      fi
50494    fi
50495  fi
50496
50497      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50498$as_echo_n "checking for $DLL_NAME... " >&6; }
50499      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50500$as_echo "$MSVC_DLL" >&6; }
50501    else
50502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50503$as_echo "incorrect, ignoring" >&6; }
50504      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50505$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50506    fi
50507  fi
50508
50509    fi
50510  fi
50511
50512  if test "x$MSVC_DLL" = x; then
50513    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50514    # (This was the original behaviour; kept since it might turn something up)
50515    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50516      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50517        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50518	    | $GREP x64 | $HEAD --lines 1`
50519      else
50520        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50521	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50522        if test "x$POSSIBLE_MSVC_DLL" = x; then
50523          # We're grasping at straws now...
50524          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50525	      | $HEAD --lines 1`
50526        fi
50527      fi
50528
50529
50530  DLL_NAME="$DLL_NAME"
50531  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50532  METHOD="search of VCINSTALLDIR"
50533  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50534    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50535$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50536
50537    # Need to check if the found msvcr is correct architecture
50538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50539$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50540    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50542      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50543      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50544      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50545        CORRECT_MSVCR_ARCH="PE32 executable"
50546      else
50547        CORRECT_MSVCR_ARCH="PE32+ executable"
50548      fi
50549    else
50550      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50551        CORRECT_MSVCR_ARCH=386
50552      else
50553        CORRECT_MSVCR_ARCH=x86-64
50554      fi
50555    fi
50556    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50558$as_echo "ok" >&6; }
50559      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50560
50561  # Only process if variable expands to non-empty
50562
50563  if test "x$MSVC_DLL" != x; then
50564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50565
50566  # Input might be given as Windows format, start by converting to
50567  # unix format.
50568  path="$MSVC_DLL"
50569  new_path=`$CYGPATH -u "$path"`
50570
50571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50574  # "foo.exe" is OK but "foo" is an error.
50575  #
50576  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50577  # It is also a way to make sure we got the proper file name for the real test later on.
50578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50579  if test "x$test_shortpath" = x; then
50580    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50581$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50582    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50583  fi
50584
50585  # Call helper function which possibly converts this using DOS-style short mode.
50586  # If so, the updated path is stored in $new_path.
50587
50588  input_path="$new_path"
50589  # Check if we need to convert this using DOS-style short mode. If the path
50590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50591  # take no chances and rewrite it.
50592  # Note: m4 eats our [], so we need to use [ and ] instead.
50593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50594  if test "x$has_forbidden_chars" != x; then
50595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50599      # Going to short mode and back again did indeed matter. Since short mode is
50600      # case insensitive, let's make it lowercase to improve readability.
50601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50602      # Now convert it back to Unix-style (cygpath)
50603      input_path=`$CYGPATH -u "$shortmode_path"`
50604      new_path="$input_path"
50605    fi
50606  fi
50607
50608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50609  if test "x$test_cygdrive_prefix" = x; then
50610    # As a simple fix, exclude /usr/bin since it's not a real path.
50611    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50613      # a path prefixed by /cygdrive for fixpath to work.
50614      new_path="$CYGWIN_ROOT_PATH$input_path"
50615    fi
50616  fi
50617
50618
50619  if test "x$path" != "x$new_path"; then
50620    MSVC_DLL="$new_path"
50621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50622$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50623  fi
50624
50625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50626
50627  path="$MSVC_DLL"
50628  has_colon=`$ECHO $path | $GREP ^.:`
50629  new_path="$path"
50630  if test "x$has_colon" = x; then
50631    # Not in mixed or Windows style, start by that.
50632    new_path=`cmd //c echo $path`
50633  fi
50634
50635
50636  input_path="$new_path"
50637  # Check if we need to convert this using DOS-style short mode. If the path
50638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50639  # take no chances and rewrite it.
50640  # Note: m4 eats our [], so we need to use [ and ] instead.
50641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50642  if test "x$has_forbidden_chars" != x; then
50643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50645  fi
50646
50647
50648  windows_path="$new_path"
50649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50650    unix_path=`$CYGPATH -u "$windows_path"`
50651    new_path="$unix_path"
50652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50654    new_path="$unix_path"
50655  fi
50656
50657  if test "x$path" != "x$new_path"; then
50658    MSVC_DLL="$new_path"
50659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50660$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50661  fi
50662
50663  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50664  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50665
50666    else
50667      # We're on a unix platform. Hooray! :)
50668      path="$MSVC_DLL"
50669      has_space=`$ECHO "$path" | $GREP " "`
50670      if test "x$has_space" != x; then
50671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50672$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50673        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50674      fi
50675
50676      # Use eval to expand a potential ~
50677      eval path="$path"
50678      if test ! -f "$path" && test ! -d "$path"; then
50679        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50680      fi
50681
50682      if test -d "$path"; then
50683        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50684      else
50685        dir="`$DIRNAME "$path"`"
50686        base="`$BASENAME "$path"`"
50687        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
50688      fi
50689    fi
50690  fi
50691
50692      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50693$as_echo_n "checking for $DLL_NAME... " >&6; }
50694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50695$as_echo "$MSVC_DLL" >&6; }
50696    else
50697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50698$as_echo "incorrect, ignoring" >&6; }
50699      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50700$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50701    fi
50702  fi
50703
50704    fi
50705  fi
50706
50707  if test "x$MSVC_DLL" = x; then
50708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50709$as_echo_n "checking for $DLL_NAME... " >&6; }
50710    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50711$as_echo "no" >&6; }
50712    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50713  fi
50714
50715      MSVCP_DLL="$MSVC_DLL"
50716    fi
50717
50718  fi
50719
50720  fi
50721
50722
50723  if test "x$NEEDS_LIB_X11" = xfalse; then
50724    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
50725      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
50726$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
50727    fi
50728    X_CFLAGS=
50729    X_LIBS=
50730  else
50731
50732    if test "x${with_x}" = xno; then
50733      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
50734    fi
50735
50736    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
50737      # The user has specified a X11 base directory. Use it for includes and
50738      # libraries, unless explicitely overridden.
50739      if test "x$x_includes" = xNONE; then
50740        x_includes="${with_x}/include"
50741      fi
50742      if test "x$x_libraries" = xNONE; then
50743        x_libraries="${with_x}/lib"
50744      fi
50745    else
50746      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
50747      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
50748      # --x-libraries for the sysroot, if that seems to be correct.
50749      if test "x$SYSROOT" != "x"; then
50750        if test "x$x_includes" = xNONE; then
50751          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
50752            x_includes="$SYSROOT/usr/X11R6/include"
50753          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
50754            x_includes="$SYSROOT/usr/include"
50755          fi
50756        fi
50757        if test "x$x_libraries" = xNONE; then
50758          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
50759            x_libraries="$SYSROOT/usr/X11R6/lib"
50760          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50761            x_libraries="$SYSROOT/usr/lib64"
50762          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
50763            x_libraries="$SYSROOT/usr/lib"
50764          fi
50765        fi
50766      fi
50767    fi
50768
50769    # Now let autoconf do it's magic
50770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
50771$as_echo_n "checking for X... " >&6; }
50772
50773
50774# Check whether --with-x was given.
50775if test "${with_x+set}" = set; then :
50776  withval=$with_x;
50777fi
50778
50779# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
50780if test "x$with_x" = xno; then
50781  # The user explicitly disabled X.
50782  have_x=disabled
50783else
50784  case $x_includes,$x_libraries in #(
50785    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
50786    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
50787  $as_echo_n "(cached) " >&6
50788else
50789  # One or both of the vars are not set, and there is no cached value.
50790ac_x_includes=no ac_x_libraries=no
50791rm -f -r conftest.dir
50792if mkdir conftest.dir; then
50793  cd conftest.dir
50794  cat >Imakefile <<'_ACEOF'
50795incroot:
50796	@echo incroot='${INCROOT}'
50797usrlibdir:
50798	@echo usrlibdir='${USRLIBDIR}'
50799libdir:
50800	@echo libdir='${LIBDIR}'
50801_ACEOF
50802  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
50803    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
50804    for ac_var in incroot usrlibdir libdir; do
50805      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
50806    done
50807    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
50808    for ac_extension in a so sl dylib la dll; do
50809      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
50810	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
50811	ac_im_usrlibdir=$ac_im_libdir; break
50812      fi
50813    done
50814    # Screen out bogus values from the imake configuration.  They are
50815    # bogus both because they are the default anyway, and because
50816    # using them would break gcc on systems where it needs fixed includes.
50817    case $ac_im_incroot in
50818	/usr/include) ac_x_includes= ;;
50819	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
50820    esac
50821    case $ac_im_usrlibdir in
50822	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
50823	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
50824    esac
50825  fi
50826  cd ..
50827  rm -f -r conftest.dir
50828fi
50829
50830# Standard set of common directories for X headers.
50831# Check X11 before X11Rn because it is often a symlink to the current release.
50832ac_x_header_dirs='
50833/usr/X11/include
50834/usr/X11R7/include
50835/usr/X11R6/include
50836/usr/X11R5/include
50837/usr/X11R4/include
50838
50839/usr/include/X11
50840/usr/include/X11R7
50841/usr/include/X11R6
50842/usr/include/X11R5
50843/usr/include/X11R4
50844
50845/usr/local/X11/include
50846/usr/local/X11R7/include
50847/usr/local/X11R6/include
50848/usr/local/X11R5/include
50849/usr/local/X11R4/include
50850
50851/usr/local/include/X11
50852/usr/local/include/X11R7
50853/usr/local/include/X11R6
50854/usr/local/include/X11R5
50855/usr/local/include/X11R4
50856
50857/usr/X386/include
50858/usr/x386/include
50859/usr/XFree86/include/X11
50860
50861/usr/include
50862/usr/local/include
50863/usr/unsupported/include
50864/usr/athena/include
50865/usr/local/x11r5/include
50866/usr/lpp/Xamples/include
50867
50868/usr/openwin/include
50869/usr/openwin/share/include'
50870
50871if test "$ac_x_includes" = no; then
50872  # Guess where to find include files, by looking for Xlib.h.
50873  # First, try using that file with no special directory specified.
50874  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50875/* end confdefs.h.  */
50876#include <X11/Xlib.h>
50877_ACEOF
50878if ac_fn_cxx_try_cpp "$LINENO"; then :
50879  # We can compile using X headers with no special include directory.
50880ac_x_includes=
50881else
50882  for ac_dir in $ac_x_header_dirs; do
50883  if test -r "$ac_dir/X11/Xlib.h"; then
50884    ac_x_includes=$ac_dir
50885    break
50886  fi
50887done
50888fi
50889rm -f conftest.err conftest.i conftest.$ac_ext
50890fi # $ac_x_includes = no
50891
50892if test "$ac_x_libraries" = no; then
50893  # Check for the libraries.
50894  # See if we find them without any special options.
50895  # Don't add to $LIBS permanently.
50896  ac_save_LIBS=$LIBS
50897  LIBS="-lX11 $LIBS"
50898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50899/* end confdefs.h.  */
50900#include <X11/Xlib.h>
50901int
50902main ()
50903{
50904XrmInitialize ()
50905  ;
50906  return 0;
50907}
50908_ACEOF
50909if ac_fn_cxx_try_link "$LINENO"; then :
50910  LIBS=$ac_save_LIBS
50911# We can link X programs with no special library path.
50912ac_x_libraries=
50913else
50914  LIBS=$ac_save_LIBS
50915for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
50916do
50917  # Don't even attempt the hair of trying to link an X program!
50918  for ac_extension in a so sl dylib la dll; do
50919    if test -r "$ac_dir/libX11.$ac_extension"; then
50920      ac_x_libraries=$ac_dir
50921      break 2
50922    fi
50923  done
50924done
50925fi
50926rm -f core conftest.err conftest.$ac_objext \
50927    conftest$ac_exeext conftest.$ac_ext
50928fi # $ac_x_libraries = no
50929
50930case $ac_x_includes,$ac_x_libraries in #(
50931  no,* | *,no | *\'*)
50932    # Didn't find X, or a directory has "'" in its name.
50933    ac_cv_have_x="have_x=no";; #(
50934  *)
50935    # Record where we found X for the cache.
50936    ac_cv_have_x="have_x=yes\
50937	ac_x_includes='$ac_x_includes'\
50938	ac_x_libraries='$ac_x_libraries'"
50939esac
50940fi
50941;; #(
50942    *) have_x=yes;;
50943  esac
50944  eval "$ac_cv_have_x"
50945fi # $with_x != no
50946
50947if test "$have_x" != yes; then
50948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
50949$as_echo "$have_x" >&6; }
50950  no_x=yes
50951else
50952  # If each of the values was on the command line, it overrides each guess.
50953  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
50954  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
50955  # Update the cache value to reflect the command line values.
50956  ac_cv_have_x="have_x=yes\
50957	ac_x_includes='$x_includes'\
50958	ac_x_libraries='$x_libraries'"
50959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
50960$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
50961fi
50962
50963    if test "$no_x" = yes; then
50964  # Not all programs may use this symbol, but it does not hurt to define it.
50965
50966$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
50967
50968  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
50969else
50970  if test -n "$x_includes"; then
50971    X_CFLAGS="$X_CFLAGS -I$x_includes"
50972  fi
50973
50974  # It would also be nice to do this for all -L options, not just this one.
50975  if test -n "$x_libraries"; then
50976    X_LIBS="$X_LIBS -L$x_libraries"
50977    # For Solaris; some versions of Sun CC require a space after -R and
50978    # others require no space.  Words are not sufficient . . . .
50979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
50980$as_echo_n "checking whether -R must be followed by a space... " >&6; }
50981    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
50982    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
50983    ac_cxx_werror_flag=yes
50984    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50985/* end confdefs.h.  */
50986
50987int
50988main ()
50989{
50990
50991  ;
50992  return 0;
50993}
50994_ACEOF
50995if ac_fn_cxx_try_link "$LINENO"; then :
50996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50997$as_echo "no" >&6; }
50998       X_LIBS="$X_LIBS -R$x_libraries"
50999else
51000  LIBS="$ac_xsave_LIBS -R $x_libraries"
51001       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51002/* end confdefs.h.  */
51003
51004int
51005main ()
51006{
51007
51008  ;
51009  return 0;
51010}
51011_ACEOF
51012if ac_fn_cxx_try_link "$LINENO"; then :
51013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51014$as_echo "yes" >&6; }
51015	  X_LIBS="$X_LIBS -R $x_libraries"
51016else
51017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
51018$as_echo "neither works" >&6; }
51019fi
51020rm -f core conftest.err conftest.$ac_objext \
51021    conftest$ac_exeext conftest.$ac_ext
51022fi
51023rm -f core conftest.err conftest.$ac_objext \
51024    conftest$ac_exeext conftest.$ac_ext
51025    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
51026    LIBS=$ac_xsave_LIBS
51027  fi
51028
51029  # Check for system-dependent libraries X programs must link with.
51030  # Do this before checking for the system-independent R6 libraries
51031  # (-lICE), since we may need -lsocket or whatever for X linking.
51032
51033  if test "$ISC" = yes; then
51034    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
51035  else
51036    # Martyn Johnson says this is needed for Ultrix, if the X
51037    # libraries were built with DECnet support.  And Karl Berry says
51038    # the Alpha needs dnet_stub (dnet does not exist).
51039    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
51040    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51041/* end confdefs.h.  */
51042
51043/* Override any GCC internal prototype to avoid an error.
51044   Use char because int might match the return type of a GCC
51045   builtin and then its argument prototype would still apply.  */
51046#ifdef __cplusplus
51047extern "C"
51048#endif
51049char XOpenDisplay ();
51050int
51051main ()
51052{
51053return XOpenDisplay ();
51054  ;
51055  return 0;
51056}
51057_ACEOF
51058if ac_fn_cxx_try_link "$LINENO"; then :
51059
51060else
51061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
51062$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
51063if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
51064  $as_echo_n "(cached) " >&6
51065else
51066  ac_check_lib_save_LIBS=$LIBS
51067LIBS="-ldnet  $LIBS"
51068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51069/* end confdefs.h.  */
51070
51071/* Override any GCC internal prototype to avoid an error.
51072   Use char because int might match the return type of a GCC
51073   builtin and then its argument prototype would still apply.  */
51074#ifdef __cplusplus
51075extern "C"
51076#endif
51077char dnet_ntoa ();
51078int
51079main ()
51080{
51081return dnet_ntoa ();
51082  ;
51083  return 0;
51084}
51085_ACEOF
51086if ac_fn_cxx_try_link "$LINENO"; then :
51087  ac_cv_lib_dnet_dnet_ntoa=yes
51088else
51089  ac_cv_lib_dnet_dnet_ntoa=no
51090fi
51091rm -f core conftest.err conftest.$ac_objext \
51092    conftest$ac_exeext conftest.$ac_ext
51093LIBS=$ac_check_lib_save_LIBS
51094fi
51095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
51096$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
51097if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
51098  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
51099fi
51100
51101    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
51102      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
51103$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
51104if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
51105  $as_echo_n "(cached) " >&6
51106else
51107  ac_check_lib_save_LIBS=$LIBS
51108LIBS="-ldnet_stub  $LIBS"
51109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51110/* end confdefs.h.  */
51111
51112/* Override any GCC internal prototype to avoid an error.
51113   Use char because int might match the return type of a GCC
51114   builtin and then its argument prototype would still apply.  */
51115#ifdef __cplusplus
51116extern "C"
51117#endif
51118char dnet_ntoa ();
51119int
51120main ()
51121{
51122return dnet_ntoa ();
51123  ;
51124  return 0;
51125}
51126_ACEOF
51127if ac_fn_cxx_try_link "$LINENO"; then :
51128  ac_cv_lib_dnet_stub_dnet_ntoa=yes
51129else
51130  ac_cv_lib_dnet_stub_dnet_ntoa=no
51131fi
51132rm -f core conftest.err conftest.$ac_objext \
51133    conftest$ac_exeext conftest.$ac_ext
51134LIBS=$ac_check_lib_save_LIBS
51135fi
51136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
51137$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
51138if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
51139  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
51140fi
51141
51142    fi
51143fi
51144rm -f core conftest.err conftest.$ac_objext \
51145    conftest$ac_exeext conftest.$ac_ext
51146    LIBS="$ac_xsave_LIBS"
51147
51148    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
51149    # to get the SysV transport functions.
51150    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
51151    # needs -lnsl.
51152    # The nsl library prevents programs from opening the X display
51153    # on Irix 5.2, according to T.E. Dickey.
51154    # The functions gethostbyname, getservbyname, and inet_addr are
51155    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
51156    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
51157if test "x$ac_cv_func_gethostbyname" = xyes; then :
51158
51159fi
51160
51161    if test $ac_cv_func_gethostbyname = no; then
51162      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
51163$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
51164if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
51165  $as_echo_n "(cached) " >&6
51166else
51167  ac_check_lib_save_LIBS=$LIBS
51168LIBS="-lnsl  $LIBS"
51169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51170/* end confdefs.h.  */
51171
51172/* Override any GCC internal prototype to avoid an error.
51173   Use char because int might match the return type of a GCC
51174   builtin and then its argument prototype would still apply.  */
51175#ifdef __cplusplus
51176extern "C"
51177#endif
51178char gethostbyname ();
51179int
51180main ()
51181{
51182return gethostbyname ();
51183  ;
51184  return 0;
51185}
51186_ACEOF
51187if ac_fn_cxx_try_link "$LINENO"; then :
51188  ac_cv_lib_nsl_gethostbyname=yes
51189else
51190  ac_cv_lib_nsl_gethostbyname=no
51191fi
51192rm -f core conftest.err conftest.$ac_objext \
51193    conftest$ac_exeext conftest.$ac_ext
51194LIBS=$ac_check_lib_save_LIBS
51195fi
51196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
51197$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
51198if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
51199  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
51200fi
51201
51202      if test $ac_cv_lib_nsl_gethostbyname = no; then
51203	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
51204$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
51205if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
51206  $as_echo_n "(cached) " >&6
51207else
51208  ac_check_lib_save_LIBS=$LIBS
51209LIBS="-lbsd  $LIBS"
51210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51211/* end confdefs.h.  */
51212
51213/* Override any GCC internal prototype to avoid an error.
51214   Use char because int might match the return type of a GCC
51215   builtin and then its argument prototype would still apply.  */
51216#ifdef __cplusplus
51217extern "C"
51218#endif
51219char gethostbyname ();
51220int
51221main ()
51222{
51223return gethostbyname ();
51224  ;
51225  return 0;
51226}
51227_ACEOF
51228if ac_fn_cxx_try_link "$LINENO"; then :
51229  ac_cv_lib_bsd_gethostbyname=yes
51230else
51231  ac_cv_lib_bsd_gethostbyname=no
51232fi
51233rm -f core conftest.err conftest.$ac_objext \
51234    conftest$ac_exeext conftest.$ac_ext
51235LIBS=$ac_check_lib_save_LIBS
51236fi
51237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
51238$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
51239if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
51240  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
51241fi
51242
51243      fi
51244    fi
51245
51246    # lieder@skyler.mavd.honeywell.com says without -lsocket,
51247    # socket/setsockopt and other routines are undefined under SCO ODT
51248    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
51249    # on later versions), says Simon Leinen: it contains gethostby*
51250    # variants that don't use the name server (or something).  -lsocket
51251    # must be given before -lnsl if both are needed.  We assume that
51252    # if connect needs -lnsl, so does gethostbyname.
51253    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
51254if test "x$ac_cv_func_connect" = xyes; then :
51255
51256fi
51257
51258    if test $ac_cv_func_connect = no; then
51259      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
51260$as_echo_n "checking for connect in -lsocket... " >&6; }
51261if ${ac_cv_lib_socket_connect+:} false; then :
51262  $as_echo_n "(cached) " >&6
51263else
51264  ac_check_lib_save_LIBS=$LIBS
51265LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
51266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51267/* end confdefs.h.  */
51268
51269/* Override any GCC internal prototype to avoid an error.
51270   Use char because int might match the return type of a GCC
51271   builtin and then its argument prototype would still apply.  */
51272#ifdef __cplusplus
51273extern "C"
51274#endif
51275char connect ();
51276int
51277main ()
51278{
51279return connect ();
51280  ;
51281  return 0;
51282}
51283_ACEOF
51284if ac_fn_cxx_try_link "$LINENO"; then :
51285  ac_cv_lib_socket_connect=yes
51286else
51287  ac_cv_lib_socket_connect=no
51288fi
51289rm -f core conftest.err conftest.$ac_objext \
51290    conftest$ac_exeext conftest.$ac_ext
51291LIBS=$ac_check_lib_save_LIBS
51292fi
51293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
51294$as_echo "$ac_cv_lib_socket_connect" >&6; }
51295if test "x$ac_cv_lib_socket_connect" = xyes; then :
51296  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
51297fi
51298
51299    fi
51300
51301    # Guillermo Gomez says -lposix is necessary on A/UX.
51302    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
51303if test "x$ac_cv_func_remove" = xyes; then :
51304
51305fi
51306
51307    if test $ac_cv_func_remove = no; then
51308      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
51309$as_echo_n "checking for remove in -lposix... " >&6; }
51310if ${ac_cv_lib_posix_remove+:} false; then :
51311  $as_echo_n "(cached) " >&6
51312else
51313  ac_check_lib_save_LIBS=$LIBS
51314LIBS="-lposix  $LIBS"
51315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51316/* end confdefs.h.  */
51317
51318/* Override any GCC internal prototype to avoid an error.
51319   Use char because int might match the return type of a GCC
51320   builtin and then its argument prototype would still apply.  */
51321#ifdef __cplusplus
51322extern "C"
51323#endif
51324char remove ();
51325int
51326main ()
51327{
51328return remove ();
51329  ;
51330  return 0;
51331}
51332_ACEOF
51333if ac_fn_cxx_try_link "$LINENO"; then :
51334  ac_cv_lib_posix_remove=yes
51335else
51336  ac_cv_lib_posix_remove=no
51337fi
51338rm -f core conftest.err conftest.$ac_objext \
51339    conftest$ac_exeext conftest.$ac_ext
51340LIBS=$ac_check_lib_save_LIBS
51341fi
51342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
51343$as_echo "$ac_cv_lib_posix_remove" >&6; }
51344if test "x$ac_cv_lib_posix_remove" = xyes; then :
51345  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
51346fi
51347
51348    fi
51349
51350    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
51351    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
51352if test "x$ac_cv_func_shmat" = xyes; then :
51353
51354fi
51355
51356    if test $ac_cv_func_shmat = no; then
51357      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
51358$as_echo_n "checking for shmat in -lipc... " >&6; }
51359if ${ac_cv_lib_ipc_shmat+:} false; then :
51360  $as_echo_n "(cached) " >&6
51361else
51362  ac_check_lib_save_LIBS=$LIBS
51363LIBS="-lipc  $LIBS"
51364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51365/* end confdefs.h.  */
51366
51367/* Override any GCC internal prototype to avoid an error.
51368   Use char because int might match the return type of a GCC
51369   builtin and then its argument prototype would still apply.  */
51370#ifdef __cplusplus
51371extern "C"
51372#endif
51373char shmat ();
51374int
51375main ()
51376{
51377return shmat ();
51378  ;
51379  return 0;
51380}
51381_ACEOF
51382if ac_fn_cxx_try_link "$LINENO"; then :
51383  ac_cv_lib_ipc_shmat=yes
51384else
51385  ac_cv_lib_ipc_shmat=no
51386fi
51387rm -f core conftest.err conftest.$ac_objext \
51388    conftest$ac_exeext conftest.$ac_ext
51389LIBS=$ac_check_lib_save_LIBS
51390fi
51391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
51392$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
51393if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
51394  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
51395fi
51396
51397    fi
51398  fi
51399
51400  # Check for libraries that X11R6 Xt/Xaw programs need.
51401  ac_save_LDFLAGS=$LDFLAGS
51402  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
51403  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
51404  # check for ICE first), but we must link in the order -lSM -lICE or
51405  # we get undefined symbols.  So assume we have SM if we have ICE.
51406  # These have to be linked with before -lX11, unlike the other
51407  # libraries we check for below, so use a different variable.
51408  # John Interrante, Karl Berry
51409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
51410$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
51411if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
51412  $as_echo_n "(cached) " >&6
51413else
51414  ac_check_lib_save_LIBS=$LIBS
51415LIBS="-lICE $X_EXTRA_LIBS $LIBS"
51416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51417/* end confdefs.h.  */
51418
51419/* Override any GCC internal prototype to avoid an error.
51420   Use char because int might match the return type of a GCC
51421   builtin and then its argument prototype would still apply.  */
51422#ifdef __cplusplus
51423extern "C"
51424#endif
51425char IceConnectionNumber ();
51426int
51427main ()
51428{
51429return IceConnectionNumber ();
51430  ;
51431  return 0;
51432}
51433_ACEOF
51434if ac_fn_cxx_try_link "$LINENO"; then :
51435  ac_cv_lib_ICE_IceConnectionNumber=yes
51436else
51437  ac_cv_lib_ICE_IceConnectionNumber=no
51438fi
51439rm -f core conftest.err conftest.$ac_objext \
51440    conftest$ac_exeext conftest.$ac_ext
51441LIBS=$ac_check_lib_save_LIBS
51442fi
51443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
51444$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
51445if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
51446  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
51447fi
51448
51449  LDFLAGS=$ac_save_LDFLAGS
51450
51451fi
51452
51453
51454    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
51455    # this doesn't make sense so we remove it.
51456    if test "x$COMPILE_TYPE" = xcross; then
51457      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
51458    fi
51459
51460    if test "x$no_x" = xyes; then
51461
51462  # Print a helpful message on how to acquire the necessary build dependency.
51463  # x11 is the help tag: freetype, cups, alsa etc
51464  MISSING_DEPENDENCY=x11
51465
51466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51467    cygwin_help $MISSING_DEPENDENCY
51468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51469    msys_help $MISSING_DEPENDENCY
51470  else
51471    PKGHANDLER_COMMAND=
51472
51473    case $PKGHANDLER in
51474      apt-get)
51475        apt_help     $MISSING_DEPENDENCY ;;
51476      yum)
51477        yum_help     $MISSING_DEPENDENCY ;;
51478      port)
51479        port_help    $MISSING_DEPENDENCY ;;
51480      pkgutil)
51481        pkgutil_help $MISSING_DEPENDENCY ;;
51482      pkgadd)
51483        pkgadd_help  $MISSING_DEPENDENCY ;;
51484    esac
51485
51486    if test "x$PKGHANDLER_COMMAND" != x; then
51487      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51488    fi
51489  fi
51490
51491      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
51492    fi
51493
51494    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51495      OPENWIN_HOME="/usr/openwin"
51496      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
51497      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51498          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
51499          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
51500          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
51501    fi
51502
51503    ac_ext=c
51504ac_cpp='$CPP $CPPFLAGS'
51505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51507ac_compiler_gnu=$ac_cv_c_compiler_gnu
51508
51509    OLD_CFLAGS="$CFLAGS"
51510    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
51511
51512    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
51513    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
51514do :
51515  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51516ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
51517          # include <X11/Xlib.h>
51518          # include <X11/Xutil.h>
51519
51520
51521"
51522if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51523  cat >>confdefs.h <<_ACEOF
51524#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51525_ACEOF
51526 X11_HEADERS_OK=yes
51527else
51528  X11_HEADERS_OK=no; break
51529fi
51530
51531done
51532
51533
51534    if test "x$X11_HEADERS_OK" = xno; then
51535
51536  # Print a helpful message on how to acquire the necessary build dependency.
51537  # x11 is the help tag: freetype, cups, alsa etc
51538  MISSING_DEPENDENCY=x11
51539
51540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51541    cygwin_help $MISSING_DEPENDENCY
51542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51543    msys_help $MISSING_DEPENDENCY
51544  else
51545    PKGHANDLER_COMMAND=
51546
51547    case $PKGHANDLER in
51548      apt-get)
51549        apt_help     $MISSING_DEPENDENCY ;;
51550      yum)
51551        yum_help     $MISSING_DEPENDENCY ;;
51552      port)
51553        port_help    $MISSING_DEPENDENCY ;;
51554      pkgutil)
51555        pkgutil_help $MISSING_DEPENDENCY ;;
51556      pkgadd)
51557        pkgadd_help  $MISSING_DEPENDENCY ;;
51558    esac
51559
51560    if test "x$PKGHANDLER_COMMAND" != x; then
51561      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51562    fi
51563  fi
51564
51565      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
51566    fi
51567
51568    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
51569    # defined in libawt_xawt.
51570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
51571$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
51572    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51573/* end confdefs.h.  */
51574#include <X11/extensions/Xrender.h>
51575int
51576main ()
51577{
51578XLinearGradient x;
51579  ;
51580  return 0;
51581}
51582_ACEOF
51583if ac_fn_c_try_compile "$LINENO"; then :
51584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51585$as_echo "yes" >&6; }
51586else
51587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51588$as_echo "no" >&6; }
51589         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
51590fi
51591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51592
51593    CFLAGS="$OLD_CFLAGS"
51594    ac_ext=cpp
51595ac_cpp='$CXXCPP $CPPFLAGS'
51596ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51597ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51598ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51599
51600  fi # NEEDS_LIB_X11
51601
51602
51603
51604
51605
51606
51607# Check whether --with-cups was given.
51608if test "${with_cups+set}" = set; then :
51609  withval=$with_cups;
51610fi
51611
51612
51613# Check whether --with-cups-include was given.
51614if test "${with_cups_include+set}" = set; then :
51615  withval=$with_cups_include;
51616fi
51617
51618
51619  if test "x$NEEDS_LIB_CUPS" = xfalse; then
51620    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
51621        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
51622      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
51623$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
51624    fi
51625    CUPS_CFLAGS=
51626  else
51627    CUPS_FOUND=no
51628
51629    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
51630      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
51631    fi
51632
51633    if test "x${with_cups}" != x; then
51634      CUPS_CFLAGS="-I${with_cups}/include"
51635      CUPS_FOUND=yes
51636    fi
51637    if test "x${with_cups_include}" != x; then
51638      CUPS_CFLAGS="-I${with_cups_include}"
51639      CUPS_FOUND=yes
51640    fi
51641    if test "x$CUPS_FOUND" = xno; then
51642      # Are the cups headers installed in the default /usr/include location?
51643      for ac_header in cups/cups.h cups/ppd.h
51644do :
51645  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51646ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
51647if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51648  cat >>confdefs.h <<_ACEOF
51649#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51650_ACEOF
51651
51652          CUPS_FOUND=yes
51653          CUPS_CFLAGS=
51654          DEFAULT_CUPS=yes
51655
51656fi
51657
51658done
51659
51660    fi
51661    if test "x$CUPS_FOUND" = xno; then
51662      # Getting nervous now? Lets poke around for standard Solaris third-party
51663      # package installation locations.
51664      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
51665$as_echo_n "checking for cups headers... " >&6; }
51666      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
51667        # An SFW package seems to be installed!
51668        CUPS_FOUND=yes
51669        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
51670      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
51671        # A CSW package seems to be installed!
51672        CUPS_FOUND=yes
51673        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
51674      fi
51675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
51676$as_echo "$CUPS_FOUND" >&6; }
51677    fi
51678    if test "x$CUPS_FOUND" = xno; then
51679
51680  # Print a helpful message on how to acquire the necessary build dependency.
51681  # cups is the help tag: freetype, cups, alsa etc
51682  MISSING_DEPENDENCY=cups
51683
51684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51685    cygwin_help $MISSING_DEPENDENCY
51686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51687    msys_help $MISSING_DEPENDENCY
51688  else
51689    PKGHANDLER_COMMAND=
51690
51691    case $PKGHANDLER in
51692      apt-get)
51693        apt_help     $MISSING_DEPENDENCY ;;
51694      yum)
51695        yum_help     $MISSING_DEPENDENCY ;;
51696      port)
51697        port_help    $MISSING_DEPENDENCY ;;
51698      pkgutil)
51699        pkgutil_help $MISSING_DEPENDENCY ;;
51700      pkgadd)
51701        pkgadd_help  $MISSING_DEPENDENCY ;;
51702    esac
51703
51704    if test "x$PKGHANDLER_COMMAND" != x; then
51705      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51706    fi
51707  fi
51708
51709      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
51710    fi
51711  fi
51712
51713
51714
51715
51716
51717# Check whether --with-freetype was given.
51718if test "${with_freetype+set}" = set; then :
51719  withval=$with_freetype;
51720fi
51721
51722
51723# Check whether --with-freetype-include was given.
51724if test "${with_freetype_include+set}" = set; then :
51725  withval=$with_freetype_include;
51726fi
51727
51728
51729# Check whether --with-freetype-lib was given.
51730if test "${with_freetype_lib+set}" = set; then :
51731  withval=$with_freetype_lib;
51732fi
51733
51734
51735# Check whether --with-freetype-src was given.
51736if test "${with_freetype_src+set}" = set; then :
51737  withval=$with_freetype_src;
51738fi
51739
51740  # Check whether --enable-freetype-bundling was given.
51741if test "${enable_freetype_bundling+set}" = set; then :
51742  enableval=$enable_freetype_bundling;
51743fi
51744
51745
51746  # Need to specify explicitly since it needs to be overridden on some versions of macosx
51747  FREETYPE_BASE_NAME=freetype
51748  FREETYPE_CFLAGS=
51749  FREETYPE_LIBS=
51750  FREETYPE_BUNDLE_LIB_PATH=
51751
51752  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
51753    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
51754        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
51755        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
51756        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
51757      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
51758$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
51759    fi
51760    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
51761      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
51762$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
51763    fi
51764  else
51765    # freetype is needed to build; go get it!
51766
51767    BUNDLE_FREETYPE="$enable_freetype_bundling"
51768
51769    if  test "x$with_freetype_src" != x; then
51770      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51771        # Try to build freetype if --with-freetype-src was given on Windows
51772
51773  FREETYPE_SRC_PATH="$with_freetype_src"
51774  BUILD_FREETYPE=yes
51775
51776  # Check if the freetype sources are acessible..
51777  if ! test -d $FREETYPE_SRC_PATH; then
51778    { $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
51779$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
51780    BUILD_FREETYPE=no
51781  fi
51782  # ..and contain a vc2010 project file
51783  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
51784  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
51785    { $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
51786$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
51787    BUILD_FREETYPE=no
51788  fi
51789  # Now check if configure found a version of 'msbuild.exe'
51790  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
51791    { $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
51792$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;}
51793    BUILD_FREETYPE=no
51794  fi
51795
51796  # Ready to go..
51797  if test "x$BUILD_FREETYPE" = xyes; then
51798    # msbuild requires trailing slashes for output directories
51799    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
51800    freetype_lib_path_unix="$freetype_lib_path"
51801    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
51802
51803  unix_path="$vcxproj_path"
51804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51805    windows_path=`$CYGPATH -m "$unix_path"`
51806    vcxproj_path="$windows_path"
51807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51808    windows_path=`cmd //c echo $unix_path`
51809    vcxproj_path="$windows_path"
51810  fi
51811
51812
51813  unix_path="$freetype_lib_path"
51814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51815    windows_path=`$CYGPATH -m "$unix_path"`
51816    freetype_lib_path="$windows_path"
51817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51818    windows_path=`cmd //c echo $unix_path`
51819    freetype_lib_path="$windows_path"
51820  fi
51821
51822
51823  unix_path="$freetype_obj_path"
51824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51825    windows_path=`$CYGPATH -m "$unix_path"`
51826    freetype_obj_path="$windows_path"
51827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51828    windows_path=`cmd //c echo $unix_path`
51829    freetype_obj_path="$windows_path"
51830  fi
51831
51832    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51833      freetype_platform=x64
51834    else
51835      freetype_platform=win32
51836    fi
51837
51838    # The original freetype project file is for VS 2010 (i.e. 'v100'),
51839    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
51840    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
51841    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
51842    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
51843$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
51844
51845    # First we try to build the freetype.dll
51846    $ECHO -e "@echo off\n"\
51847        "$MSBUILD $vcxproj_path "\
51848        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51849        "/p:Configuration=\"Release Multithreaded\" "\
51850        "/p:Platform=$freetype_platform "\
51851        "/p:ConfigurationType=DynamicLibrary "\
51852        "/p:TargetName=freetype "\
51853        "/p:OutDir=\"$freetype_lib_path\" "\
51854        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
51855    cmd /c freetype.bat
51856
51857    if test -s "$freetype_lib_path_unix/freetype.dll"; then
51858      # If that succeeds we also build freetype.lib
51859      $ECHO -e "@echo off\n"\
51860          "$MSBUILD $vcxproj_path "\
51861          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
51862          "/p:Configuration=\"Release Multithreaded\" "\
51863          "/p:Platform=$freetype_platform "\
51864          "/p:ConfigurationType=StaticLibrary "\
51865          "/p:TargetName=freetype "\
51866          "/p:OutDir=\"$freetype_lib_path\" "\
51867          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
51868      cmd /c freetype.bat
51869
51870      if test -s "$freetype_lib_path_unix/freetype.lib"; then
51871        # Once we build both, lib and dll, set freetype lib and include path appropriately
51872        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
51873        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
51874        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
51875$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
51876      else
51877        BUILD_FREETYPE=no
51878      fi
51879    else
51880      BUILD_FREETYPE=no
51881    fi
51882  fi
51883
51884        if test "x$BUILD_FREETYPE" = xyes; then
51885          # Okay, we built it. Check that it works.
51886
51887  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51888  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
51889  METHOD="--with-freetype-src"
51890
51891  # Let's start with an optimistic view of the world :-)
51892  FOUND_FREETYPE=yes
51893
51894  # First look for the canonical freetype main include file ft2build.h.
51895  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51896    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
51897    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
51898    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
51899      # Fail.
51900      FOUND_FREETYPE=no
51901    fi
51902  fi
51903
51904  if test "x$FOUND_FREETYPE" = xyes; then
51905    # Include file found, let's continue the sanity check.
51906    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
51907$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
51908
51909    # Reset to default value
51910    FREETYPE_BASE_NAME=freetype
51911    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51912    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
51913      if test "x$OPENJDK_TARGET_OS" = xmacosx \
51914          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
51915        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
51916        # for the .6 version explicitly.
51917        FREETYPE_BASE_NAME=freetype.6
51918        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
51919        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
51920$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
51921      else
51922        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
51923$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
51924        FOUND_FREETYPE=no
51925      fi
51926    else
51927      if test "x$OPENJDK_TARGET_OS" = xwindows; then
51928        # On Windows, we will need both .lib and .dll file.
51929        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
51930          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
51931$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
51932          FOUND_FREETYPE=no
51933        fi
51934      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
51935          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
51936        # Found lib in isa dir, use that instead.
51937        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
51938        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
51939$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
51940      fi
51941    fi
51942  fi
51943
51944  if test "x$FOUND_FREETYPE" = xyes; then
51945
51946  # Only process if variable expands to non-empty
51947
51948  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
51949    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51950
51951  # Input might be given as Windows format, start by converting to
51952  # unix format.
51953  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
51954  new_path=`$CYGPATH -u "$path"`
51955
51956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51959  # "foo.exe" is OK but "foo" is an error.
51960  #
51961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51962  # It is also a way to make sure we got the proper file name for the real test later on.
51963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51964  if test "x$test_shortpath" = x; then
51965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
51966$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
51967    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
51968  fi
51969
51970  # Call helper function which possibly converts this using DOS-style short mode.
51971  # If so, the updated path is stored in $new_path.
51972
51973  input_path="$new_path"
51974  # Check if we need to convert this using DOS-style short mode. If the path
51975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51976  # take no chances and rewrite it.
51977  # Note: m4 eats our [], so we need to use [ and ] instead.
51978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51979  if test "x$has_forbidden_chars" != x; then
51980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51984      # Going to short mode and back again did indeed matter. Since short mode is
51985      # case insensitive, let's make it lowercase to improve readability.
51986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51987      # Now convert it back to Unix-style (cygpath)
51988      input_path=`$CYGPATH -u "$shortmode_path"`
51989      new_path="$input_path"
51990    fi
51991  fi
51992
51993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51994  if test "x$test_cygdrive_prefix" = x; then
51995    # As a simple fix, exclude /usr/bin since it's not a real path.
51996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51998      # a path prefixed by /cygdrive for fixpath to work.
51999      new_path="$CYGWIN_ROOT_PATH$input_path"
52000    fi
52001  fi
52002
52003
52004  if test "x$path" != "x$new_path"; then
52005    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52007$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52008  fi
52009
52010    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52011
52012  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52013  has_colon=`$ECHO $path | $GREP ^.:`
52014  new_path="$path"
52015  if test "x$has_colon" = x; then
52016    # Not in mixed or Windows style, start by that.
52017    new_path=`cmd //c echo $path`
52018  fi
52019
52020
52021  input_path="$new_path"
52022  # Check if we need to convert this using DOS-style short mode. If the path
52023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52024  # take no chances and rewrite it.
52025  # Note: m4 eats our [], so we need to use [ and ] instead.
52026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52027  if test "x$has_forbidden_chars" != x; then
52028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52030  fi
52031
52032
52033  windows_path="$new_path"
52034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52035    unix_path=`$CYGPATH -u "$windows_path"`
52036    new_path="$unix_path"
52037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52039    new_path="$unix_path"
52040  fi
52041
52042  if test "x$path" != "x$new_path"; then
52043    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52045$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52046  fi
52047
52048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52050
52051    else
52052      # We're on a unix platform. Hooray! :)
52053      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52054      has_space=`$ECHO "$path" | $GREP " "`
52055      if test "x$has_space" != x; then
52056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52057$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52058        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52059      fi
52060
52061      # Use eval to expand a potential ~
52062      eval path="$path"
52063      if test ! -f "$path" && test ! -d "$path"; then
52064        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52065      fi
52066
52067      if test -d "$path"; then
52068        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52069      else
52070        dir="`$DIRNAME "$path"`"
52071        base="`$BASENAME "$path"`"
52072        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52073      fi
52074    fi
52075  fi
52076
52077
52078  # Only process if variable expands to non-empty
52079
52080  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52081    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52082
52083  # Input might be given as Windows format, start by converting to
52084  # unix format.
52085  path="$POTENTIAL_FREETYPE_LIB_PATH"
52086  new_path=`$CYGPATH -u "$path"`
52087
52088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52091  # "foo.exe" is OK but "foo" is an error.
52092  #
52093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52094  # It is also a way to make sure we got the proper file name for the real test later on.
52095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52096  if test "x$test_shortpath" = x; then
52097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52098$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52099    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52100  fi
52101
52102  # Call helper function which possibly converts this using DOS-style short mode.
52103  # If so, the updated path is stored in $new_path.
52104
52105  input_path="$new_path"
52106  # Check if we need to convert this using DOS-style short mode. If the path
52107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52108  # take no chances and rewrite it.
52109  # Note: m4 eats our [], so we need to use [ and ] instead.
52110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52111  if test "x$has_forbidden_chars" != x; then
52112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52116      # Going to short mode and back again did indeed matter. Since short mode is
52117      # case insensitive, let's make it lowercase to improve readability.
52118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52119      # Now convert it back to Unix-style (cygpath)
52120      input_path=`$CYGPATH -u "$shortmode_path"`
52121      new_path="$input_path"
52122    fi
52123  fi
52124
52125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52126  if test "x$test_cygdrive_prefix" = x; then
52127    # As a simple fix, exclude /usr/bin since it's not a real path.
52128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52130      # a path prefixed by /cygdrive for fixpath to work.
52131      new_path="$CYGWIN_ROOT_PATH$input_path"
52132    fi
52133  fi
52134
52135
52136  if test "x$path" != "x$new_path"; then
52137    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52139$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52140  fi
52141
52142    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52143
52144  path="$POTENTIAL_FREETYPE_LIB_PATH"
52145  has_colon=`$ECHO $path | $GREP ^.:`
52146  new_path="$path"
52147  if test "x$has_colon" = x; then
52148    # Not in mixed or Windows style, start by that.
52149    new_path=`cmd //c echo $path`
52150  fi
52151
52152
52153  input_path="$new_path"
52154  # Check if we need to convert this using DOS-style short mode. If the path
52155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52156  # take no chances and rewrite it.
52157  # Note: m4 eats our [], so we need to use [ and ] instead.
52158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52159  if test "x$has_forbidden_chars" != x; then
52160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52162  fi
52163
52164
52165  windows_path="$new_path"
52166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52167    unix_path=`$CYGPATH -u "$windows_path"`
52168    new_path="$unix_path"
52169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52171    new_path="$unix_path"
52172  fi
52173
52174  if test "x$path" != "x$new_path"; then
52175    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52177$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52178  fi
52179
52180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52182
52183    else
52184      # We're on a unix platform. Hooray! :)
52185      path="$POTENTIAL_FREETYPE_LIB_PATH"
52186      has_space=`$ECHO "$path" | $GREP " "`
52187      if test "x$has_space" != x; then
52188        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52189$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52190        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52191      fi
52192
52193      # Use eval to expand a potential ~
52194      eval path="$path"
52195      if test ! -f "$path" && test ! -d "$path"; then
52196        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52197      fi
52198
52199      if test -d "$path"; then
52200        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52201      else
52202        dir="`$DIRNAME "$path"`"
52203        base="`$BASENAME "$path"`"
52204        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52205      fi
52206    fi
52207  fi
52208
52209
52210    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52211    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52212$as_echo_n "checking for freetype includes... " >&6; }
52213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52214$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52215    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52217$as_echo_n "checking for freetype libraries... " >&6; }
52218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52219$as_echo "$FREETYPE_LIB_PATH" >&6; }
52220  fi
52221
52222          if test "x$FOUND_FREETYPE" != xyes; then
52223            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
52224          fi
52225        else
52226          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
52227$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
52228          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
52229        fi
52230      else
52231        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
52232$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
52233      fi
52234    fi
52235
52236    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
52237      # User has specified settings
52238
52239      if test "x$BUNDLE_FREETYPE" = x; then
52240        # If not specified, default is to bundle freetype
52241        BUNDLE_FREETYPE=yes
52242      fi
52243
52244      if test "x$with_freetype" != x; then
52245        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
52246        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
52247      fi
52248
52249      # Allow --with-freetype-lib and --with-freetype-include to override
52250      if test "x$with_freetype_include" != x; then
52251        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
52252      fi
52253      if test "x$with_freetype_lib" != x; then
52254        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
52255      fi
52256
52257      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52258        # Okay, we got it. Check that it works.
52259
52260  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52261  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52262  METHOD="--with-freetype"
52263
52264  # Let's start with an optimistic view of the world :-)
52265  FOUND_FREETYPE=yes
52266
52267  # First look for the canonical freetype main include file ft2build.h.
52268  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52269    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52270    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52271    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52272      # Fail.
52273      FOUND_FREETYPE=no
52274    fi
52275  fi
52276
52277  if test "x$FOUND_FREETYPE" = xyes; then
52278    # Include file found, let's continue the sanity check.
52279    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52280$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52281
52282    # Reset to default value
52283    FREETYPE_BASE_NAME=freetype
52284    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52285    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52286      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52287          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52288        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52289        # for the .6 version explicitly.
52290        FREETYPE_BASE_NAME=freetype.6
52291        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52292        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52293$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52294      else
52295        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52296$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52297        FOUND_FREETYPE=no
52298      fi
52299    else
52300      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52301        # On Windows, we will need both .lib and .dll file.
52302        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52303          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52304$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52305          FOUND_FREETYPE=no
52306        fi
52307      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52308          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52309        # Found lib in isa dir, use that instead.
52310        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52311        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52312$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52313      fi
52314    fi
52315  fi
52316
52317  if test "x$FOUND_FREETYPE" = xyes; then
52318
52319  # Only process if variable expands to non-empty
52320
52321  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52323
52324  # Input might be given as Windows format, start by converting to
52325  # unix format.
52326  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52327  new_path=`$CYGPATH -u "$path"`
52328
52329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52332  # "foo.exe" is OK but "foo" is an error.
52333  #
52334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52335  # It is also a way to make sure we got the proper file name for the real test later on.
52336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52337  if test "x$test_shortpath" = x; then
52338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52339$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52340    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52341  fi
52342
52343  # Call helper function which possibly converts this using DOS-style short mode.
52344  # If so, the updated path is stored in $new_path.
52345
52346  input_path="$new_path"
52347  # Check if we need to convert this using DOS-style short mode. If the path
52348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52349  # take no chances and rewrite it.
52350  # Note: m4 eats our [], so we need to use [ and ] instead.
52351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52352  if test "x$has_forbidden_chars" != x; then
52353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52357      # Going to short mode and back again did indeed matter. Since short mode is
52358      # case insensitive, let's make it lowercase to improve readability.
52359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52360      # Now convert it back to Unix-style (cygpath)
52361      input_path=`$CYGPATH -u "$shortmode_path"`
52362      new_path="$input_path"
52363    fi
52364  fi
52365
52366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52367  if test "x$test_cygdrive_prefix" = x; then
52368    # As a simple fix, exclude /usr/bin since it's not a real path.
52369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52371      # a path prefixed by /cygdrive for fixpath to work.
52372      new_path="$CYGWIN_ROOT_PATH$input_path"
52373    fi
52374  fi
52375
52376
52377  if test "x$path" != "x$new_path"; then
52378    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52380$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52381  fi
52382
52383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52384
52385  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52386  has_colon=`$ECHO $path | $GREP ^.:`
52387  new_path="$path"
52388  if test "x$has_colon" = x; then
52389    # Not in mixed or Windows style, start by that.
52390    new_path=`cmd //c echo $path`
52391  fi
52392
52393
52394  input_path="$new_path"
52395  # Check if we need to convert this using DOS-style short mode. If the path
52396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52397  # take no chances and rewrite it.
52398  # Note: m4 eats our [], so we need to use [ and ] instead.
52399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52400  if test "x$has_forbidden_chars" != x; then
52401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52403  fi
52404
52405
52406  windows_path="$new_path"
52407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52408    unix_path=`$CYGPATH -u "$windows_path"`
52409    new_path="$unix_path"
52410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52412    new_path="$unix_path"
52413  fi
52414
52415  if test "x$path" != "x$new_path"; then
52416    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52418$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52419  fi
52420
52421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52423
52424    else
52425      # We're on a unix platform. Hooray! :)
52426      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52427      has_space=`$ECHO "$path" | $GREP " "`
52428      if test "x$has_space" != x; then
52429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52430$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52432      fi
52433
52434      # Use eval to expand a potential ~
52435      eval path="$path"
52436      if test ! -f "$path" && test ! -d "$path"; then
52437        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52438      fi
52439
52440      if test -d "$path"; then
52441        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52442      else
52443        dir="`$DIRNAME "$path"`"
52444        base="`$BASENAME "$path"`"
52445        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52446      fi
52447    fi
52448  fi
52449
52450
52451  # Only process if variable expands to non-empty
52452
52453  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52455
52456  # Input might be given as Windows format, start by converting to
52457  # unix format.
52458  path="$POTENTIAL_FREETYPE_LIB_PATH"
52459  new_path=`$CYGPATH -u "$path"`
52460
52461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52464  # "foo.exe" is OK but "foo" is an error.
52465  #
52466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52467  # It is also a way to make sure we got the proper file name for the real test later on.
52468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52469  if test "x$test_shortpath" = x; then
52470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52471$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52472    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52473  fi
52474
52475  # Call helper function which possibly converts this using DOS-style short mode.
52476  # If so, the updated path is stored in $new_path.
52477
52478  input_path="$new_path"
52479  # Check if we need to convert this using DOS-style short mode. If the path
52480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52481  # take no chances and rewrite it.
52482  # Note: m4 eats our [], so we need to use [ and ] instead.
52483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52484  if test "x$has_forbidden_chars" != x; then
52485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52489      # Going to short mode and back again did indeed matter. Since short mode is
52490      # case insensitive, let's make it lowercase to improve readability.
52491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52492      # Now convert it back to Unix-style (cygpath)
52493      input_path=`$CYGPATH -u "$shortmode_path"`
52494      new_path="$input_path"
52495    fi
52496  fi
52497
52498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52499  if test "x$test_cygdrive_prefix" = x; then
52500    # As a simple fix, exclude /usr/bin since it's not a real path.
52501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52503      # a path prefixed by /cygdrive for fixpath to work.
52504      new_path="$CYGWIN_ROOT_PATH$input_path"
52505    fi
52506  fi
52507
52508
52509  if test "x$path" != "x$new_path"; then
52510    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52513  fi
52514
52515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52516
52517  path="$POTENTIAL_FREETYPE_LIB_PATH"
52518  has_colon=`$ECHO $path | $GREP ^.:`
52519  new_path="$path"
52520  if test "x$has_colon" = x; then
52521    # Not in mixed or Windows style, start by that.
52522    new_path=`cmd //c echo $path`
52523  fi
52524
52525
52526  input_path="$new_path"
52527  # Check if we need to convert this using DOS-style short mode. If the path
52528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52529  # take no chances and rewrite it.
52530  # Note: m4 eats our [], so we need to use [ and ] instead.
52531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52532  if test "x$has_forbidden_chars" != x; then
52533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52535  fi
52536
52537
52538  windows_path="$new_path"
52539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52540    unix_path=`$CYGPATH -u "$windows_path"`
52541    new_path="$unix_path"
52542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52544    new_path="$unix_path"
52545  fi
52546
52547  if test "x$path" != "x$new_path"; then
52548    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52550$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52551  fi
52552
52553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52555
52556    else
52557      # We're on a unix platform. Hooray! :)
52558      path="$POTENTIAL_FREETYPE_LIB_PATH"
52559      has_space=`$ECHO "$path" | $GREP " "`
52560      if test "x$has_space" != x; then
52561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52564      fi
52565
52566      # Use eval to expand a potential ~
52567      eval path="$path"
52568      if test ! -f "$path" && test ! -d "$path"; then
52569        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52570      fi
52571
52572      if test -d "$path"; then
52573        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
52574      else
52575        dir="`$DIRNAME "$path"`"
52576        base="`$BASENAME "$path"`"
52577        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52578      fi
52579    fi
52580  fi
52581
52582
52583    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52584    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
52585$as_echo_n "checking for freetype includes... " >&6; }
52586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
52587$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
52588    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
52589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
52590$as_echo_n "checking for freetype libraries... " >&6; }
52591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
52592$as_echo "$FREETYPE_LIB_PATH" >&6; }
52593  fi
52594
52595        if test "x$FOUND_FREETYPE" != xyes; then
52596          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
52597        fi
52598      else
52599        # User specified only one of lib or include. This is an error.
52600        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
52601          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
52602$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
52603          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52604        else
52605          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
52606$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
52607          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
52608        fi
52609      fi
52610    else
52611      # User did not specify settings, but we need freetype. Try to locate it.
52612
52613      if test "x$BUNDLE_FREETYPE" = x; then
52614        # If not specified, default is to bundle freetype only on windows
52615        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52616          BUNDLE_FREETYPE=yes
52617        else
52618          BUNDLE_FREETYPE=no
52619        fi
52620      fi
52621
52622      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
52623      if test "x$SYSROOT" = x; then
52624        if test "x$FOUND_FREETYPE" != xyes; then
52625          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
52626          if test "x$PKG_CONFIG" != x; then
52627
52628pkg_failed=no
52629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
52630$as_echo_n "checking for FREETYPE... " >&6; }
52631
52632if test -n "$FREETYPE_CFLAGS"; then
52633    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
52634 elif test -n "$PKG_CONFIG"; then
52635    if test -n "$PKG_CONFIG" && \
52636    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52637  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52638  ac_status=$?
52639  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52640  test $ac_status = 0; }; then
52641  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
52642else
52643  pkg_failed=yes
52644fi
52645 else
52646    pkg_failed=untried
52647fi
52648if test -n "$FREETYPE_LIBS"; then
52649    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
52650 elif test -n "$PKG_CONFIG"; then
52651    if test -n "$PKG_CONFIG" && \
52652    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
52653  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
52654  ac_status=$?
52655  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
52656  test $ac_status = 0; }; then
52657  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
52658else
52659  pkg_failed=yes
52660fi
52661 else
52662    pkg_failed=untried
52663fi
52664
52665
52666
52667if test $pkg_failed = yes; then
52668
52669if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
52670        _pkg_short_errors_supported=yes
52671else
52672        _pkg_short_errors_supported=no
52673fi
52674        if test $_pkg_short_errors_supported = yes; then
52675	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
52676        else
52677	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
52678        fi
52679	# Put the nasty error message in config.log where it belongs
52680	echo "$FREETYPE_PKG_ERRORS" >&5
52681
52682	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52683$as_echo "no" >&6; }
52684                FOUND_FREETYPE=no
52685elif test $pkg_failed = untried; then
52686	FOUND_FREETYPE=no
52687else
52688	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
52689	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
52690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52691$as_echo "yes" >&6; }
52692	FOUND_FREETYPE=yes
52693fi
52694            if test "x$FOUND_FREETYPE" = xyes; then
52695              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
52696              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
52697              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
52698              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52699                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
52700              fi
52701              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
52702              if test "x$BUNDLE_FREETYPE" = xyes; then
52703                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
52704$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
52705                FOUND_FREETYPE=no
52706              else
52707                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
52708$as_echo_n "checking for freetype... " >&6; }
52709                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
52710$as_echo "yes (using pkg-config)" >&6; }
52711              fi
52712            fi
52713          fi
52714        fi
52715      fi
52716
52717      if test "x$FOUND_FREETYPE" != xyes; then
52718        # Check in well-known locations
52719        if test "x$OPENJDK_TARGET_OS" = xwindows; then
52720          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
52721
52722  windows_path="$FREETYPE_BASE_DIR"
52723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52724    unix_path=`$CYGPATH -u "$windows_path"`
52725    FREETYPE_BASE_DIR="$unix_path"
52726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52728    FREETYPE_BASE_DIR="$unix_path"
52729  fi
52730
52731
52732  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
52733  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
52734  METHOD="well-known location"
52735
52736  # Let's start with an optimistic view of the world :-)
52737  FOUND_FREETYPE=yes
52738
52739  # First look for the canonical freetype main include file ft2build.h.
52740  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52741    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
52742    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
52743    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
52744      # Fail.
52745      FOUND_FREETYPE=no
52746    fi
52747  fi
52748
52749  if test "x$FOUND_FREETYPE" = xyes; then
52750    # Include file found, let's continue the sanity check.
52751    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
52752$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
52753
52754    # Reset to default value
52755    FREETYPE_BASE_NAME=freetype
52756    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52757    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
52758      if test "x$OPENJDK_TARGET_OS" = xmacosx \
52759          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
52760        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
52761        # for the .6 version explicitly.
52762        FREETYPE_BASE_NAME=freetype.6
52763        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
52764        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
52765$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
52766      else
52767        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
52768$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
52769        FOUND_FREETYPE=no
52770      fi
52771    else
52772      if test "x$OPENJDK_TARGET_OS" = xwindows; then
52773        # On Windows, we will need both .lib and .dll file.
52774        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
52775          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
52776$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
52777          FOUND_FREETYPE=no
52778        fi
52779      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
52780          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
52781        # Found lib in isa dir, use that instead.
52782        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
52783        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
52784$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
52785      fi
52786    fi
52787  fi
52788
52789  if test "x$FOUND_FREETYPE" = xyes; then
52790
52791  # Only process if variable expands to non-empty
52792
52793  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
52794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52795
52796  # Input might be given as Windows format, start by converting to
52797  # unix format.
52798  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52799  new_path=`$CYGPATH -u "$path"`
52800
52801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52804  # "foo.exe" is OK but "foo" is an error.
52805  #
52806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52807  # It is also a way to make sure we got the proper file name for the real test later on.
52808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52809  if test "x$test_shortpath" = x; then
52810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52811$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52812    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
52813  fi
52814
52815  # Call helper function which possibly converts this using DOS-style short mode.
52816  # If so, the updated path is stored in $new_path.
52817
52818  input_path="$new_path"
52819  # Check if we need to convert this using DOS-style short mode. If the path
52820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52821  # take no chances and rewrite it.
52822  # Note: m4 eats our [], so we need to use [ and ] instead.
52823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52824  if test "x$has_forbidden_chars" != x; then
52825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52829      # Going to short mode and back again did indeed matter. Since short mode is
52830      # case insensitive, let's make it lowercase to improve readability.
52831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52832      # Now convert it back to Unix-style (cygpath)
52833      input_path=`$CYGPATH -u "$shortmode_path"`
52834      new_path="$input_path"
52835    fi
52836  fi
52837
52838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52839  if test "x$test_cygdrive_prefix" = x; then
52840    # As a simple fix, exclude /usr/bin since it's not a real path.
52841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52843      # a path prefixed by /cygdrive for fixpath to work.
52844      new_path="$CYGWIN_ROOT_PATH$input_path"
52845    fi
52846  fi
52847
52848
52849  if test "x$path" != "x$new_path"; then
52850    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52852$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52853  fi
52854
52855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52856
52857  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52858  has_colon=`$ECHO $path | $GREP ^.:`
52859  new_path="$path"
52860  if test "x$has_colon" = x; then
52861    # Not in mixed or Windows style, start by that.
52862    new_path=`cmd //c echo $path`
52863  fi
52864
52865
52866  input_path="$new_path"
52867  # Check if we need to convert this using DOS-style short mode. If the path
52868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52869  # take no chances and rewrite it.
52870  # Note: m4 eats our [], so we need to use [ and ] instead.
52871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52872  if test "x$has_forbidden_chars" != x; then
52873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52875  fi
52876
52877
52878  windows_path="$new_path"
52879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52880    unix_path=`$CYGPATH -u "$windows_path"`
52881    new_path="$unix_path"
52882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52884    new_path="$unix_path"
52885  fi
52886
52887  if test "x$path" != "x$new_path"; then
52888    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
52889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
52890$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
52891  fi
52892
52893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52895
52896    else
52897      # We're on a unix platform. Hooray! :)
52898      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
52899      has_space=`$ECHO "$path" | $GREP " "`
52900      if test "x$has_space" != x; then
52901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
52902$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
52903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52904      fi
52905
52906      # Use eval to expand a potential ~
52907      eval path="$path"
52908      if test ! -f "$path" && test ! -d "$path"; then
52909        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
52910      fi
52911
52912      if test -d "$path"; then
52913        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
52914      else
52915        dir="`$DIRNAME "$path"`"
52916        base="`$BASENAME "$path"`"
52917        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
52918      fi
52919    fi
52920  fi
52921
52922
52923  # Only process if variable expands to non-empty
52924
52925  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
52926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52927
52928  # Input might be given as Windows format, start by converting to
52929  # unix format.
52930  path="$POTENTIAL_FREETYPE_LIB_PATH"
52931  new_path=`$CYGPATH -u "$path"`
52932
52933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52936  # "foo.exe" is OK but "foo" is an error.
52937  #
52938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52939  # It is also a way to make sure we got the proper file name for the real test later on.
52940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52941  if test "x$test_shortpath" = x; then
52942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
52943$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
52944    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
52945  fi
52946
52947  # Call helper function which possibly converts this using DOS-style short mode.
52948  # If so, the updated path is stored in $new_path.
52949
52950  input_path="$new_path"
52951  # Check if we need to convert this using DOS-style short mode. If the path
52952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52953  # take no chances and rewrite it.
52954  # Note: m4 eats our [], so we need to use [ and ] instead.
52955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52956  if test "x$has_forbidden_chars" != x; then
52957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52961      # Going to short mode and back again did indeed matter. Since short mode is
52962      # case insensitive, let's make it lowercase to improve readability.
52963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52964      # Now convert it back to Unix-style (cygpath)
52965      input_path=`$CYGPATH -u "$shortmode_path"`
52966      new_path="$input_path"
52967    fi
52968  fi
52969
52970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52971  if test "x$test_cygdrive_prefix" = x; then
52972    # As a simple fix, exclude /usr/bin since it's not a real path.
52973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52975      # a path prefixed by /cygdrive for fixpath to work.
52976      new_path="$CYGWIN_ROOT_PATH$input_path"
52977    fi
52978  fi
52979
52980
52981  if test "x$path" != "x$new_path"; then
52982    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
52983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
52984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
52985  fi
52986
52987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52988
52989  path="$POTENTIAL_FREETYPE_LIB_PATH"
52990  has_colon=`$ECHO $path | $GREP ^.:`
52991  new_path="$path"
52992  if test "x$has_colon" = x; then
52993    # Not in mixed or Windows style, start by that.
52994    new_path=`cmd //c echo $path`
52995  fi
52996
52997
52998  input_path="$new_path"
52999  # Check if we need to convert this using DOS-style short mode. If the path
53000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53001  # take no chances and rewrite it.
53002  # Note: m4 eats our [], so we need to use [ and ] instead.
53003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53004  if test "x$has_forbidden_chars" != x; then
53005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53007  fi
53008
53009
53010  windows_path="$new_path"
53011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53012    unix_path=`$CYGPATH -u "$windows_path"`
53013    new_path="$unix_path"
53014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53016    new_path="$unix_path"
53017  fi
53018
53019  if test "x$path" != "x$new_path"; then
53020    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53022$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53023  fi
53024
53025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53027
53028    else
53029      # We're on a unix platform. Hooray! :)
53030      path="$POTENTIAL_FREETYPE_LIB_PATH"
53031      has_space=`$ECHO "$path" | $GREP " "`
53032      if test "x$has_space" != x; then
53033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53034$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53036      fi
53037
53038      # Use eval to expand a potential ~
53039      eval path="$path"
53040      if test ! -f "$path" && test ! -d "$path"; then
53041        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53042      fi
53043
53044      if test -d "$path"; then
53045        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53046      else
53047        dir="`$DIRNAME "$path"`"
53048        base="`$BASENAME "$path"`"
53049        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53050      fi
53051    fi
53052  fi
53053
53054
53055    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53057$as_echo_n "checking for freetype includes... " >&6; }
53058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53059$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53060    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53062$as_echo_n "checking for freetype libraries... " >&6; }
53063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53064$as_echo "$FREETYPE_LIB_PATH" >&6; }
53065  fi
53066
53067          if test "x$FOUND_FREETYPE" != xyes; then
53068            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
53069
53070  windows_path="$FREETYPE_BASE_DIR"
53071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53072    unix_path=`$CYGPATH -u "$windows_path"`
53073    FREETYPE_BASE_DIR="$unix_path"
53074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53076    FREETYPE_BASE_DIR="$unix_path"
53077  fi
53078
53079
53080  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53081  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53082  METHOD="well-known location"
53083
53084  # Let's start with an optimistic view of the world :-)
53085  FOUND_FREETYPE=yes
53086
53087  # First look for the canonical freetype main include file ft2build.h.
53088  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53089    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53090    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53091    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53092      # Fail.
53093      FOUND_FREETYPE=no
53094    fi
53095  fi
53096
53097  if test "x$FOUND_FREETYPE" = xyes; then
53098    # Include file found, let's continue the sanity check.
53099    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53100$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53101
53102    # Reset to default value
53103    FREETYPE_BASE_NAME=freetype
53104    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53105    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53106      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53107          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53108        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53109        # for the .6 version explicitly.
53110        FREETYPE_BASE_NAME=freetype.6
53111        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53112        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53113$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53114      else
53115        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53116$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53117        FOUND_FREETYPE=no
53118      fi
53119    else
53120      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53121        # On Windows, we will need both .lib and .dll file.
53122        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53123          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53124$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53125          FOUND_FREETYPE=no
53126        fi
53127      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53128          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53129        # Found lib in isa dir, use that instead.
53130        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53131        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53132$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53133      fi
53134    fi
53135  fi
53136
53137  if test "x$FOUND_FREETYPE" = xyes; then
53138
53139  # Only process if variable expands to non-empty
53140
53141  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53143
53144  # Input might be given as Windows format, start by converting to
53145  # unix format.
53146  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53147  new_path=`$CYGPATH -u "$path"`
53148
53149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53152  # "foo.exe" is OK but "foo" is an error.
53153  #
53154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53155  # It is also a way to make sure we got the proper file name for the real test later on.
53156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53157  if test "x$test_shortpath" = x; then
53158    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53159$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53160    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53161  fi
53162
53163  # Call helper function which possibly converts this using DOS-style short mode.
53164  # If so, the updated path is stored in $new_path.
53165
53166  input_path="$new_path"
53167  # Check if we need to convert this using DOS-style short mode. If the path
53168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53169  # take no chances and rewrite it.
53170  # Note: m4 eats our [], so we need to use [ and ] instead.
53171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53172  if test "x$has_forbidden_chars" != x; then
53173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53177      # Going to short mode and back again did indeed matter. Since short mode is
53178      # case insensitive, let's make it lowercase to improve readability.
53179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53180      # Now convert it back to Unix-style (cygpath)
53181      input_path=`$CYGPATH -u "$shortmode_path"`
53182      new_path="$input_path"
53183    fi
53184  fi
53185
53186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53187  if test "x$test_cygdrive_prefix" = x; then
53188    # As a simple fix, exclude /usr/bin since it's not a real path.
53189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53191      # a path prefixed by /cygdrive for fixpath to work.
53192      new_path="$CYGWIN_ROOT_PATH$input_path"
53193    fi
53194  fi
53195
53196
53197  if test "x$path" != "x$new_path"; then
53198    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53200$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53201  fi
53202
53203    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53204
53205  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53206  has_colon=`$ECHO $path | $GREP ^.:`
53207  new_path="$path"
53208  if test "x$has_colon" = x; then
53209    # Not in mixed or Windows style, start by that.
53210    new_path=`cmd //c echo $path`
53211  fi
53212
53213
53214  input_path="$new_path"
53215  # Check if we need to convert this using DOS-style short mode. If the path
53216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53217  # take no chances and rewrite it.
53218  # Note: m4 eats our [], so we need to use [ and ] instead.
53219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53220  if test "x$has_forbidden_chars" != x; then
53221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53223  fi
53224
53225
53226  windows_path="$new_path"
53227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53228    unix_path=`$CYGPATH -u "$windows_path"`
53229    new_path="$unix_path"
53230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53232    new_path="$unix_path"
53233  fi
53234
53235  if test "x$path" != "x$new_path"; then
53236    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53238$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53239  fi
53240
53241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53243
53244    else
53245      # We're on a unix platform. Hooray! :)
53246      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53247      has_space=`$ECHO "$path" | $GREP " "`
53248      if test "x$has_space" != x; then
53249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53250$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53251        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53252      fi
53253
53254      # Use eval to expand a potential ~
53255      eval path="$path"
53256      if test ! -f "$path" && test ! -d "$path"; then
53257        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53258      fi
53259
53260      if test -d "$path"; then
53261        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53262      else
53263        dir="`$DIRNAME "$path"`"
53264        base="`$BASENAME "$path"`"
53265        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53266      fi
53267    fi
53268  fi
53269
53270
53271  # Only process if variable expands to non-empty
53272
53273  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53275
53276  # Input might be given as Windows format, start by converting to
53277  # unix format.
53278  path="$POTENTIAL_FREETYPE_LIB_PATH"
53279  new_path=`$CYGPATH -u "$path"`
53280
53281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53284  # "foo.exe" is OK but "foo" is an error.
53285  #
53286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53287  # It is also a way to make sure we got the proper file name for the real test later on.
53288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53289  if test "x$test_shortpath" = x; then
53290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53291$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53292    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53293  fi
53294
53295  # Call helper function which possibly converts this using DOS-style short mode.
53296  # If so, the updated path is stored in $new_path.
53297
53298  input_path="$new_path"
53299  # Check if we need to convert this using DOS-style short mode. If the path
53300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53301  # take no chances and rewrite it.
53302  # Note: m4 eats our [], so we need to use [ and ] instead.
53303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53304  if test "x$has_forbidden_chars" != x; then
53305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53309      # Going to short mode and back again did indeed matter. Since short mode is
53310      # case insensitive, let's make it lowercase to improve readability.
53311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53312      # Now convert it back to Unix-style (cygpath)
53313      input_path=`$CYGPATH -u "$shortmode_path"`
53314      new_path="$input_path"
53315    fi
53316  fi
53317
53318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53319  if test "x$test_cygdrive_prefix" = x; then
53320    # As a simple fix, exclude /usr/bin since it's not a real path.
53321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53323      # a path prefixed by /cygdrive for fixpath to work.
53324      new_path="$CYGWIN_ROOT_PATH$input_path"
53325    fi
53326  fi
53327
53328
53329  if test "x$path" != "x$new_path"; then
53330    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53332$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53333  fi
53334
53335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53336
53337  path="$POTENTIAL_FREETYPE_LIB_PATH"
53338  has_colon=`$ECHO $path | $GREP ^.:`
53339  new_path="$path"
53340  if test "x$has_colon" = x; then
53341    # Not in mixed or Windows style, start by that.
53342    new_path=`cmd //c echo $path`
53343  fi
53344
53345
53346  input_path="$new_path"
53347  # Check if we need to convert this using DOS-style short mode. If the path
53348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53349  # take no chances and rewrite it.
53350  # Note: m4 eats our [], so we need to use [ and ] instead.
53351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53352  if test "x$has_forbidden_chars" != x; then
53353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53355  fi
53356
53357
53358  windows_path="$new_path"
53359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53360    unix_path=`$CYGPATH -u "$windows_path"`
53361    new_path="$unix_path"
53362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53364    new_path="$unix_path"
53365  fi
53366
53367  if test "x$path" != "x$new_path"; then
53368    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53370$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53371  fi
53372
53373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53375
53376    else
53377      # We're on a unix platform. Hooray! :)
53378      path="$POTENTIAL_FREETYPE_LIB_PATH"
53379      has_space=`$ECHO "$path" | $GREP " "`
53380      if test "x$has_space" != x; then
53381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53382$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53384      fi
53385
53386      # Use eval to expand a potential ~
53387      eval path="$path"
53388      if test ! -f "$path" && test ! -d "$path"; then
53389        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53390      fi
53391
53392      if test -d "$path"; then
53393        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53394      else
53395        dir="`$DIRNAME "$path"`"
53396        base="`$BASENAME "$path"`"
53397        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53398      fi
53399    fi
53400  fi
53401
53402
53403    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53405$as_echo_n "checking for freetype includes... " >&6; }
53406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53407$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53408    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53410$as_echo_n "checking for freetype libraries... " >&6; }
53411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53412$as_echo "$FREETYPE_LIB_PATH" >&6; }
53413  fi
53414
53415          fi
53416        else
53417          FREETYPE_BASE_DIR="$SYSROOT/usr"
53418
53419  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53420  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53421  METHOD="well-known location"
53422
53423  # Let's start with an optimistic view of the world :-)
53424  FOUND_FREETYPE=yes
53425
53426  # First look for the canonical freetype main include file ft2build.h.
53427  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53428    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53429    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53430    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53431      # Fail.
53432      FOUND_FREETYPE=no
53433    fi
53434  fi
53435
53436  if test "x$FOUND_FREETYPE" = xyes; then
53437    # Include file found, let's continue the sanity check.
53438    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53439$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53440
53441    # Reset to default value
53442    FREETYPE_BASE_NAME=freetype
53443    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53444    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53445      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53446          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53447        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53448        # for the .6 version explicitly.
53449        FREETYPE_BASE_NAME=freetype.6
53450        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53451        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53452$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53453      else
53454        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53455$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53456        FOUND_FREETYPE=no
53457      fi
53458    else
53459      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53460        # On Windows, we will need both .lib and .dll file.
53461        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53462          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53463$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53464          FOUND_FREETYPE=no
53465        fi
53466      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53467          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53468        # Found lib in isa dir, use that instead.
53469        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53470        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53471$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53472      fi
53473    fi
53474  fi
53475
53476  if test "x$FOUND_FREETYPE" = xyes; then
53477
53478  # Only process if variable expands to non-empty
53479
53480  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53482
53483  # Input might be given as Windows format, start by converting to
53484  # unix format.
53485  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53486  new_path=`$CYGPATH -u "$path"`
53487
53488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53491  # "foo.exe" is OK but "foo" is an error.
53492  #
53493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53494  # It is also a way to make sure we got the proper file name for the real test later on.
53495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53496  if test "x$test_shortpath" = x; then
53497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53498$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53499    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53500  fi
53501
53502  # Call helper function which possibly converts this using DOS-style short mode.
53503  # If so, the updated path is stored in $new_path.
53504
53505  input_path="$new_path"
53506  # Check if we need to convert this using DOS-style short mode. If the path
53507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53508  # take no chances and rewrite it.
53509  # Note: m4 eats our [], so we need to use [ and ] instead.
53510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53511  if test "x$has_forbidden_chars" != x; then
53512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53516      # Going to short mode and back again did indeed matter. Since short mode is
53517      # case insensitive, let's make it lowercase to improve readability.
53518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53519      # Now convert it back to Unix-style (cygpath)
53520      input_path=`$CYGPATH -u "$shortmode_path"`
53521      new_path="$input_path"
53522    fi
53523  fi
53524
53525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53526  if test "x$test_cygdrive_prefix" = x; then
53527    # As a simple fix, exclude /usr/bin since it's not a real path.
53528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53530      # a path prefixed by /cygdrive for fixpath to work.
53531      new_path="$CYGWIN_ROOT_PATH$input_path"
53532    fi
53533  fi
53534
53535
53536  if test "x$path" != "x$new_path"; then
53537    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53540  fi
53541
53542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53543
53544  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53545  has_colon=`$ECHO $path | $GREP ^.:`
53546  new_path="$path"
53547  if test "x$has_colon" = x; then
53548    # Not in mixed or Windows style, start by that.
53549    new_path=`cmd //c echo $path`
53550  fi
53551
53552
53553  input_path="$new_path"
53554  # Check if we need to convert this using DOS-style short mode. If the path
53555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53556  # take no chances and rewrite it.
53557  # Note: m4 eats our [], so we need to use [ and ] instead.
53558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53559  if test "x$has_forbidden_chars" != x; then
53560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53562  fi
53563
53564
53565  windows_path="$new_path"
53566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53567    unix_path=`$CYGPATH -u "$windows_path"`
53568    new_path="$unix_path"
53569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53571    new_path="$unix_path"
53572  fi
53573
53574  if test "x$path" != "x$new_path"; then
53575    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53577$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53578  fi
53579
53580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53582
53583    else
53584      # We're on a unix platform. Hooray! :)
53585      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53586      has_space=`$ECHO "$path" | $GREP " "`
53587      if test "x$has_space" != x; then
53588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53589$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53590        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53591      fi
53592
53593      # Use eval to expand a potential ~
53594      eval path="$path"
53595      if test ! -f "$path" && test ! -d "$path"; then
53596        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53597      fi
53598
53599      if test -d "$path"; then
53600        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53601      else
53602        dir="`$DIRNAME "$path"`"
53603        base="`$BASENAME "$path"`"
53604        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53605      fi
53606    fi
53607  fi
53608
53609
53610  # Only process if variable expands to non-empty
53611
53612  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53614
53615  # Input might be given as Windows format, start by converting to
53616  # unix format.
53617  path="$POTENTIAL_FREETYPE_LIB_PATH"
53618  new_path=`$CYGPATH -u "$path"`
53619
53620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53623  # "foo.exe" is OK but "foo" is an error.
53624  #
53625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53626  # It is also a way to make sure we got the proper file name for the real test later on.
53627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53628  if test "x$test_shortpath" = x; then
53629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53630$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53631    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53632  fi
53633
53634  # Call helper function which possibly converts this using DOS-style short mode.
53635  # If so, the updated path is stored in $new_path.
53636
53637  input_path="$new_path"
53638  # Check if we need to convert this using DOS-style short mode. If the path
53639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53640  # take no chances and rewrite it.
53641  # Note: m4 eats our [], so we need to use [ and ] instead.
53642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53643  if test "x$has_forbidden_chars" != x; then
53644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53648      # Going to short mode and back again did indeed matter. Since short mode is
53649      # case insensitive, let's make it lowercase to improve readability.
53650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53651      # Now convert it back to Unix-style (cygpath)
53652      input_path=`$CYGPATH -u "$shortmode_path"`
53653      new_path="$input_path"
53654    fi
53655  fi
53656
53657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53658  if test "x$test_cygdrive_prefix" = x; then
53659    # As a simple fix, exclude /usr/bin since it's not a real path.
53660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53662      # a path prefixed by /cygdrive for fixpath to work.
53663      new_path="$CYGWIN_ROOT_PATH$input_path"
53664    fi
53665  fi
53666
53667
53668  if test "x$path" != "x$new_path"; then
53669    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53671$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53672  fi
53673
53674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53675
53676  path="$POTENTIAL_FREETYPE_LIB_PATH"
53677  has_colon=`$ECHO $path | $GREP ^.:`
53678  new_path="$path"
53679  if test "x$has_colon" = x; then
53680    # Not in mixed or Windows style, start by that.
53681    new_path=`cmd //c echo $path`
53682  fi
53683
53684
53685  input_path="$new_path"
53686  # Check if we need to convert this using DOS-style short mode. If the path
53687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53688  # take no chances and rewrite it.
53689  # Note: m4 eats our [], so we need to use [ and ] instead.
53690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53691  if test "x$has_forbidden_chars" != x; then
53692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53694  fi
53695
53696
53697  windows_path="$new_path"
53698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53699    unix_path=`$CYGPATH -u "$windows_path"`
53700    new_path="$unix_path"
53701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53703    new_path="$unix_path"
53704  fi
53705
53706  if test "x$path" != "x$new_path"; then
53707    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
53708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
53709$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
53710  fi
53711
53712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53714
53715    else
53716      # We're on a unix platform. Hooray! :)
53717      path="$POTENTIAL_FREETYPE_LIB_PATH"
53718      has_space=`$ECHO "$path" | $GREP " "`
53719      if test "x$has_space" != x; then
53720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53721$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53722        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53723      fi
53724
53725      # Use eval to expand a potential ~
53726      eval path="$path"
53727      if test ! -f "$path" && test ! -d "$path"; then
53728        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53729      fi
53730
53731      if test -d "$path"; then
53732        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
53733      else
53734        dir="`$DIRNAME "$path"`"
53735        base="`$BASENAME "$path"`"
53736        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53737      fi
53738    fi
53739  fi
53740
53741
53742    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
53744$as_echo_n "checking for freetype includes... " >&6; }
53745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
53746$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
53747    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
53748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
53749$as_echo_n "checking for freetype libraries... " >&6; }
53750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
53751$as_echo "$FREETYPE_LIB_PATH" >&6; }
53752  fi
53753
53754
53755          if test "x$FOUND_FREETYPE" != xyes; then
53756            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
53757
53758  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
53759  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
53760  METHOD="well-known location"
53761
53762  # Let's start with an optimistic view of the world :-)
53763  FOUND_FREETYPE=yes
53764
53765  # First look for the canonical freetype main include file ft2build.h.
53766  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53767    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
53768    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
53769    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
53770      # Fail.
53771      FOUND_FREETYPE=no
53772    fi
53773  fi
53774
53775  if test "x$FOUND_FREETYPE" = xyes; then
53776    # Include file found, let's continue the sanity check.
53777    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
53778$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
53779
53780    # Reset to default value
53781    FREETYPE_BASE_NAME=freetype
53782    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53783    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
53784      if test "x$OPENJDK_TARGET_OS" = xmacosx \
53785          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
53786        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
53787        # for the .6 version explicitly.
53788        FREETYPE_BASE_NAME=freetype.6
53789        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
53790        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
53791$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
53792      else
53793        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
53794$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
53795        FOUND_FREETYPE=no
53796      fi
53797    else
53798      if test "x$OPENJDK_TARGET_OS" = xwindows; then
53799        # On Windows, we will need both .lib and .dll file.
53800        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
53801          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
53802$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
53803          FOUND_FREETYPE=no
53804        fi
53805      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
53806          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
53807        # Found lib in isa dir, use that instead.
53808        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
53809        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
53810$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
53811      fi
53812    fi
53813  fi
53814
53815  if test "x$FOUND_FREETYPE" = xyes; then
53816
53817  # Only process if variable expands to non-empty
53818
53819  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
53820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53821
53822  # Input might be given as Windows format, start by converting to
53823  # unix format.
53824  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53825  new_path=`$CYGPATH -u "$path"`
53826
53827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53830  # "foo.exe" is OK but "foo" is an error.
53831  #
53832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53833  # It is also a way to make sure we got the proper file name for the real test later on.
53834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53835  if test "x$test_shortpath" = x; then
53836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53837$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53838    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
53839  fi
53840
53841  # Call helper function which possibly converts this using DOS-style short mode.
53842  # If so, the updated path is stored in $new_path.
53843
53844  input_path="$new_path"
53845  # Check if we need to convert this using DOS-style short mode. If the path
53846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53847  # take no chances and rewrite it.
53848  # Note: m4 eats our [], so we need to use [ and ] instead.
53849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53850  if test "x$has_forbidden_chars" != x; then
53851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53855      # Going to short mode and back again did indeed matter. Since short mode is
53856      # case insensitive, let's make it lowercase to improve readability.
53857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53858      # Now convert it back to Unix-style (cygpath)
53859      input_path=`$CYGPATH -u "$shortmode_path"`
53860      new_path="$input_path"
53861    fi
53862  fi
53863
53864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53865  if test "x$test_cygdrive_prefix" = x; then
53866    # As a simple fix, exclude /usr/bin since it's not a real path.
53867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53869      # a path prefixed by /cygdrive for fixpath to work.
53870      new_path="$CYGWIN_ROOT_PATH$input_path"
53871    fi
53872  fi
53873
53874
53875  if test "x$path" != "x$new_path"; then
53876    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53878$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53879  fi
53880
53881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53882
53883  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53884  has_colon=`$ECHO $path | $GREP ^.:`
53885  new_path="$path"
53886  if test "x$has_colon" = x; then
53887    # Not in mixed or Windows style, start by that.
53888    new_path=`cmd //c echo $path`
53889  fi
53890
53891
53892  input_path="$new_path"
53893  # Check if we need to convert this using DOS-style short mode. If the path
53894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53895  # take no chances and rewrite it.
53896  # Note: m4 eats our [], so we need to use [ and ] instead.
53897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53898  if test "x$has_forbidden_chars" != x; then
53899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53901  fi
53902
53903
53904  windows_path="$new_path"
53905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53906    unix_path=`$CYGPATH -u "$windows_path"`
53907    new_path="$unix_path"
53908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53910    new_path="$unix_path"
53911  fi
53912
53913  if test "x$path" != "x$new_path"; then
53914    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
53915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
53916$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
53917  fi
53918
53919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53921
53922    else
53923      # We're on a unix platform. Hooray! :)
53924      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
53925      has_space=`$ECHO "$path" | $GREP " "`
53926      if test "x$has_space" != x; then
53927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
53928$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
53929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53930      fi
53931
53932      # Use eval to expand a potential ~
53933      eval path="$path"
53934      if test ! -f "$path" && test ! -d "$path"; then
53935        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
53936      fi
53937
53938      if test -d "$path"; then
53939        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
53940      else
53941        dir="`$DIRNAME "$path"`"
53942        base="`$BASENAME "$path"`"
53943        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
53944      fi
53945    fi
53946  fi
53947
53948
53949  # Only process if variable expands to non-empty
53950
53951  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
53952    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53953
53954  # Input might be given as Windows format, start by converting to
53955  # unix format.
53956  path="$POTENTIAL_FREETYPE_LIB_PATH"
53957  new_path=`$CYGPATH -u "$path"`
53958
53959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53962  # "foo.exe" is OK but "foo" is an error.
53963  #
53964  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53965  # It is also a way to make sure we got the proper file name for the real test later on.
53966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53967  if test "x$test_shortpath" = x; then
53968    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
53969$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
53970    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
53971  fi
53972
53973  # Call helper function which possibly converts this using DOS-style short mode.
53974  # If so, the updated path is stored in $new_path.
53975
53976  input_path="$new_path"
53977  # Check if we need to convert this using DOS-style short mode. If the path
53978  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53979  # take no chances and rewrite it.
53980  # Note: m4 eats our [], so we need to use [ and ] instead.
53981  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53982  if test "x$has_forbidden_chars" != x; then
53983    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53984    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53985    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53986    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53987      # Going to short mode and back again did indeed matter. Since short mode is
53988      # case insensitive, let's make it lowercase to improve readability.
53989      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53990      # Now convert it back to Unix-style (cygpath)
53991      input_path=`$CYGPATH -u "$shortmode_path"`
53992      new_path="$input_path"
53993    fi
53994  fi
53995
53996  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53997  if test "x$test_cygdrive_prefix" = x; then
53998    # As a simple fix, exclude /usr/bin since it's not a real path.
53999    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54000      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54001      # a path prefixed by /cygdrive for fixpath to work.
54002      new_path="$CYGWIN_ROOT_PATH$input_path"
54003    fi
54004  fi
54005
54006
54007  if test "x$path" != "x$new_path"; then
54008    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54010$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54011  fi
54012
54013    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54014
54015  path="$POTENTIAL_FREETYPE_LIB_PATH"
54016  has_colon=`$ECHO $path | $GREP ^.:`
54017  new_path="$path"
54018  if test "x$has_colon" = x; then
54019    # Not in mixed or Windows style, start by that.
54020    new_path=`cmd //c echo $path`
54021  fi
54022
54023
54024  input_path="$new_path"
54025  # Check if we need to convert this using DOS-style short mode. If the path
54026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54027  # take no chances and rewrite it.
54028  # Note: m4 eats our [], so we need to use [ and ] instead.
54029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54030  if test "x$has_forbidden_chars" != x; then
54031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54032    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54033  fi
54034
54035
54036  windows_path="$new_path"
54037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54038    unix_path=`$CYGPATH -u "$windows_path"`
54039    new_path="$unix_path"
54040  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54041    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54042    new_path="$unix_path"
54043  fi
54044
54045  if test "x$path" != "x$new_path"; then
54046    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54048$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54049  fi
54050
54051  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54052  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54053
54054    else
54055      # We're on a unix platform. Hooray! :)
54056      path="$POTENTIAL_FREETYPE_LIB_PATH"
54057      has_space=`$ECHO "$path" | $GREP " "`
54058      if test "x$has_space" != x; then
54059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54060$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54061        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54062      fi
54063
54064      # Use eval to expand a potential ~
54065      eval path="$path"
54066      if test ! -f "$path" && test ! -d "$path"; then
54067        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54068      fi
54069
54070      if test -d "$path"; then
54071        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54072      else
54073        dir="`$DIRNAME "$path"`"
54074        base="`$BASENAME "$path"`"
54075        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54076      fi
54077    fi
54078  fi
54079
54080
54081    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54083$as_echo_n "checking for freetype includes... " >&6; }
54084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54085$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54086    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54088$as_echo_n "checking for freetype libraries... " >&6; }
54089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54090$as_echo "$FREETYPE_LIB_PATH" >&6; }
54091  fi
54092
54093          fi
54094
54095          if test "x$FOUND_FREETYPE" != xyes; then
54096            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
54097
54098  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54099  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
54100  METHOD="well-known location"
54101
54102  # Let's start with an optimistic view of the world :-)
54103  FOUND_FREETYPE=yes
54104
54105  # First look for the canonical freetype main include file ft2build.h.
54106  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54107    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54108    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54109    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54110      # Fail.
54111      FOUND_FREETYPE=no
54112    fi
54113  fi
54114
54115  if test "x$FOUND_FREETYPE" = xyes; then
54116    # Include file found, let's continue the sanity check.
54117    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54118$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54119
54120    # Reset to default value
54121    FREETYPE_BASE_NAME=freetype
54122    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54123    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54124      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54125          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54126        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54127        # for the .6 version explicitly.
54128        FREETYPE_BASE_NAME=freetype.6
54129        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54130        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54131$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54132      else
54133        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54134$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54135        FOUND_FREETYPE=no
54136      fi
54137    else
54138      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54139        # On Windows, we will need both .lib and .dll file.
54140        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54141          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54142$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54143          FOUND_FREETYPE=no
54144        fi
54145      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54146          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54147        # Found lib in isa dir, use that instead.
54148        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54149        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54150$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54151      fi
54152    fi
54153  fi
54154
54155  if test "x$FOUND_FREETYPE" = xyes; then
54156
54157  # Only process if variable expands to non-empty
54158
54159  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54161
54162  # Input might be given as Windows format, start by converting to
54163  # unix format.
54164  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54165  new_path=`$CYGPATH -u "$path"`
54166
54167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54170  # "foo.exe" is OK but "foo" is an error.
54171  #
54172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54173  # It is also a way to make sure we got the proper file name for the real test later on.
54174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54175  if test "x$test_shortpath" = x; then
54176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54178    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54179  fi
54180
54181  # Call helper function which possibly converts this using DOS-style short mode.
54182  # If so, the updated path is stored in $new_path.
54183
54184  input_path="$new_path"
54185  # Check if we need to convert this using DOS-style short mode. If the path
54186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54187  # take no chances and rewrite it.
54188  # Note: m4 eats our [], so we need to use [ and ] instead.
54189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54190  if test "x$has_forbidden_chars" != x; then
54191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54195      # Going to short mode and back again did indeed matter. Since short mode is
54196      # case insensitive, let's make it lowercase to improve readability.
54197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54198      # Now convert it back to Unix-style (cygpath)
54199      input_path=`$CYGPATH -u "$shortmode_path"`
54200      new_path="$input_path"
54201    fi
54202  fi
54203
54204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54205  if test "x$test_cygdrive_prefix" = x; then
54206    # As a simple fix, exclude /usr/bin since it's not a real path.
54207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54209      # a path prefixed by /cygdrive for fixpath to work.
54210      new_path="$CYGWIN_ROOT_PATH$input_path"
54211    fi
54212  fi
54213
54214
54215  if test "x$path" != "x$new_path"; then
54216    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54218$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54219  fi
54220
54221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54222
54223  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54224  has_colon=`$ECHO $path | $GREP ^.:`
54225  new_path="$path"
54226  if test "x$has_colon" = x; then
54227    # Not in mixed or Windows style, start by that.
54228    new_path=`cmd //c echo $path`
54229  fi
54230
54231
54232  input_path="$new_path"
54233  # Check if we need to convert this using DOS-style short mode. If the path
54234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54235  # take no chances and rewrite it.
54236  # Note: m4 eats our [], so we need to use [ and ] instead.
54237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54238  if test "x$has_forbidden_chars" != x; then
54239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54241  fi
54242
54243
54244  windows_path="$new_path"
54245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54246    unix_path=`$CYGPATH -u "$windows_path"`
54247    new_path="$unix_path"
54248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54250    new_path="$unix_path"
54251  fi
54252
54253  if test "x$path" != "x$new_path"; then
54254    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54257  fi
54258
54259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54261
54262    else
54263      # We're on a unix platform. Hooray! :)
54264      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54265      has_space=`$ECHO "$path" | $GREP " "`
54266      if test "x$has_space" != x; then
54267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54268$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54269        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54270      fi
54271
54272      # Use eval to expand a potential ~
54273      eval path="$path"
54274      if test ! -f "$path" && test ! -d "$path"; then
54275        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54276      fi
54277
54278      if test -d "$path"; then
54279        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54280      else
54281        dir="`$DIRNAME "$path"`"
54282        base="`$BASENAME "$path"`"
54283        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54284      fi
54285    fi
54286  fi
54287
54288
54289  # Only process if variable expands to non-empty
54290
54291  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54293
54294  # Input might be given as Windows format, start by converting to
54295  # unix format.
54296  path="$POTENTIAL_FREETYPE_LIB_PATH"
54297  new_path=`$CYGPATH -u "$path"`
54298
54299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54302  # "foo.exe" is OK but "foo" is an error.
54303  #
54304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54305  # It is also a way to make sure we got the proper file name for the real test later on.
54306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54307  if test "x$test_shortpath" = x; then
54308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54309$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54310    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54311  fi
54312
54313  # Call helper function which possibly converts this using DOS-style short mode.
54314  # If so, the updated path is stored in $new_path.
54315
54316  input_path="$new_path"
54317  # Check if we need to convert this using DOS-style short mode. If the path
54318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54319  # take no chances and rewrite it.
54320  # Note: m4 eats our [], so we need to use [ and ] instead.
54321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54322  if test "x$has_forbidden_chars" != x; then
54323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54327      # Going to short mode and back again did indeed matter. Since short mode is
54328      # case insensitive, let's make it lowercase to improve readability.
54329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54330      # Now convert it back to Unix-style (cygpath)
54331      input_path=`$CYGPATH -u "$shortmode_path"`
54332      new_path="$input_path"
54333    fi
54334  fi
54335
54336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54337  if test "x$test_cygdrive_prefix" = x; then
54338    # As a simple fix, exclude /usr/bin since it's not a real path.
54339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54341      # a path prefixed by /cygdrive for fixpath to work.
54342      new_path="$CYGWIN_ROOT_PATH$input_path"
54343    fi
54344  fi
54345
54346
54347  if test "x$path" != "x$new_path"; then
54348    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54350$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54351  fi
54352
54353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54354
54355  path="$POTENTIAL_FREETYPE_LIB_PATH"
54356  has_colon=`$ECHO $path | $GREP ^.:`
54357  new_path="$path"
54358  if test "x$has_colon" = x; then
54359    # Not in mixed or Windows style, start by that.
54360    new_path=`cmd //c echo $path`
54361  fi
54362
54363
54364  input_path="$new_path"
54365  # Check if we need to convert this using DOS-style short mode. If the path
54366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54367  # take no chances and rewrite it.
54368  # Note: m4 eats our [], so we need to use [ and ] instead.
54369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54370  if test "x$has_forbidden_chars" != x; then
54371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54373  fi
54374
54375
54376  windows_path="$new_path"
54377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54378    unix_path=`$CYGPATH -u "$windows_path"`
54379    new_path="$unix_path"
54380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54382    new_path="$unix_path"
54383  fi
54384
54385  if test "x$path" != "x$new_path"; then
54386    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54388$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54389  fi
54390
54391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54393
54394    else
54395      # We're on a unix platform. Hooray! :)
54396      path="$POTENTIAL_FREETYPE_LIB_PATH"
54397      has_space=`$ECHO "$path" | $GREP " "`
54398      if test "x$has_space" != x; then
54399        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54400$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54401        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54402      fi
54403
54404      # Use eval to expand a potential ~
54405      eval path="$path"
54406      if test ! -f "$path" && test ! -d "$path"; then
54407        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54408      fi
54409
54410      if test -d "$path"; then
54411        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54412      else
54413        dir="`$DIRNAME "$path"`"
54414        base="`$BASENAME "$path"`"
54415        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54416      fi
54417    fi
54418  fi
54419
54420
54421    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54423$as_echo_n "checking for freetype includes... " >&6; }
54424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54425$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54426    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54428$as_echo_n "checking for freetype libraries... " >&6; }
54429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54430$as_echo "$FREETYPE_LIB_PATH" >&6; }
54431  fi
54432
54433          fi
54434
54435          if test "x$FOUND_FREETYPE" != xyes; then
54436            FREETYPE_BASE_DIR="$SYSROOT/usr"
54437            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54438
54439  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54440  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
54441  METHOD="well-known location"
54442
54443  # Let's start with an optimistic view of the world :-)
54444  FOUND_FREETYPE=yes
54445
54446  # First look for the canonical freetype main include file ft2build.h.
54447  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54448    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54449    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54450    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54451      # Fail.
54452      FOUND_FREETYPE=no
54453    fi
54454  fi
54455
54456  if test "x$FOUND_FREETYPE" = xyes; then
54457    # Include file found, let's continue the sanity check.
54458    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54459$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54460
54461    # Reset to default value
54462    FREETYPE_BASE_NAME=freetype
54463    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54464    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54465      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54466          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54467        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54468        # for the .6 version explicitly.
54469        FREETYPE_BASE_NAME=freetype.6
54470        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54471        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54472$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54473      else
54474        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54475$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54476        FOUND_FREETYPE=no
54477      fi
54478    else
54479      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54480        # On Windows, we will need both .lib and .dll file.
54481        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54482          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54483$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54484          FOUND_FREETYPE=no
54485        fi
54486      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54487          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54488        # Found lib in isa dir, use that instead.
54489        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54490        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54491$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54492      fi
54493    fi
54494  fi
54495
54496  if test "x$FOUND_FREETYPE" = xyes; then
54497
54498  # Only process if variable expands to non-empty
54499
54500  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54502
54503  # Input might be given as Windows format, start by converting to
54504  # unix format.
54505  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54506  new_path=`$CYGPATH -u "$path"`
54507
54508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54511  # "foo.exe" is OK but "foo" is an error.
54512  #
54513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54514  # It is also a way to make sure we got the proper file name for the real test later on.
54515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54516  if test "x$test_shortpath" = x; then
54517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54518$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54519    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54520  fi
54521
54522  # Call helper function which possibly converts this using DOS-style short mode.
54523  # If so, the updated path is stored in $new_path.
54524
54525  input_path="$new_path"
54526  # Check if we need to convert this using DOS-style short mode. If the path
54527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54528  # take no chances and rewrite it.
54529  # Note: m4 eats our [], so we need to use [ and ] instead.
54530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54531  if test "x$has_forbidden_chars" != x; then
54532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54536      # Going to short mode and back again did indeed matter. Since short mode is
54537      # case insensitive, let's make it lowercase to improve readability.
54538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54539      # Now convert it back to Unix-style (cygpath)
54540      input_path=`$CYGPATH -u "$shortmode_path"`
54541      new_path="$input_path"
54542    fi
54543  fi
54544
54545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54546  if test "x$test_cygdrive_prefix" = x; then
54547    # As a simple fix, exclude /usr/bin since it's not a real path.
54548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54550      # a path prefixed by /cygdrive for fixpath to work.
54551      new_path="$CYGWIN_ROOT_PATH$input_path"
54552    fi
54553  fi
54554
54555
54556  if test "x$path" != "x$new_path"; then
54557    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54559$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54560  fi
54561
54562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54563
54564  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54565  has_colon=`$ECHO $path | $GREP ^.:`
54566  new_path="$path"
54567  if test "x$has_colon" = x; then
54568    # Not in mixed or Windows style, start by that.
54569    new_path=`cmd //c echo $path`
54570  fi
54571
54572
54573  input_path="$new_path"
54574  # Check if we need to convert this using DOS-style short mode. If the path
54575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54576  # take no chances and rewrite it.
54577  # Note: m4 eats our [], so we need to use [ and ] instead.
54578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54579  if test "x$has_forbidden_chars" != x; then
54580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54582  fi
54583
54584
54585  windows_path="$new_path"
54586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54587    unix_path=`$CYGPATH -u "$windows_path"`
54588    new_path="$unix_path"
54589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54591    new_path="$unix_path"
54592  fi
54593
54594  if test "x$path" != "x$new_path"; then
54595    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54598  fi
54599
54600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54602
54603    else
54604      # We're on a unix platform. Hooray! :)
54605      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54606      has_space=`$ECHO "$path" | $GREP " "`
54607      if test "x$has_space" != x; then
54608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54609$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54611      fi
54612
54613      # Use eval to expand a potential ~
54614      eval path="$path"
54615      if test ! -f "$path" && test ! -d "$path"; then
54616        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54617      fi
54618
54619      if test -d "$path"; then
54620        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54621      else
54622        dir="`$DIRNAME "$path"`"
54623        base="`$BASENAME "$path"`"
54624        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54625      fi
54626    fi
54627  fi
54628
54629
54630  # Only process if variable expands to non-empty
54631
54632  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54634
54635  # Input might be given as Windows format, start by converting to
54636  # unix format.
54637  path="$POTENTIAL_FREETYPE_LIB_PATH"
54638  new_path=`$CYGPATH -u "$path"`
54639
54640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54643  # "foo.exe" is OK but "foo" is an error.
54644  #
54645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54646  # It is also a way to make sure we got the proper file name for the real test later on.
54647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54648  if test "x$test_shortpath" = x; then
54649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54651    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54652  fi
54653
54654  # Call helper function which possibly converts this using DOS-style short mode.
54655  # If so, the updated path is stored in $new_path.
54656
54657  input_path="$new_path"
54658  # Check if we need to convert this using DOS-style short mode. If the path
54659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54660  # take no chances and rewrite it.
54661  # Note: m4 eats our [], so we need to use [ and ] instead.
54662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54663  if test "x$has_forbidden_chars" != x; then
54664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54668      # Going to short mode and back again did indeed matter. Since short mode is
54669      # case insensitive, let's make it lowercase to improve readability.
54670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54671      # Now convert it back to Unix-style (cygpath)
54672      input_path=`$CYGPATH -u "$shortmode_path"`
54673      new_path="$input_path"
54674    fi
54675  fi
54676
54677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54678  if test "x$test_cygdrive_prefix" = x; then
54679    # As a simple fix, exclude /usr/bin since it's not a real path.
54680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54682      # a path prefixed by /cygdrive for fixpath to work.
54683      new_path="$CYGWIN_ROOT_PATH$input_path"
54684    fi
54685  fi
54686
54687
54688  if test "x$path" != "x$new_path"; then
54689    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54692  fi
54693
54694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54695
54696  path="$POTENTIAL_FREETYPE_LIB_PATH"
54697  has_colon=`$ECHO $path | $GREP ^.:`
54698  new_path="$path"
54699  if test "x$has_colon" = x; then
54700    # Not in mixed or Windows style, start by that.
54701    new_path=`cmd //c echo $path`
54702  fi
54703
54704
54705  input_path="$new_path"
54706  # Check if we need to convert this using DOS-style short mode. If the path
54707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54708  # take no chances and rewrite it.
54709  # Note: m4 eats our [], so we need to use [ and ] instead.
54710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54711  if test "x$has_forbidden_chars" != x; then
54712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54714  fi
54715
54716
54717  windows_path="$new_path"
54718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54719    unix_path=`$CYGPATH -u "$windows_path"`
54720    new_path="$unix_path"
54721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54723    new_path="$unix_path"
54724  fi
54725
54726  if test "x$path" != "x$new_path"; then
54727    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
54728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
54729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
54730  fi
54731
54732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54734
54735    else
54736      # We're on a unix platform. Hooray! :)
54737      path="$POTENTIAL_FREETYPE_LIB_PATH"
54738      has_space=`$ECHO "$path" | $GREP " "`
54739      if test "x$has_space" != x; then
54740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54742        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54743      fi
54744
54745      # Use eval to expand a potential ~
54746      eval path="$path"
54747      if test ! -f "$path" && test ! -d "$path"; then
54748        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54749      fi
54750
54751      if test -d "$path"; then
54752        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
54753      else
54754        dir="`$DIRNAME "$path"`"
54755        base="`$BASENAME "$path"`"
54756        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54757      fi
54758    fi
54759  fi
54760
54761
54762    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54763    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
54764$as_echo_n "checking for freetype includes... " >&6; }
54765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
54766$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
54767    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
54768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
54769$as_echo_n "checking for freetype libraries... " >&6; }
54770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
54771$as_echo "$FREETYPE_LIB_PATH" >&6; }
54772  fi
54773
54774            else
54775
54776  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
54777  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
54778  METHOD="well-known location"
54779
54780  # Let's start with an optimistic view of the world :-)
54781  FOUND_FREETYPE=yes
54782
54783  # First look for the canonical freetype main include file ft2build.h.
54784  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54785    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
54786    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
54787    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
54788      # Fail.
54789      FOUND_FREETYPE=no
54790    fi
54791  fi
54792
54793  if test "x$FOUND_FREETYPE" = xyes; then
54794    # Include file found, let's continue the sanity check.
54795    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
54796$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
54797
54798    # Reset to default value
54799    FREETYPE_BASE_NAME=freetype
54800    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54801    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
54802      if test "x$OPENJDK_TARGET_OS" = xmacosx \
54803          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
54804        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
54805        # for the .6 version explicitly.
54806        FREETYPE_BASE_NAME=freetype.6
54807        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
54808        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
54809$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
54810      else
54811        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
54812$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
54813        FOUND_FREETYPE=no
54814      fi
54815    else
54816      if test "x$OPENJDK_TARGET_OS" = xwindows; then
54817        # On Windows, we will need both .lib and .dll file.
54818        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
54819          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
54820$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
54821          FOUND_FREETYPE=no
54822        fi
54823      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
54824          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
54825        # Found lib in isa dir, use that instead.
54826        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
54827        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
54828$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
54829      fi
54830    fi
54831  fi
54832
54833  if test "x$FOUND_FREETYPE" = xyes; then
54834
54835  # Only process if variable expands to non-empty
54836
54837  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
54838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54839
54840  # Input might be given as Windows format, start by converting to
54841  # unix format.
54842  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54843  new_path=`$CYGPATH -u "$path"`
54844
54845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54848  # "foo.exe" is OK but "foo" is an error.
54849  #
54850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54851  # It is also a way to make sure we got the proper file name for the real test later on.
54852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54853  if test "x$test_shortpath" = x; then
54854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54855$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54856    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
54857  fi
54858
54859  # Call helper function which possibly converts this using DOS-style short mode.
54860  # If so, the updated path is stored in $new_path.
54861
54862  input_path="$new_path"
54863  # Check if we need to convert this using DOS-style short mode. If the path
54864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54865  # take no chances and rewrite it.
54866  # Note: m4 eats our [], so we need to use [ and ] instead.
54867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54868  if test "x$has_forbidden_chars" != x; then
54869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54873      # Going to short mode and back again did indeed matter. Since short mode is
54874      # case insensitive, let's make it lowercase to improve readability.
54875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54876      # Now convert it back to Unix-style (cygpath)
54877      input_path=`$CYGPATH -u "$shortmode_path"`
54878      new_path="$input_path"
54879    fi
54880  fi
54881
54882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54883  if test "x$test_cygdrive_prefix" = x; then
54884    # As a simple fix, exclude /usr/bin since it's not a real path.
54885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54887      # a path prefixed by /cygdrive for fixpath to work.
54888      new_path="$CYGWIN_ROOT_PATH$input_path"
54889    fi
54890  fi
54891
54892
54893  if test "x$path" != "x$new_path"; then
54894    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54896$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54897  fi
54898
54899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54900
54901  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54902  has_colon=`$ECHO $path | $GREP ^.:`
54903  new_path="$path"
54904  if test "x$has_colon" = x; then
54905    # Not in mixed or Windows style, start by that.
54906    new_path=`cmd //c echo $path`
54907  fi
54908
54909
54910  input_path="$new_path"
54911  # Check if we need to convert this using DOS-style short mode. If the path
54912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54913  # take no chances and rewrite it.
54914  # Note: m4 eats our [], so we need to use [ and ] instead.
54915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54916  if test "x$has_forbidden_chars" != x; then
54917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54919  fi
54920
54921
54922  windows_path="$new_path"
54923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54924    unix_path=`$CYGPATH -u "$windows_path"`
54925    new_path="$unix_path"
54926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54928    new_path="$unix_path"
54929  fi
54930
54931  if test "x$path" != "x$new_path"; then
54932    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
54933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
54934$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
54935  fi
54936
54937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54939
54940    else
54941      # We're on a unix platform. Hooray! :)
54942      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
54943      has_space=`$ECHO "$path" | $GREP " "`
54944      if test "x$has_space" != x; then
54945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
54946$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
54947        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54948      fi
54949
54950      # Use eval to expand a potential ~
54951      eval path="$path"
54952      if test ! -f "$path" && test ! -d "$path"; then
54953        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
54954      fi
54955
54956      if test -d "$path"; then
54957        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
54958      else
54959        dir="`$DIRNAME "$path"`"
54960        base="`$BASENAME "$path"`"
54961        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
54962      fi
54963    fi
54964  fi
54965
54966
54967  # Only process if variable expands to non-empty
54968
54969  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
54970    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54971
54972  # Input might be given as Windows format, start by converting to
54973  # unix format.
54974  path="$POTENTIAL_FREETYPE_LIB_PATH"
54975  new_path=`$CYGPATH -u "$path"`
54976
54977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54980  # "foo.exe" is OK but "foo" is an error.
54981  #
54982  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54983  # It is also a way to make sure we got the proper file name for the real test later on.
54984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54985  if test "x$test_shortpath" = x; then
54986    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
54987$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
54988    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
54989  fi
54990
54991  # Call helper function which possibly converts this using DOS-style short mode.
54992  # If so, the updated path is stored in $new_path.
54993
54994  input_path="$new_path"
54995  # Check if we need to convert this using DOS-style short mode. If the path
54996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54997  # take no chances and rewrite it.
54998  # Note: m4 eats our [], so we need to use [ and ] instead.
54999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55000  if test "x$has_forbidden_chars" != x; then
55001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55005      # Going to short mode and back again did indeed matter. Since short mode is
55006      # case insensitive, let's make it lowercase to improve readability.
55007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55008      # Now convert it back to Unix-style (cygpath)
55009      input_path=`$CYGPATH -u "$shortmode_path"`
55010      new_path="$input_path"
55011    fi
55012  fi
55013
55014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55015  if test "x$test_cygdrive_prefix" = x; then
55016    # As a simple fix, exclude /usr/bin since it's not a real path.
55017    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55019      # a path prefixed by /cygdrive for fixpath to work.
55020      new_path="$CYGWIN_ROOT_PATH$input_path"
55021    fi
55022  fi
55023
55024
55025  if test "x$path" != "x$new_path"; then
55026    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55028$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55029  fi
55030
55031    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55032
55033  path="$POTENTIAL_FREETYPE_LIB_PATH"
55034  has_colon=`$ECHO $path | $GREP ^.:`
55035  new_path="$path"
55036  if test "x$has_colon" = x; then
55037    # Not in mixed or Windows style, start by that.
55038    new_path=`cmd //c echo $path`
55039  fi
55040
55041
55042  input_path="$new_path"
55043  # Check if we need to convert this using DOS-style short mode. If the path
55044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55045  # take no chances and rewrite it.
55046  # Note: m4 eats our [], so we need to use [ and ] instead.
55047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55048  if test "x$has_forbidden_chars" != x; then
55049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55051  fi
55052
55053
55054  windows_path="$new_path"
55055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55056    unix_path=`$CYGPATH -u "$windows_path"`
55057    new_path="$unix_path"
55058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55060    new_path="$unix_path"
55061  fi
55062
55063  if test "x$path" != "x$new_path"; then
55064    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55066$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55067  fi
55068
55069  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55070  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55071
55072    else
55073      # We're on a unix platform. Hooray! :)
55074      path="$POTENTIAL_FREETYPE_LIB_PATH"
55075      has_space=`$ECHO "$path" | $GREP " "`
55076      if test "x$has_space" != x; then
55077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55078$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55079        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55080      fi
55081
55082      # Use eval to expand a potential ~
55083      eval path="$path"
55084      if test ! -f "$path" && test ! -d "$path"; then
55085        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55086      fi
55087
55088      if test -d "$path"; then
55089        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55090      else
55091        dir="`$DIRNAME "$path"`"
55092        base="`$BASENAME "$path"`"
55093        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55094      fi
55095    fi
55096  fi
55097
55098
55099    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55100    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55101$as_echo_n "checking for freetype includes... " >&6; }
55102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55103$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55104    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55106$as_echo_n "checking for freetype libraries... " >&6; }
55107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55108$as_echo "$FREETYPE_LIB_PATH" >&6; }
55109  fi
55110
55111              if test "x$FOUND_FREETYPE" != xyes; then
55112
55113  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
55114  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
55115  METHOD="well-known location"
55116
55117  # Let's start with an optimistic view of the world :-)
55118  FOUND_FREETYPE=yes
55119
55120  # First look for the canonical freetype main include file ft2build.h.
55121  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55122    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
55123    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
55124    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
55125      # Fail.
55126      FOUND_FREETYPE=no
55127    fi
55128  fi
55129
55130  if test "x$FOUND_FREETYPE" = xyes; then
55131    # Include file found, let's continue the sanity check.
55132    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
55133$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
55134
55135    # Reset to default value
55136    FREETYPE_BASE_NAME=freetype
55137    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55138    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
55139      if test "x$OPENJDK_TARGET_OS" = xmacosx \
55140          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
55141        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
55142        # for the .6 version explicitly.
55143        FREETYPE_BASE_NAME=freetype.6
55144        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
55145        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
55146$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
55147      else
55148        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
55149$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
55150        FOUND_FREETYPE=no
55151      fi
55152    else
55153      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55154        # On Windows, we will need both .lib and .dll file.
55155        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
55156          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
55157$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
55158          FOUND_FREETYPE=no
55159        fi
55160      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
55161          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
55162        # Found lib in isa dir, use that instead.
55163        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
55164        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
55165$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
55166      fi
55167    fi
55168  fi
55169
55170  if test "x$FOUND_FREETYPE" = xyes; then
55171
55172  # Only process if variable expands to non-empty
55173
55174  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
55175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55176
55177  # Input might be given as Windows format, start by converting to
55178  # unix format.
55179  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55180  new_path=`$CYGPATH -u "$path"`
55181
55182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55185  # "foo.exe" is OK but "foo" is an error.
55186  #
55187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55188  # It is also a way to make sure we got the proper file name for the real test later on.
55189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55190  if test "x$test_shortpath" = x; then
55191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55192$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55193    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
55194  fi
55195
55196  # Call helper function which possibly converts this using DOS-style short mode.
55197  # If so, the updated path is stored in $new_path.
55198
55199  input_path="$new_path"
55200  # Check if we need to convert this using DOS-style short mode. If the path
55201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55202  # take no chances and rewrite it.
55203  # Note: m4 eats our [], so we need to use [ and ] instead.
55204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55205  if test "x$has_forbidden_chars" != x; then
55206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55210      # Going to short mode and back again did indeed matter. Since short mode is
55211      # case insensitive, let's make it lowercase to improve readability.
55212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55213      # Now convert it back to Unix-style (cygpath)
55214      input_path=`$CYGPATH -u "$shortmode_path"`
55215      new_path="$input_path"
55216    fi
55217  fi
55218
55219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55220  if test "x$test_cygdrive_prefix" = x; then
55221    # As a simple fix, exclude /usr/bin since it's not a real path.
55222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55224      # a path prefixed by /cygdrive for fixpath to work.
55225      new_path="$CYGWIN_ROOT_PATH$input_path"
55226    fi
55227  fi
55228
55229
55230  if test "x$path" != "x$new_path"; then
55231    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55233$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55234  fi
55235
55236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55237
55238  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55239  has_colon=`$ECHO $path | $GREP ^.:`
55240  new_path="$path"
55241  if test "x$has_colon" = x; then
55242    # Not in mixed or Windows style, start by that.
55243    new_path=`cmd //c echo $path`
55244  fi
55245
55246
55247  input_path="$new_path"
55248  # Check if we need to convert this using DOS-style short mode. If the path
55249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55250  # take no chances and rewrite it.
55251  # Note: m4 eats our [], so we need to use [ and ] instead.
55252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55253  if test "x$has_forbidden_chars" != x; then
55254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55256  fi
55257
55258
55259  windows_path="$new_path"
55260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55261    unix_path=`$CYGPATH -u "$windows_path"`
55262    new_path="$unix_path"
55263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55265    new_path="$unix_path"
55266  fi
55267
55268  if test "x$path" != "x$new_path"; then
55269    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
55270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55271$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55272  fi
55273
55274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55276
55277    else
55278      # We're on a unix platform. Hooray! :)
55279      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55280      has_space=`$ECHO "$path" | $GREP " "`
55281      if test "x$has_space" != x; then
55282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55283$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55285      fi
55286
55287      # Use eval to expand a potential ~
55288      eval path="$path"
55289      if test ! -f "$path" && test ! -d "$path"; then
55290        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55291      fi
55292
55293      if test -d "$path"; then
55294        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55295      else
55296        dir="`$DIRNAME "$path"`"
55297        base="`$BASENAME "$path"`"
55298        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55299      fi
55300    fi
55301  fi
55302
55303
55304  # Only process if variable expands to non-empty
55305
55306  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
55307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55308
55309  # Input might be given as Windows format, start by converting to
55310  # unix format.
55311  path="$POTENTIAL_FREETYPE_LIB_PATH"
55312  new_path=`$CYGPATH -u "$path"`
55313
55314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55317  # "foo.exe" is OK but "foo" is an error.
55318  #
55319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55320  # It is also a way to make sure we got the proper file name for the real test later on.
55321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55322  if test "x$test_shortpath" = x; then
55323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55324$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55325    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
55326  fi
55327
55328  # Call helper function which possibly converts this using DOS-style short mode.
55329  # If so, the updated path is stored in $new_path.
55330
55331  input_path="$new_path"
55332  # Check if we need to convert this using DOS-style short mode. If the path
55333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55334  # take no chances and rewrite it.
55335  # Note: m4 eats our [], so we need to use [ and ] instead.
55336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55337  if test "x$has_forbidden_chars" != x; then
55338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55342      # Going to short mode and back again did indeed matter. Since short mode is
55343      # case insensitive, let's make it lowercase to improve readability.
55344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55345      # Now convert it back to Unix-style (cygpath)
55346      input_path=`$CYGPATH -u "$shortmode_path"`
55347      new_path="$input_path"
55348    fi
55349  fi
55350
55351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55352  if test "x$test_cygdrive_prefix" = x; then
55353    # As a simple fix, exclude /usr/bin since it's not a real path.
55354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55356      # a path prefixed by /cygdrive for fixpath to work.
55357      new_path="$CYGWIN_ROOT_PATH$input_path"
55358    fi
55359  fi
55360
55361
55362  if test "x$path" != "x$new_path"; then
55363    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55365$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55366  fi
55367
55368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55369
55370  path="$POTENTIAL_FREETYPE_LIB_PATH"
55371  has_colon=`$ECHO $path | $GREP ^.:`
55372  new_path="$path"
55373  if test "x$has_colon" = x; then
55374    # Not in mixed or Windows style, start by that.
55375    new_path=`cmd //c echo $path`
55376  fi
55377
55378
55379  input_path="$new_path"
55380  # Check if we need to convert this using DOS-style short mode. If the path
55381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55382  # take no chances and rewrite it.
55383  # Note: m4 eats our [], so we need to use [ and ] instead.
55384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55385  if test "x$has_forbidden_chars" != x; then
55386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55388  fi
55389
55390
55391  windows_path="$new_path"
55392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55393    unix_path=`$CYGPATH -u "$windows_path"`
55394    new_path="$unix_path"
55395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55397    new_path="$unix_path"
55398  fi
55399
55400  if test "x$path" != "x$new_path"; then
55401    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
55402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
55403$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55404  fi
55405
55406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55408
55409    else
55410      # We're on a unix platform. Hooray! :)
55411      path="$POTENTIAL_FREETYPE_LIB_PATH"
55412      has_space=`$ECHO "$path" | $GREP " "`
55413      if test "x$has_space" != x; then
55414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55415$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55417      fi
55418
55419      # Use eval to expand a potential ~
55420      eval path="$path"
55421      if test ! -f "$path" && test ! -d "$path"; then
55422        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55423      fi
55424
55425      if test -d "$path"; then
55426        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55427      else
55428        dir="`$DIRNAME "$path"`"
55429        base="`$BASENAME "$path"`"
55430        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55431      fi
55432    fi
55433  fi
55434
55435
55436    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
55437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
55438$as_echo_n "checking for freetype includes... " >&6; }
55439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
55440$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
55441    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
55442    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
55443$as_echo_n "checking for freetype libraries... " >&6; }
55444    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
55445$as_echo "$FREETYPE_LIB_PATH" >&6; }
55446  fi
55447
55448              fi
55449            fi
55450          fi
55451        fi
55452      fi # end check in well-known locations
55453
55454      if test "x$FOUND_FREETYPE" != xyes; then
55455
55456  # Print a helpful message on how to acquire the necessary build dependency.
55457  # freetype is the help tag: freetype, cups, alsa etc
55458  MISSING_DEPENDENCY=freetype
55459
55460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55461    cygwin_help $MISSING_DEPENDENCY
55462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55463    msys_help $MISSING_DEPENDENCY
55464  else
55465    PKGHANDLER_COMMAND=
55466
55467    case $PKGHANDLER in
55468      apt-get)
55469        apt_help     $MISSING_DEPENDENCY ;;
55470      yum)
55471        yum_help     $MISSING_DEPENDENCY ;;
55472      port)
55473        port_help    $MISSING_DEPENDENCY ;;
55474      pkgutil)
55475        pkgutil_help $MISSING_DEPENDENCY ;;
55476      pkgadd)
55477        pkgadd_help  $MISSING_DEPENDENCY ;;
55478    esac
55479
55480    if test "x$PKGHANDLER_COMMAND" != x; then
55481      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55482    fi
55483  fi
55484
55485        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
55486      fi
55487    fi # end user specified settings
55488
55489    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
55490    if test "x$FREETYPE_CFLAGS" = x; then
55491
55492  # Only process if variable expands to non-empty
55493
55494  if test "x$FREETYPE_INCLUDE_PATH" != x; then
55495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55496
55497  # Input might be given as Windows format, start by converting to
55498  # unix format.
55499  path="$FREETYPE_INCLUDE_PATH"
55500  new_path=`$CYGPATH -u "$path"`
55501
55502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55505  # "foo.exe" is OK but "foo" is an error.
55506  #
55507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55508  # It is also a way to make sure we got the proper file name for the real test later on.
55509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55510  if test "x$test_shortpath" = x; then
55511    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55512$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55513    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
55514  fi
55515
55516  # Call helper function which possibly converts this using DOS-style short mode.
55517  # If so, the updated path is stored in $new_path.
55518
55519  input_path="$new_path"
55520  # Check if we need to convert this using DOS-style short mode. If the path
55521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55522  # take no chances and rewrite it.
55523  # Note: m4 eats our [], so we need to use [ and ] instead.
55524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55525  if test "x$has_forbidden_chars" != x; then
55526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55530      # Going to short mode and back again did indeed matter. Since short mode is
55531      # case insensitive, let's make it lowercase to improve readability.
55532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55533      # Now convert it back to Unix-style (cygpath)
55534      input_path=`$CYGPATH -u "$shortmode_path"`
55535      new_path="$input_path"
55536    fi
55537  fi
55538
55539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55540  if test "x$test_cygdrive_prefix" = x; then
55541    # As a simple fix, exclude /usr/bin since it's not a real path.
55542    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55544      # a path prefixed by /cygdrive for fixpath to work.
55545      new_path="$CYGWIN_ROOT_PATH$input_path"
55546    fi
55547  fi
55548
55549
55550  if test "x$path" != "x$new_path"; then
55551    FREETYPE_INCLUDE_PATH="$new_path"
55552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55553$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55554  fi
55555
55556    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55557
55558  path="$FREETYPE_INCLUDE_PATH"
55559  has_colon=`$ECHO $path | $GREP ^.:`
55560  new_path="$path"
55561  if test "x$has_colon" = x; then
55562    # Not in mixed or Windows style, start by that.
55563    new_path=`cmd //c echo $path`
55564  fi
55565
55566
55567  input_path="$new_path"
55568  # Check if we need to convert this using DOS-style short mode. If the path
55569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55570  # take no chances and rewrite it.
55571  # Note: m4 eats our [], so we need to use [ and ] instead.
55572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55573  if test "x$has_forbidden_chars" != x; then
55574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55575    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55576  fi
55577
55578
55579  windows_path="$new_path"
55580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55581    unix_path=`$CYGPATH -u "$windows_path"`
55582    new_path="$unix_path"
55583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55584    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55585    new_path="$unix_path"
55586  fi
55587
55588  if test "x$path" != "x$new_path"; then
55589    FREETYPE_INCLUDE_PATH="$new_path"
55590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
55591$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
55592  fi
55593
55594  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55595  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55596
55597    else
55598      # We're on a unix platform. Hooray! :)
55599      path="$FREETYPE_INCLUDE_PATH"
55600      has_space=`$ECHO "$path" | $GREP " "`
55601      if test "x$has_space" != x; then
55602        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
55603$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
55604        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55605      fi
55606
55607      # Use eval to expand a potential ~
55608      eval path="$path"
55609      if test ! -f "$path" && test ! -d "$path"; then
55610        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55611      fi
55612
55613      if test -d "$path"; then
55614        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
55615      else
55616        dir="`$DIRNAME "$path"`"
55617        base="`$BASENAME "$path"`"
55618        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55619      fi
55620    fi
55621  fi
55622
55623      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
55624        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
55625      else
55626        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
55627      fi
55628    fi
55629
55630    if test "x$FREETYPE_LIBS" = x; then
55631
55632  # Only process if variable expands to non-empty
55633
55634  if test "x$FREETYPE_LIB_PATH" != x; then
55635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55636
55637  # Input might be given as Windows format, start by converting to
55638  # unix format.
55639  path="$FREETYPE_LIB_PATH"
55640  new_path=`$CYGPATH -u "$path"`
55641
55642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55645  # "foo.exe" is OK but "foo" is an error.
55646  #
55647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55648  # It is also a way to make sure we got the proper file name for the real test later on.
55649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55650  if test "x$test_shortpath" = x; then
55651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55652$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55653    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
55654  fi
55655
55656  # Call helper function which possibly converts this using DOS-style short mode.
55657  # If so, the updated path is stored in $new_path.
55658
55659  input_path="$new_path"
55660  # Check if we need to convert this using DOS-style short mode. If the path
55661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55662  # take no chances and rewrite it.
55663  # Note: m4 eats our [], so we need to use [ and ] instead.
55664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55665  if test "x$has_forbidden_chars" != x; then
55666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55670      # Going to short mode and back again did indeed matter. Since short mode is
55671      # case insensitive, let's make it lowercase to improve readability.
55672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55673      # Now convert it back to Unix-style (cygpath)
55674      input_path=`$CYGPATH -u "$shortmode_path"`
55675      new_path="$input_path"
55676    fi
55677  fi
55678
55679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55680  if test "x$test_cygdrive_prefix" = x; then
55681    # As a simple fix, exclude /usr/bin since it's not a real path.
55682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55684      # a path prefixed by /cygdrive for fixpath to work.
55685      new_path="$CYGWIN_ROOT_PATH$input_path"
55686    fi
55687  fi
55688
55689
55690  if test "x$path" != "x$new_path"; then
55691    FREETYPE_LIB_PATH="$new_path"
55692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
55693$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55694  fi
55695
55696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55697
55698  path="$FREETYPE_LIB_PATH"
55699  has_colon=`$ECHO $path | $GREP ^.:`
55700  new_path="$path"
55701  if test "x$has_colon" = x; then
55702    # Not in mixed or Windows style, start by that.
55703    new_path=`cmd //c echo $path`
55704  fi
55705
55706
55707  input_path="$new_path"
55708  # Check if we need to convert this using DOS-style short mode. If the path
55709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55710  # take no chances and rewrite it.
55711  # Note: m4 eats our [], so we need to use [ and ] instead.
55712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55713  if test "x$has_forbidden_chars" != x; then
55714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55716  fi
55717
55718
55719  windows_path="$new_path"
55720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55721    unix_path=`$CYGPATH -u "$windows_path"`
55722    new_path="$unix_path"
55723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55725    new_path="$unix_path"
55726  fi
55727
55728  if test "x$path" != "x$new_path"; then
55729    FREETYPE_LIB_PATH="$new_path"
55730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
55731$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
55732  fi
55733
55734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55736
55737    else
55738      # We're on a unix platform. Hooray! :)
55739      path="$FREETYPE_LIB_PATH"
55740      has_space=`$ECHO "$path" | $GREP " "`
55741      if test "x$has_space" != x; then
55742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
55743$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
55744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55745      fi
55746
55747      # Use eval to expand a potential ~
55748      eval path="$path"
55749      if test ! -f "$path" && test ! -d "$path"; then
55750        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
55751      fi
55752
55753      if test -d "$path"; then
55754        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
55755      else
55756        dir="`$DIRNAME "$path"`"
55757        base="`$BASENAME "$path"`"
55758        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
55759      fi
55760    fi
55761  fi
55762
55763      if test "x$OPENJDK_TARGET_OS" = xwindows; then
55764        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
55765      else
55766        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
55767      fi
55768    fi
55769
55770    # Try to compile it
55771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
55772$as_echo_n "checking if we can compile and link with freetype... " >&6; }
55773    ac_ext=cpp
55774ac_cpp='$CXXCPP $CPPFLAGS'
55775ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55776ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55777ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55778
55779    PREV_CXXCFLAGS="$CXXFLAGS"
55780    PREV_LIBS="$LIBS"
55781    PREV_CXX="$CXX"
55782    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
55783    LIBS="$LIBS $FREETYPE_LIBS"
55784    CXX="$FIXPATH $CXX"
55785    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55786/* end confdefs.h.  */
55787
55788          #include<ft2build.h>
55789          #include FT_FREETYPE_H
55790          int main () {
55791            FT_Init_FreeType(NULL);
55792            return 0;
55793          }
55794
55795_ACEOF
55796if ac_fn_cxx_try_link "$LINENO"; then :
55797
55798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55799$as_echo "yes" >&6; }
55800
55801else
55802
55803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55804$as_echo "no" >&6; }
55805          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
55806$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
55807          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
55808$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
55809
55810
55811  # Print a helpful message on how to acquire the necessary build dependency.
55812  # freetype is the help tag: freetype, cups, alsa etc
55813  MISSING_DEPENDENCY=freetype
55814
55815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55816    cygwin_help $MISSING_DEPENDENCY
55817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55818    msys_help $MISSING_DEPENDENCY
55819  else
55820    PKGHANDLER_COMMAND=
55821
55822    case $PKGHANDLER in
55823      apt-get)
55824        apt_help     $MISSING_DEPENDENCY ;;
55825      yum)
55826        yum_help     $MISSING_DEPENDENCY ;;
55827      port)
55828        port_help    $MISSING_DEPENDENCY ;;
55829      pkgutil)
55830        pkgutil_help $MISSING_DEPENDENCY ;;
55831      pkgadd)
55832        pkgadd_help  $MISSING_DEPENDENCY ;;
55833    esac
55834
55835    if test "x$PKGHANDLER_COMMAND" != x; then
55836      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55837    fi
55838  fi
55839
55840
55841          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
55842
55843
55844fi
55845rm -f core conftest.err conftest.$ac_objext \
55846    conftest$ac_exeext conftest.$ac_ext
55847    CXXCFLAGS="$PREV_CXXFLAGS"
55848    LIBS="$PREV_LIBS"
55849    CXX="$PREV_CXX"
55850    ac_ext=cpp
55851ac_cpp='$CXXCPP $CPPFLAGS'
55852ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55853ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55854ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55855
55856
55857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
55858$as_echo_n "checking if we should bundle freetype... " >&6; }
55859    if test "x$BUNDLE_FREETYPE" = xyes; then
55860      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
55861    fi
55862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
55863$as_echo "$BUNDLE_FREETYPE" >&6; }
55864
55865  fi # end freetype needed
55866
55867
55868
55869
55870
55871
55872
55873# Check whether --with-alsa was given.
55874if test "${with_alsa+set}" = set; then :
55875  withval=$with_alsa;
55876fi
55877
55878
55879# Check whether --with-alsa-include was given.
55880if test "${with_alsa_include+set}" = set; then :
55881  withval=$with_alsa_include;
55882fi
55883
55884
55885# Check whether --with-alsa-lib was given.
55886if test "${with_alsa_lib+set}" = set; then :
55887  withval=$with_alsa_lib;
55888fi
55889
55890
55891  if test "x$NEEDS_LIB_ALSA" = xfalse; then
55892    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
55893        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
55894        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
55895      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
55896$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
55897    fi
55898    ALSA_CFLAGS=
55899    ALSA_LIBS=
55900  else
55901    ALSA_FOUND=no
55902
55903    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
55904      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
55905    fi
55906
55907    if test "x${with_alsa}" != x; then
55908      ALSA_LIBS="-L${with_alsa}/lib -lasound"
55909      ALSA_CFLAGS="-I${with_alsa}/include"
55910      ALSA_FOUND=yes
55911    fi
55912    if test "x${with_alsa_include}" != x; then
55913      ALSA_CFLAGS="-I${with_alsa_include}"
55914      ALSA_FOUND=yes
55915    fi
55916    if test "x${with_alsa_lib}" != x; then
55917      ALSA_LIBS="-L${with_alsa_lib} -lasound"
55918      ALSA_FOUND=yes
55919    fi
55920    # Do not try pkg-config if we have a sysroot set.
55921    if test "x$SYSROOT" = x; then
55922      if test "x$ALSA_FOUND" = xno; then
55923
55924pkg_failed=no
55925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
55926$as_echo_n "checking for ALSA... " >&6; }
55927
55928if test -n "$ALSA_CFLAGS"; then
55929    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
55930 elif test -n "$PKG_CONFIG"; then
55931    if test -n "$PKG_CONFIG" && \
55932    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55933  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55934  ac_status=$?
55935  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55936  test $ac_status = 0; }; then
55937  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
55938else
55939  pkg_failed=yes
55940fi
55941 else
55942    pkg_failed=untried
55943fi
55944if test -n "$ALSA_LIBS"; then
55945    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
55946 elif test -n "$PKG_CONFIG"; then
55947    if test -n "$PKG_CONFIG" && \
55948    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
55949  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
55950  ac_status=$?
55951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55952  test $ac_status = 0; }; then
55953  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
55954else
55955  pkg_failed=yes
55956fi
55957 else
55958    pkg_failed=untried
55959fi
55960
55961
55962
55963if test $pkg_failed = yes; then
55964
55965if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
55966        _pkg_short_errors_supported=yes
55967else
55968        _pkg_short_errors_supported=no
55969fi
55970        if test $_pkg_short_errors_supported = yes; then
55971	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
55972        else
55973	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
55974        fi
55975	# Put the nasty error message in config.log where it belongs
55976	echo "$ALSA_PKG_ERRORS" >&5
55977
55978	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55979$as_echo "no" >&6; }
55980                ALSA_FOUND=no
55981elif test $pkg_failed = untried; then
55982	ALSA_FOUND=no
55983else
55984	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
55985	ALSA_LIBS=$pkg_cv_ALSA_LIBS
55986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55987$as_echo "yes" >&6; }
55988	ALSA_FOUND=yes
55989fi
55990      fi
55991    fi
55992    if test "x$ALSA_FOUND" = xno; then
55993      for ac_header in alsa/asoundlib.h
55994do :
55995  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
55996if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
55997  cat >>confdefs.h <<_ACEOF
55998#define HAVE_ALSA_ASOUNDLIB_H 1
55999_ACEOF
56000
56001            ALSA_FOUND=yes
56002            ALSA_CFLAGS=-Iignoreme
56003            ALSA_LIBS=-lasound
56004            DEFAULT_ALSA=yes
56005
56006else
56007  ALSA_FOUND=no
56008
56009fi
56010
56011done
56012
56013    fi
56014    if test "x$ALSA_FOUND" = xno; then
56015
56016  # Print a helpful message on how to acquire the necessary build dependency.
56017  # alsa is the help tag: freetype, cups, alsa etc
56018  MISSING_DEPENDENCY=alsa
56019
56020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56021    cygwin_help $MISSING_DEPENDENCY
56022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56023    msys_help $MISSING_DEPENDENCY
56024  else
56025    PKGHANDLER_COMMAND=
56026
56027    case $PKGHANDLER in
56028      apt-get)
56029        apt_help     $MISSING_DEPENDENCY ;;
56030      yum)
56031        yum_help     $MISSING_DEPENDENCY ;;
56032      port)
56033        port_help    $MISSING_DEPENDENCY ;;
56034      pkgutil)
56035        pkgutil_help $MISSING_DEPENDENCY ;;
56036      pkgadd)
56037        pkgadd_help  $MISSING_DEPENDENCY ;;
56038    esac
56039
56040    if test "x$PKGHANDLER_COMMAND" != x; then
56041      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56042    fi
56043  fi
56044
56045      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
56046    fi
56047  fi
56048
56049
56050
56051
56052
56053
56054# Check whether --with-libffi was given.
56055if test "${with_libffi+set}" = set; then :
56056  withval=$with_libffi;
56057fi
56058
56059
56060# Check whether --with-libffi-include was given.
56061if test "${with_libffi_include+set}" = set; then :
56062  withval=$with_libffi_include;
56063fi
56064
56065
56066# Check whether --with-libffi-lib was given.
56067if test "${with_libffi_lib+set}" = set; then :
56068  withval=$with_libffi_lib;
56069fi
56070
56071
56072  if test "x$NEEDS_LIB_FFI" = xfalse; then
56073    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
56074        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
56075        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
56076      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
56077$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
56078    fi
56079    LIBFFI_CFLAGS=
56080    LIBFFI_LIBS=
56081  else
56082    LIBFFI_FOUND=no
56083
56084    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
56085      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
56086    fi
56087
56088    if test "x${with_libffi}" != x; then
56089      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
56090      LIBFFI_CFLAGS="-I${with_libffi}/include"
56091      LIBFFI_FOUND=yes
56092    fi
56093    if test "x${with_libffi_include}" != x; then
56094      LIBFFI_CFLAGS="-I${with_libffi_include}"
56095      LIBFFI_FOUND=yes
56096    fi
56097    if test "x${with_libffi_lib}" != x; then
56098      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
56099      LIBFFI_FOUND=yes
56100    fi
56101    # Do not try pkg-config if we have a sysroot set.
56102    if test "x$SYSROOT" = x; then
56103      if test "x$LIBFFI_FOUND" = xno; then
56104        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
56105
56106pkg_failed=no
56107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
56108$as_echo_n "checking for LIBFFI... " >&6; }
56109
56110if test -n "$LIBFFI_CFLAGS"; then
56111    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
56112 elif test -n "$PKG_CONFIG"; then
56113    if test -n "$PKG_CONFIG" && \
56114    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
56115  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
56116  ac_status=$?
56117  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56118  test $ac_status = 0; }; then
56119  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
56120else
56121  pkg_failed=yes
56122fi
56123 else
56124    pkg_failed=untried
56125fi
56126if test -n "$LIBFFI_LIBS"; then
56127    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
56128 elif test -n "$PKG_CONFIG"; then
56129    if test -n "$PKG_CONFIG" && \
56130    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
56131  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
56132  ac_status=$?
56133  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56134  test $ac_status = 0; }; then
56135  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
56136else
56137  pkg_failed=yes
56138fi
56139 else
56140    pkg_failed=untried
56141fi
56142
56143
56144
56145if test $pkg_failed = yes; then
56146
56147if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56148        _pkg_short_errors_supported=yes
56149else
56150        _pkg_short_errors_supported=no
56151fi
56152        if test $_pkg_short_errors_supported = yes; then
56153	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
56154        else
56155	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
56156        fi
56157	# Put the nasty error message in config.log where it belongs
56158	echo "$LIBFFI_PKG_ERRORS" >&5
56159
56160	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56161$as_echo "no" >&6; }
56162                LIBFFI_FOUND=no
56163elif test $pkg_failed = untried; then
56164	LIBFFI_FOUND=no
56165else
56166	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
56167	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
56168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56169$as_echo "yes" >&6; }
56170	LIBFFI_FOUND=yes
56171fi
56172      fi
56173    fi
56174    if test "x$LIBFFI_FOUND" = xno; then
56175      for ac_header in ffi.h
56176do :
56177  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
56178if test "x$ac_cv_header_ffi_h" = xyes; then :
56179  cat >>confdefs.h <<_ACEOF
56180#define HAVE_FFI_H 1
56181_ACEOF
56182
56183            LIBFFI_FOUND=yes
56184            LIBFFI_CFLAGS=
56185            LIBFFI_LIBS=-lffi
56186
56187else
56188  LIBFFI_FOUND=no
56189
56190fi
56191
56192done
56193
56194    fi
56195    if test "x$LIBFFI_FOUND" = xno; then
56196
56197  # Print a helpful message on how to acquire the necessary build dependency.
56198  # ffi is the help tag: freetype, cups, alsa etc
56199  MISSING_DEPENDENCY=ffi
56200
56201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56202    cygwin_help $MISSING_DEPENDENCY
56203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56204    msys_help $MISSING_DEPENDENCY
56205  else
56206    PKGHANDLER_COMMAND=
56207
56208    case $PKGHANDLER in
56209      apt-get)
56210        apt_help     $MISSING_DEPENDENCY ;;
56211      yum)
56212        yum_help     $MISSING_DEPENDENCY ;;
56213      port)
56214        port_help    $MISSING_DEPENDENCY ;;
56215      pkgutil)
56216        pkgutil_help $MISSING_DEPENDENCY ;;
56217      pkgadd)
56218        pkgadd_help  $MISSING_DEPENDENCY ;;
56219    esac
56220
56221    if test "x$PKGHANDLER_COMMAND" != x; then
56222      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56223    fi
56224  fi
56225
56226      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
56227    fi
56228
56229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
56230$as_echo_n "checking if libffi works... " >&6; }
56231    ac_ext=c
56232ac_cpp='$CPP $CPPFLAGS'
56233ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56234ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56235ac_compiler_gnu=$ac_cv_c_compiler_gnu
56236
56237    OLD_CFLAGS="$CFLAGS"
56238    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
56239    OLD_LIBS="$LIBS"
56240    LIBS="$LIBS $LIBFFI_LIBS"
56241    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56242/* end confdefs.h.  */
56243#include <ffi.h>
56244int
56245main ()
56246{
56247
56248          ffi_call(NULL, NULL, NULL, NULL);
56249          return 0;
56250
56251  ;
56252  return 0;
56253}
56254_ACEOF
56255if ac_fn_c_try_link "$LINENO"; then :
56256  LIBFFI_WORKS=yes
56257else
56258  LIBFFI_WORKS=no
56259
56260fi
56261rm -f core conftest.err conftest.$ac_objext \
56262    conftest$ac_exeext conftest.$ac_ext
56263    CFLAGS="$OLD_CFLAGS"
56264    LIBS="$OLD_LIBS"
56265    ac_ext=cpp
56266ac_cpp='$CXXCPP $CPPFLAGS'
56267ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56268ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56269ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56270
56271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
56272$as_echo "$LIBFFI_WORKS" >&6; }
56273
56274    if test "x$LIBFFI_WORKS" = xno; then
56275
56276  # Print a helpful message on how to acquire the necessary build dependency.
56277  # ffi is the help tag: freetype, cups, alsa etc
56278  MISSING_DEPENDENCY=ffi
56279
56280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56281    cygwin_help $MISSING_DEPENDENCY
56282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56283    msys_help $MISSING_DEPENDENCY
56284  else
56285    PKGHANDLER_COMMAND=
56286
56287    case $PKGHANDLER in
56288      apt-get)
56289        apt_help     $MISSING_DEPENDENCY ;;
56290      yum)
56291        yum_help     $MISSING_DEPENDENCY ;;
56292      port)
56293        port_help    $MISSING_DEPENDENCY ;;
56294      pkgutil)
56295        pkgutil_help $MISSING_DEPENDENCY ;;
56296      pkgadd)
56297        pkgadd_help  $MISSING_DEPENDENCY ;;
56298    esac
56299
56300    if test "x$PKGHANDLER_COMMAND" != x; then
56301      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56302    fi
56303  fi
56304
56305      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
56306    fi
56307  fi
56308
56309
56310
56311
56312
56313  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
56314    # Extract the first word of "llvm-config", so it can be a program name with args.
56315set dummy llvm-config; ac_word=$2
56316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
56317$as_echo_n "checking for $ac_word... " >&6; }
56318if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
56319  $as_echo_n "(cached) " >&6
56320else
56321  if test -n "$LLVM_CONFIG"; then
56322  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
56323else
56324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
56325for as_dir in $PATH
56326do
56327  IFS=$as_save_IFS
56328  test -z "$as_dir" && as_dir=.
56329    for ac_exec_ext in '' $ac_executable_extensions; do
56330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
56331    ac_cv_prog_LLVM_CONFIG="llvm-config"
56332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
56333    break 2
56334  fi
56335done
56336  done
56337IFS=$as_save_IFS
56338
56339fi
56340fi
56341LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
56342if test -n "$LLVM_CONFIG"; then
56343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
56344$as_echo "$LLVM_CONFIG" >&6; }
56345else
56346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56347$as_echo "no" >&6; }
56348fi
56349
56350
56351
56352    if test "x$LLVM_CONFIG" != xllvm-config; then
56353      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
56354    fi
56355
56356    llvm_components="jit mcjit engine nativecodegen native"
56357    unset LLVM_CFLAGS
56358    for flag in $("$LLVM_CONFIG" --cxxflags); do
56359      if echo "${flag}" | grep -q '^-[ID]'; then
56360        if test "${flag}" != "-D_DEBUG" ; then
56361          if test "${LLVM_CFLAGS}" != "" ; then
56362            LLVM_CFLAGS="${LLVM_CFLAGS} "
56363          fi
56364          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
56365        fi
56366      fi
56367    done
56368    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
56369    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
56370
56371    unset LLVM_LDFLAGS
56372    for flag in $("${LLVM_CONFIG}" --ldflags); do
56373      if echo "${flag}" | grep -q '^-L'; then
56374        if test "${LLVM_LDFLAGS}" != ""; then
56375          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
56376        fi
56377        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
56378      fi
56379    done
56380
56381    unset LLVM_LIBS
56382    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
56383      if echo "${flag}" | grep -q '^-l'; then
56384        if test "${LLVM_LIBS}" != ""; then
56385          LLVM_LIBS="${LLVM_LIBS} "
56386        fi
56387        LLVM_LIBS="${LLVM_LIBS}${flag}"
56388      fi
56389    done
56390
56391
56392
56393
56394  fi
56395
56396
56397
56398# Check whether --with-libjpeg was given.
56399if test "${with_libjpeg+set}" = set; then :
56400  withval=$with_libjpeg;
56401fi
56402
56403
56404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
56405$as_echo_n "checking for which libjpeg to use... " >&6; }
56406  # default is bundled
56407  DEFAULT_LIBJPEG=bundled
56408  # if user didn't specify, use DEFAULT_LIBJPEG
56409  if test "x${with_libjpeg}" = "x"; then
56410    with_libjpeg=${DEFAULT_LIBJPEG}
56411  fi
56412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
56413$as_echo "${with_libjpeg}" >&6; }
56414
56415  if test "x${with_libjpeg}" = "xbundled"; then
56416    USE_EXTERNAL_LIBJPEG=false
56417  elif test "x${with_libjpeg}" = "xsystem"; then
56418    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
56419if test "x$ac_cv_header_jpeglib_h" = xyes; then :
56420
56421else
56422   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
56423fi
56424
56425
56426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
56427$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
56428if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
56429  $as_echo_n "(cached) " >&6
56430else
56431  ac_check_lib_save_LIBS=$LIBS
56432LIBS="-ljpeg  $LIBS"
56433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56434/* end confdefs.h.  */
56435
56436/* Override any GCC internal prototype to avoid an error.
56437   Use char because int might match the return type of a GCC
56438   builtin and then its argument prototype would still apply.  */
56439#ifdef __cplusplus
56440extern "C"
56441#endif
56442char jpeg_CreateDecompress ();
56443int
56444main ()
56445{
56446return jpeg_CreateDecompress ();
56447  ;
56448  return 0;
56449}
56450_ACEOF
56451if ac_fn_cxx_try_link "$LINENO"; then :
56452  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
56453else
56454  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
56455fi
56456rm -f core conftest.err conftest.$ac_objext \
56457    conftest$ac_exeext conftest.$ac_ext
56458LIBS=$ac_check_lib_save_LIBS
56459fi
56460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
56461$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
56462if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
56463  cat >>confdefs.h <<_ACEOF
56464#define HAVE_LIBJPEG 1
56465_ACEOF
56466
56467  LIBS="-ljpeg $LIBS"
56468
56469else
56470   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
56471fi
56472
56473
56474    USE_EXTERNAL_LIBJPEG=true
56475  else
56476    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
56477  fi
56478
56479
56480
56481
56482
56483# Check whether --with-giflib was given.
56484if test "${with_giflib+set}" = set; then :
56485  withval=$with_giflib;
56486fi
56487
56488
56489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
56490$as_echo_n "checking for which giflib to use... " >&6; }
56491  # default is bundled
56492  DEFAULT_GIFLIB=bundled
56493  # if user didn't specify, use DEFAULT_GIFLIB
56494  if test "x${with_giflib}" = "x"; then
56495    with_giflib=${DEFAULT_GIFLIB}
56496  fi
56497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
56498$as_echo "${with_giflib}" >&6; }
56499
56500  if test "x${with_giflib}" = "xbundled"; then
56501    USE_EXTERNAL_LIBGIF=false
56502  elif test "x${with_giflib}" = "xsystem"; then
56503    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
56504if test "x$ac_cv_header_gif_lib_h" = xyes; then :
56505
56506else
56507   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
56508fi
56509
56510
56511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
56512$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
56513if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
56514  $as_echo_n "(cached) " >&6
56515else
56516  ac_check_lib_save_LIBS=$LIBS
56517LIBS="-lgif  $LIBS"
56518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56519/* end confdefs.h.  */
56520
56521/* Override any GCC internal prototype to avoid an error.
56522   Use char because int might match the return type of a GCC
56523   builtin and then its argument prototype would still apply.  */
56524#ifdef __cplusplus
56525extern "C"
56526#endif
56527char DGifGetCode ();
56528int
56529main ()
56530{
56531return DGifGetCode ();
56532  ;
56533  return 0;
56534}
56535_ACEOF
56536if ac_fn_cxx_try_link "$LINENO"; then :
56537  ac_cv_lib_gif_DGifGetCode=yes
56538else
56539  ac_cv_lib_gif_DGifGetCode=no
56540fi
56541rm -f core conftest.err conftest.$ac_objext \
56542    conftest$ac_exeext conftest.$ac_ext
56543LIBS=$ac_check_lib_save_LIBS
56544fi
56545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
56546$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
56547if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
56548  cat >>confdefs.h <<_ACEOF
56549#define HAVE_LIBGIF 1
56550_ACEOF
56551
56552  LIBS="-lgif $LIBS"
56553
56554else
56555   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
56556fi
56557
56558
56559    USE_EXTERNAL_LIBGIF=true
56560  else
56561    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
56562  fi
56563
56564
56565
56566
56567
56568# Check whether --with-libpng was given.
56569if test "${with_libpng+set}" = set; then :
56570  withval=$with_libpng;
56571fi
56572
56573
56574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
56575$as_echo_n "checking for which libpng to use... " >&6; }
56576
56577  # default is bundled
56578  DEFAULT_LIBPNG=bundled
56579  # if user didn't specify, use DEFAULT_LIBPNG
56580  if test "x${with_libpng}" = "x"; then
56581      with_libpng=${DEFAULT_LIBPNG}
56582  fi
56583
56584  if test "x${with_libpng}" = "xbundled"; then
56585      USE_EXTERNAL_LIBPNG=false
56586      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56587$as_echo "bundled" >&6; }
56588  elif test "x${with_libpng}" = "xsystem"; then
56589
56590pkg_failed=no
56591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
56592$as_echo_n "checking for PNG... " >&6; }
56593
56594if test -n "$PNG_CFLAGS"; then
56595    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
56596 elif test -n "$PKG_CONFIG"; then
56597    if test -n "$PKG_CONFIG" && \
56598    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
56599  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
56600  ac_status=$?
56601  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56602  test $ac_status = 0; }; then
56603  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
56604else
56605  pkg_failed=yes
56606fi
56607 else
56608    pkg_failed=untried
56609fi
56610if test -n "$PNG_LIBS"; then
56611    pkg_cv_PNG_LIBS="$PNG_LIBS"
56612 elif test -n "$PKG_CONFIG"; then
56613    if test -n "$PKG_CONFIG" && \
56614    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
56615  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
56616  ac_status=$?
56617  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56618  test $ac_status = 0; }; then
56619  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
56620else
56621  pkg_failed=yes
56622fi
56623 else
56624    pkg_failed=untried
56625fi
56626
56627
56628
56629if test $pkg_failed = yes; then
56630
56631if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56632        _pkg_short_errors_supported=yes
56633else
56634        _pkg_short_errors_supported=no
56635fi
56636        if test $_pkg_short_errors_supported = yes; then
56637	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
56638        else
56639	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
56640        fi
56641	# Put the nasty error message in config.log where it belongs
56642	echo "$PNG_PKG_ERRORS" >&5
56643
56644	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56645$as_echo "no" >&6; }
56646                 LIBPNG_FOUND=no
56647elif test $pkg_failed = untried; then
56648	 LIBPNG_FOUND=no
56649else
56650	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
56651	PNG_LIBS=$pkg_cv_PNG_LIBS
56652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56653$as_echo "yes" >&6; }
56654	 LIBPNG_FOUND=yes
56655fi
56656      if test "x${LIBPNG_FOUND}" = "xyes"; then
56657          USE_EXTERNAL_LIBPNG=true
56658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56659$as_echo "system" >&6; }
56660      else
56661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
56662$as_echo "system not found" >&6; }
56663          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
56664      fi
56665  else
56666      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
56667  fi
56668
56669
56670
56671
56672
56673# Check whether --with-zlib was given.
56674if test "${with_zlib+set}" = set; then :
56675  withval=$with_zlib;
56676fi
56677
56678
56679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
56680$as_echo_n "checking for compress in -lz... " >&6; }
56681if ${ac_cv_lib_z_compress+:} false; then :
56682  $as_echo_n "(cached) " >&6
56683else
56684  ac_check_lib_save_LIBS=$LIBS
56685LIBS="-lz  $LIBS"
56686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56687/* end confdefs.h.  */
56688
56689/* Override any GCC internal prototype to avoid an error.
56690   Use char because int might match the return type of a GCC
56691   builtin and then its argument prototype would still apply.  */
56692#ifdef __cplusplus
56693extern "C"
56694#endif
56695char compress ();
56696int
56697main ()
56698{
56699return compress ();
56700  ;
56701  return 0;
56702}
56703_ACEOF
56704if ac_fn_cxx_try_link "$LINENO"; then :
56705  ac_cv_lib_z_compress=yes
56706else
56707  ac_cv_lib_z_compress=no
56708fi
56709rm -f core conftest.err conftest.$ac_objext \
56710    conftest$ac_exeext conftest.$ac_ext
56711LIBS=$ac_check_lib_save_LIBS
56712fi
56713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
56714$as_echo "$ac_cv_lib_z_compress" >&6; }
56715if test "x$ac_cv_lib_z_compress" = xyes; then :
56716   ZLIB_FOUND=yes
56717else
56718   ZLIB_FOUND=no
56719fi
56720
56721
56722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
56723$as_echo_n "checking for which zlib to use... " >&6; }
56724
56725  DEFAULT_ZLIB=bundled
56726  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
56727    # On macosx default is system...on others default is bundled
56728    DEFAULT_ZLIB=system
56729  fi
56730
56731  if test "x${ZLIB_FOUND}" != "xyes"; then
56732    # If we don't find any system...set default to bundled
56733    DEFAULT_ZLIB=bundled
56734  fi
56735
56736  # If user didn't specify, use DEFAULT_ZLIB
56737  if test "x${with_zlib}" = "x"; then
56738    with_zlib=${DEFAULT_ZLIB}
56739  fi
56740
56741  if test "x${with_zlib}" = "xbundled"; then
56742    USE_EXTERNAL_LIBZ=false
56743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56744$as_echo "bundled" >&6; }
56745  elif test "x${with_zlib}" = "xsystem"; then
56746    if test "x${ZLIB_FOUND}" = "xyes"; then
56747      USE_EXTERNAL_LIBZ=true
56748      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56749$as_echo "system" >&6; }
56750    else
56751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
56752$as_echo "system not found" >&6; }
56753      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
56754    fi
56755  else
56756    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
56757  fi
56758
56759
56760
56761
56762
56763# Check whether --with-lcms was given.
56764if test "${with_lcms+set}" = set; then :
56765  withval=$with_lcms;
56766fi
56767
56768
56769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
56770$as_echo_n "checking for which lcms to use... " >&6; }
56771
56772  DEFAULT_LCMS=bundled
56773  # If user didn't specify, use DEFAULT_LCMS
56774  if test "x${with_lcms}" = "x"; then
56775      with_lcms=${DEFAULT_LCMS}
56776  fi
56777
56778  if test "x${with_lcms}" = "xbundled"; then
56779    USE_EXTERNAL_LCMS=false
56780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
56781$as_echo "bundled" >&6; }
56782  elif test "x${with_lcms}" = "xsystem"; then
56783    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
56784$as_echo "system" >&6; }
56785
56786pkg_failed=no
56787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
56788$as_echo_n "checking for LCMS... " >&6; }
56789
56790if test -n "$LCMS_CFLAGS"; then
56791    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
56792 elif test -n "$PKG_CONFIG"; then
56793    if test -n "$PKG_CONFIG" && \
56794    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
56795  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
56796  ac_status=$?
56797  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56798  test $ac_status = 0; }; then
56799  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
56800else
56801  pkg_failed=yes
56802fi
56803 else
56804    pkg_failed=untried
56805fi
56806if test -n "$LCMS_LIBS"; then
56807    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
56808 elif test -n "$PKG_CONFIG"; then
56809    if test -n "$PKG_CONFIG" && \
56810    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
56811  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
56812  ac_status=$?
56813  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
56814  test $ac_status = 0; }; then
56815  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
56816else
56817  pkg_failed=yes
56818fi
56819 else
56820    pkg_failed=untried
56821fi
56822
56823
56824
56825if test $pkg_failed = yes; then
56826
56827if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
56828        _pkg_short_errors_supported=yes
56829else
56830        _pkg_short_errors_supported=no
56831fi
56832        if test $_pkg_short_errors_supported = yes; then
56833	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
56834        else
56835	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
56836        fi
56837	# Put the nasty error message in config.log where it belongs
56838	echo "$LCMS_PKG_ERRORS" >&5
56839
56840	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56841$as_echo "no" >&6; }
56842                LCMS_FOUND=no
56843elif test $pkg_failed = untried; then
56844	LCMS_FOUND=no
56845else
56846	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
56847	LCMS_LIBS=$pkg_cv_LCMS_LIBS
56848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56849$as_echo "yes" >&6; }
56850	LCMS_FOUND=yes
56851fi
56852    if test "x${LCMS_FOUND}" = "xyes"; then
56853      USE_EXTERNAL_LCMS=true
56854    else
56855      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
56856    fi
56857  else
56858    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
56859  fi
56860
56861
56862
56863
56864
56865
56866
56867
56868
56869
56870
56871  # Setup libm (the maths library)
56872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
56873$as_echo_n "checking for cos in -lm... " >&6; }
56874if ${ac_cv_lib_m_cos+:} false; then :
56875  $as_echo_n "(cached) " >&6
56876else
56877  ac_check_lib_save_LIBS=$LIBS
56878LIBS="-lm  $LIBS"
56879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56880/* end confdefs.h.  */
56881
56882/* Override any GCC internal prototype to avoid an error.
56883   Use char because int might match the return type of a GCC
56884   builtin and then its argument prototype would still apply.  */
56885#ifdef __cplusplus
56886extern "C"
56887#endif
56888char cos ();
56889int
56890main ()
56891{
56892return cos ();
56893  ;
56894  return 0;
56895}
56896_ACEOF
56897if ac_fn_cxx_try_link "$LINENO"; then :
56898  ac_cv_lib_m_cos=yes
56899else
56900  ac_cv_lib_m_cos=no
56901fi
56902rm -f core conftest.err conftest.$ac_objext \
56903    conftest$ac_exeext conftest.$ac_ext
56904LIBS=$ac_check_lib_save_LIBS
56905fi
56906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
56907$as_echo "$ac_cv_lib_m_cos" >&6; }
56908if test "x$ac_cv_lib_m_cos" = xyes; then :
56909  cat >>confdefs.h <<_ACEOF
56910#define HAVE_LIBM 1
56911_ACEOF
56912
56913  LIBS="-lm $LIBS"
56914
56915else
56916
56917      { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
56918$as_echo "$as_me: Maths library was not found" >&6;}
56919
56920fi
56921
56922  LIBM=-lm
56923
56924
56925  # Setup libdl (for dynamic library loading)
56926  save_LIBS="$LIBS"
56927  LIBS=""
56928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
56929$as_echo_n "checking for dlopen in -ldl... " >&6; }
56930if ${ac_cv_lib_dl_dlopen+:} false; then :
56931  $as_echo_n "(cached) " >&6
56932else
56933  ac_check_lib_save_LIBS=$LIBS
56934LIBS="-ldl  $LIBS"
56935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56936/* end confdefs.h.  */
56937
56938/* Override any GCC internal prototype to avoid an error.
56939   Use char because int might match the return type of a GCC
56940   builtin and then its argument prototype would still apply.  */
56941#ifdef __cplusplus
56942extern "C"
56943#endif
56944char dlopen ();
56945int
56946main ()
56947{
56948return dlopen ();
56949  ;
56950  return 0;
56951}
56952_ACEOF
56953if ac_fn_cxx_try_link "$LINENO"; then :
56954  ac_cv_lib_dl_dlopen=yes
56955else
56956  ac_cv_lib_dl_dlopen=no
56957fi
56958rm -f core conftest.err conftest.$ac_objext \
56959    conftest$ac_exeext conftest.$ac_ext
56960LIBS=$ac_check_lib_save_LIBS
56961fi
56962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
56963$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
56964if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
56965  cat >>confdefs.h <<_ACEOF
56966#define HAVE_LIBDL 1
56967_ACEOF
56968
56969  LIBS="-ldl $LIBS"
56970
56971fi
56972
56973  LIBDL="$LIBS"
56974
56975  LIBS="$save_LIBS"
56976
56977  # Deprecated libraries, keep the flags for backwards compatibility
56978  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
56979
56980
56981# Check whether --with-dxsdk was given.
56982if test "${with_dxsdk+set}" = set; then :
56983  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
56984$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
56985fi
56986
56987
56988
56989
56990# Check whether --with-dxsdk-lib was given.
56991if test "${with_dxsdk_lib+set}" = set; then :
56992  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
56993$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
56994fi
56995
56996
56997
56998
56999# Check whether --with-dxsdk-include was given.
57000if test "${with_dxsdk_include+set}" = set; then :
57001  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
57002$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
57003fi
57004
57005
57006  fi
57007
57008  # Control if libzip can use mmap. Available for purposes of overriding.
57009  LIBZIP_CAN_USE_MMAP=true
57010
57011
57012
57013
57014
57015
57016
57017
57018
57019
57020
57021
57022
57023
57024###############################################################################
57025#
57026# We need to do some final tweaking, when everything else is done.
57027#
57028###############################################################################
57029
57030
57031  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
57032
57033
57034  # The name of the Service Agent jar.
57035  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
57036  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
57037    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
57038  fi
57039
57040
57041
57042  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
57043$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
57044
57045  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
57046    ENABLE_INTREE_EC=yes
57047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57048$as_echo "yes" >&6; }
57049  else
57050    ENABLE_INTREE_EC=no
57051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57052$as_echo "no" >&6; }
57053  fi
57054
57055
57056
57057
57058###############################################################################
57059#
57060# Configure parts of the build that only affect the build performance,
57061# not the result.
57062#
57063###############################################################################
57064
57065
57066  # How many cores do we have on this build system?
57067
57068# Check whether --with-num-cores was given.
57069if test "${with_num_cores+set}" = set; then :
57070  withval=$with_num_cores;
57071fi
57072
57073  if test "x$with_num_cores" = x; then
57074    # The number of cores were not specified, try to probe them.
57075
57076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
57077$as_echo_n "checking for number of cores... " >&6; }
57078  NUM_CORES=1
57079  FOUND_CORES=no
57080
57081  if test -f /proc/cpuinfo; then
57082    # Looks like a Linux (or cygwin) system
57083    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
57084    FOUND_CORES=yes
57085  elif test -x /usr/sbin/psrinfo; then
57086    # Looks like a Solaris system
57087    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
57088    FOUND_CORES=yes
57089  elif test -x /usr/sbin/system_profiler; then
57090    # Looks like a MacOSX system
57091    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
57092    FOUND_CORES=yes
57093  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
57094    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
57095    FOUND_CORES=yes
57096  elif test -n "$NUMBER_OF_PROCESSORS"; then
57097    # On windows, look in the env
57098    NUM_CORES=$NUMBER_OF_PROCESSORS
57099    FOUND_CORES=yes
57100  fi
57101
57102  if test "x$FOUND_CORES" = xyes; then
57103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
57104$as_echo "$NUM_CORES" >&6; }
57105  else
57106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
57107$as_echo "could not detect number of cores, defaulting to 1" >&6; }
57108    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
57109$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
57110  fi
57111
57112  else
57113    NUM_CORES=$with_num_cores
57114  fi
57115
57116
57117
57118  # How much memory do we have on this build system?
57119
57120# Check whether --with-memory-size was given.
57121if test "${with_memory_size+set}" = set; then :
57122  withval=$with_memory_size;
57123fi
57124
57125  if test "x$with_memory_size" = x; then
57126    # The memory size was not specified, try to probe it.
57127
57128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
57129$as_echo_n "checking for memory size... " >&6; }
57130  # Default to 1024 MB
57131  MEMORY_SIZE=1024
57132  FOUND_MEM=no
57133
57134  if test -f /proc/meminfo; then
57135    # Looks like a Linux (or cygwin) system
57136    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
57137    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
57138    FOUND_MEM=yes
57139  elif test -x /usr/sbin/prtconf; then
57140    # Looks like a Solaris or AIX system
57141    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
57142    FOUND_MEM=yes
57143  elif test -x /usr/sbin/system_profiler; then
57144    # Looks like a MacOSX system
57145    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
57146    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
57147    FOUND_MEM=yes
57148  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
57149    # Windows, but without cygwin
57150    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
57151    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
57152    FOUND_MEM=yes
57153  fi
57154
57155  if test "x$FOUND_MEM" = xyes; then
57156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
57157$as_echo "$MEMORY_SIZE MB" >&6; }
57158  else
57159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
57160$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
57161    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
57162$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
57163  fi
57164
57165  else
57166    MEMORY_SIZE=$with_memory_size
57167  fi
57168
57169
57170
57171  # Provide a decent default number of parallel jobs for make depending on
57172  # number of cores, amount of memory and machine architecture.
57173
57174# Check whether --with-jobs was given.
57175if test "${with_jobs+set}" = set; then :
57176  withval=$with_jobs;
57177fi
57178
57179  if test "x$with_jobs" = x; then
57180    # Number of jobs was not specified, calculate.
57181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
57182$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
57183    # Approximate memory in GB.
57184    memory_gb=`expr $MEMORY_SIZE / 1024`
57185    # Pick the lowest of memory in gb and number of cores.
57186    if test "$memory_gb" -lt "$NUM_CORES"; then
57187      JOBS="$memory_gb"
57188    else
57189      JOBS="$NUM_CORES"
57190    fi
57191    if test "$JOBS" -eq "0"; then
57192      JOBS=1
57193    fi
57194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
57195$as_echo "$JOBS" >&6; }
57196  else
57197    JOBS=$with_jobs
57198  fi
57199
57200
57201
57202# Setup arguments for the boot jdk (after cores and memory have been setup)
57203
57204  ##############################################################################
57205  #
57206  # Specify jvm options for anything that is run with the Boot JDK.
57207  # Not all JVM:s accept the same arguments on the command line.
57208  #
57209
57210# Check whether --with-boot-jdk-jvmargs was given.
57211if test "${with_boot_jdk_jvmargs+set}" = set; then :
57212  withval=$with_boot_jdk_jvmargs;
57213fi
57214
57215
57216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
57217$as_echo_n "checking flags for boot jdk java command ... " >&6; }
57218
57219  # Disable special log output when a debug build is used as Boot JDK...
57220
57221  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
57222  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
57223  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
57224  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57225  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57226  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57227    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
57228    JVM_ARG_OK=true
57229  else
57230    $ECHO "Arg failed:" >&5
57231    $ECHO "$OUTPUT" >&5
57232    JVM_ARG_OK=false
57233  fi
57234
57235
57236  # Apply user provided options.
57237
57238  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
57239  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
57240  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
57241  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57242  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57243  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57244    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
57245    JVM_ARG_OK=true
57246  else
57247    $ECHO "Arg failed:" >&5
57248    $ECHO "$OUTPUT" >&5
57249    JVM_ARG_OK=false
57250  fi
57251
57252
57253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
57254$as_echo "$boot_jdk_jvmargs" >&6; }
57255
57256  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
57257  JAVA_FLAGS=$boot_jdk_jvmargs
57258
57259
57260
57261  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
57262$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
57263
57264  # Starting amount of heap memory.
57265
57266  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
57267  $ECHO "Command: $JAVA -Xms64M -version" >&5
57268  OUTPUT=`$JAVA -Xms64M -version 2>&1`
57269  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57270  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57271  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57272    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
57273    JVM_ARG_OK=true
57274  else
57275    $ECHO "Arg failed:" >&5
57276    $ECHO "$OUTPUT" >&5
57277    JVM_ARG_OK=false
57278  fi
57279
57280
57281  # Maximum amount of heap memory.
57282  # Maximum stack size.
57283  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
57284  if test "x$BOOT_JDK_BITS" = "x32"; then
57285    if test "$JVM_MAX_HEAP" -gt "1100"; then
57286      JVM_MAX_HEAP=1100
57287    elif test "$JVM_MAX_HEAP" -lt "512"; then
57288      JVM_MAX_HEAP=512
57289    fi
57290    STACK_SIZE=768
57291  else
57292    # Running a 64 bit JVM allows for and requires a bigger heap
57293    if test "$JVM_MAX_HEAP" -gt "1600"; then
57294      JVM_MAX_HEAP=1600
57295    elif test "$JVM_MAX_HEAP" -lt "512"; then
57296      JVM_MAX_HEAP=512
57297    fi
57298    STACK_SIZE=1536
57299  fi
57300
57301  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
57302  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
57303  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
57304  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57305  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57306  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57307    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
57308    JVM_ARG_OK=true
57309  else
57310    $ECHO "Arg failed:" >&5
57311    $ECHO "$OUTPUT" >&5
57312    JVM_ARG_OK=false
57313  fi
57314
57315
57316  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
57317  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
57318  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
57319  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57320  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57321  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57322    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
57323    JVM_ARG_OK=true
57324  else
57325    $ECHO "Arg failed:" >&5
57326    $ECHO "$OUTPUT" >&5
57327    JVM_ARG_OK=false
57328  fi
57329
57330
57331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
57332$as_echo "$boot_jdk_jvmargs_big" >&6; }
57333
57334  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
57335
57336
57337  # By default, the main javac compilations use big
57338  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
57339
57340
57341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
57342$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
57343
57344  # Use serial gc for small short lived tools if possible
57345
57346  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
57347  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
57348  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
57349  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57350  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57351  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57352    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
57353    JVM_ARG_OK=true
57354  else
57355    $ECHO "Arg failed:" >&5
57356    $ECHO "$OUTPUT" >&5
57357    JVM_ARG_OK=false
57358  fi
57359
57360
57361  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
57362  $ECHO "Command: $JAVA -Xms32M -version" >&5
57363  OUTPUT=`$JAVA -Xms32M -version 2>&1`
57364  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57365  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57366  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57367    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
57368    JVM_ARG_OK=true
57369  else
57370    $ECHO "Arg failed:" >&5
57371    $ECHO "$OUTPUT" >&5
57372    JVM_ARG_OK=false
57373  fi
57374
57375
57376  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
57377  $ECHO "Command: $JAVA -Xmx512M -version" >&5
57378  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
57379  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57380  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57381  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57382    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
57383    JVM_ARG_OK=true
57384  else
57385    $ECHO "Arg failed:" >&5
57386    $ECHO "$OUTPUT" >&5
57387    JVM_ARG_OK=false
57388  fi
57389
57390
57391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
57392$as_echo "$boot_jdk_jvmargs_small" >&6; }
57393
57394  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
57395
57396
57397  JAVA_TOOL_FLAGS_SMALL=""
57398  for f in $JAVA_FLAGS_SMALL; do
57399    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
57400  done
57401
57402
57403
57404# Setup smart javac (after cores and memory have been setup)
57405
57406
57407# Check whether --with-sjavac-server-java was given.
57408if test "${with_sjavac_server_java+set}" = set; then :
57409  withval=$with_sjavac_server_java;
57410fi
57411
57412
57413  if test "x$with_sjavac_server_java" != x; then
57414    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
57415    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
57416    if test "x$FOUND_VERSION" = x; then
57417      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
57418    fi
57419  else
57420    SJAVAC_SERVER_JAVA="$JAVA"
57421  fi
57422
57423
57424  if test "$MEMORY_SIZE" -gt "3000"; then
57425
57426  $ECHO "Check if jvm arg is ok: -d64" >&5
57427  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
57428  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
57429  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57430  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57431  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57432    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
57433    JVM_ARG_OK=true
57434  else
57435    $ECHO "Arg failed:" >&5
57436    $ECHO "$OUTPUT" >&5
57437    JVM_ARG_OK=false
57438  fi
57439
57440    if test "$JVM_ARG_OK" = true; then
57441      JVM_64BIT=true
57442      JVM_ARG_OK=false
57443    fi
57444  fi
57445
57446  MX_VALUE=`expr $MEMORY_SIZE / 2`
57447  if test "$JVM_64BIT" = true; then
57448    # Set ms lower than mx since more than one instance of the server might
57449    # get launched at the same time before they figure out which instance won.
57450    MS_VALUE=512
57451    if test "$MX_VALUE" -gt "2048"; then
57452      MX_VALUE=2048
57453    fi
57454  else
57455    MS_VALUE=256
57456    if test "$MX_VALUE" -gt "1500"; then
57457      MX_VALUE=1500
57458    fi
57459  fi
57460  if test "$MX_VALUE" -lt "512"; then
57461    MX_VALUE=512
57462  fi
57463
57464  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
57465  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
57466  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
57467  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
57468  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
57469  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
57470    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
57471    JVM_ARG_OK=true
57472  else
57473    $ECHO "Arg failed:" >&5
57474    $ECHO "$OUTPUT" >&5
57475    JVM_ARG_OK=false
57476  fi
57477
57478
57479
57480  # Check whether --enable-sjavac was given.
57481if test "${enable_sjavac+set}" = set; then :
57482  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
57483else
57484  ENABLE_SJAVAC="no"
57485fi
57486
57487  if test "x$JVM_ARG_OK" = "xfalse"; then
57488    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
57489$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
57490    ENABLE_SJAVAC="no"
57491  fi
57492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
57493$as_echo_n "checking whether to use sjavac... " >&6; }
57494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
57495$as_echo "$ENABLE_SJAVAC" >&6; }
57496
57497
57498  # Check whether --enable-javac-server was given.
57499if test "${enable_javac_server+set}" = set; then :
57500  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
57501else
57502  ENABLE_JAVAC_SERVER="yes"
57503fi
57504
57505  if test "x$JVM_ARG_OK" = "xfalse"; then
57506    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
57507$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
57508    ENABLE_JAVAC_SERVER="no"
57509  fi
57510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
57511$as_echo_n "checking whether to use javac server... " >&6; }
57512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
57513$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
57514
57515
57516  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || "x$ENABLE_SJAVAC" = "xyes"; then
57517    # When using a server javac, the small client instances do not need much
57518    # resources.
57519    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
57520  fi
57521
57522
57523# Setup use of icecc if requested
57524
57525  # Check whether --enable-icecc was given.
57526if test "${enable_icecc+set}" = set; then :
57527  enableval=$enable_icecc;
57528fi
57529
57530
57531  if test "x${enable_icecc}" = "xyes"; then
57532
57533
57534
57535  # Publish this variable in the help.
57536
57537
57538  if [ -z "${ICECC_CMD+x}" ]; then
57539    # The variable is not set by user, try to locate tool using the code snippet
57540    for ac_prog in icecc
57541do
57542  # Extract the first word of "$ac_prog", so it can be a program name with args.
57543set dummy $ac_prog; ac_word=$2
57544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57545$as_echo_n "checking for $ac_word... " >&6; }
57546if ${ac_cv_path_ICECC_CMD+:} false; then :
57547  $as_echo_n "(cached) " >&6
57548else
57549  case $ICECC_CMD in
57550  [\\/]* | ?:[\\/]*)
57551  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57552  ;;
57553  *)
57554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57555for as_dir in $PATH
57556do
57557  IFS=$as_save_IFS
57558  test -z "$as_dir" && as_dir=.
57559    for ac_exec_ext in '' $ac_executable_extensions; do
57560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57561    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57563    break 2
57564  fi
57565done
57566  done
57567IFS=$as_save_IFS
57568
57569  ;;
57570esac
57571fi
57572ICECC_CMD=$ac_cv_path_ICECC_CMD
57573if test -n "$ICECC_CMD"; then
57574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57575$as_echo "$ICECC_CMD" >&6; }
57576else
57577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57578$as_echo "no" >&6; }
57579fi
57580
57581
57582  test -n "$ICECC_CMD" && break
57583done
57584
57585  else
57586    # The variable is set, but is it from the command line or the environment?
57587
57588    # Try to remove the string !ICECC_CMD! from our list.
57589    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
57590    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57591      # If it failed, the variable was not from the command line. Ignore it,
57592      # but warn the user (except for BASH, which is always set by the calling BASH).
57593      if test "xICECC_CMD" != xBASH; then
57594        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
57595$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
57596      fi
57597      # Try to locate tool using the code snippet
57598      for ac_prog in icecc
57599do
57600  # Extract the first word of "$ac_prog", so it can be a program name with args.
57601set dummy $ac_prog; ac_word=$2
57602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57603$as_echo_n "checking for $ac_word... " >&6; }
57604if ${ac_cv_path_ICECC_CMD+:} false; then :
57605  $as_echo_n "(cached) " >&6
57606else
57607  case $ICECC_CMD in
57608  [\\/]* | ?:[\\/]*)
57609  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57610  ;;
57611  *)
57612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57613for as_dir in $PATH
57614do
57615  IFS=$as_save_IFS
57616  test -z "$as_dir" && as_dir=.
57617    for ac_exec_ext in '' $ac_executable_extensions; do
57618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57619    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57621    break 2
57622  fi
57623done
57624  done
57625IFS=$as_save_IFS
57626
57627  ;;
57628esac
57629fi
57630ICECC_CMD=$ac_cv_path_ICECC_CMD
57631if test -n "$ICECC_CMD"; then
57632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57633$as_echo "$ICECC_CMD" >&6; }
57634else
57635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57636$as_echo "no" >&6; }
57637fi
57638
57639
57640  test -n "$ICECC_CMD" && break
57641done
57642
57643    else
57644      # If it succeeded, then it was overridden by the user. We will use it
57645      # for the tool.
57646
57647      # First remove it from the list of overridden variables, so we can test
57648      # for unknown variables in the end.
57649      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57650
57651      # Check if we try to supply an empty value
57652      if test "x$ICECC_CMD" = x; then
57653        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
57654$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
57655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
57656$as_echo_n "checking for ICECC_CMD... " >&6; }
57657        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57658$as_echo "disabled" >&6; }
57659      else
57660        # Check if the provided tool contains a complete path.
57661        tool_specified="$ICECC_CMD"
57662        tool_basename="${tool_specified##*/}"
57663        if test "x$tool_basename" = "x$tool_specified"; then
57664          # A command without a complete path is provided, search $PATH.
57665          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
57666$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
57667          # Extract the first word of "$tool_basename", so it can be a program name with args.
57668set dummy $tool_basename; ac_word=$2
57669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57670$as_echo_n "checking for $ac_word... " >&6; }
57671if ${ac_cv_path_ICECC_CMD+:} false; then :
57672  $as_echo_n "(cached) " >&6
57673else
57674  case $ICECC_CMD in
57675  [\\/]* | ?:[\\/]*)
57676  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
57677  ;;
57678  *)
57679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57680for as_dir in $PATH
57681do
57682  IFS=$as_save_IFS
57683  test -z "$as_dir" && as_dir=.
57684    for ac_exec_ext in '' $ac_executable_extensions; do
57685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57686    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
57687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57688    break 2
57689  fi
57690done
57691  done
57692IFS=$as_save_IFS
57693
57694  ;;
57695esac
57696fi
57697ICECC_CMD=$ac_cv_path_ICECC_CMD
57698if test -n "$ICECC_CMD"; then
57699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
57700$as_echo "$ICECC_CMD" >&6; }
57701else
57702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57703$as_echo "no" >&6; }
57704fi
57705
57706
57707          if test "x$ICECC_CMD" = x; then
57708            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57709          fi
57710        else
57711          # Otherwise we believe it is a complete path. Use it as it is.
57712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
57713$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
57714          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
57715$as_echo_n "checking for ICECC_CMD... " >&6; }
57716          if test ! -x "$tool_specified"; then
57717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57718$as_echo "not found" >&6; }
57719            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
57720          fi
57721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57722$as_echo "$tool_specified" >&6; }
57723        fi
57724      fi
57725    fi
57726
57727  fi
57728
57729
57730
57731  if test "x$ICECC_CMD" = x; then
57732    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
57733  fi
57734
57735
57736    old_path="$PATH"
57737
57738    # Look for icecc-create-env in some known places
57739    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
57740
57741
57742
57743  # Publish this variable in the help.
57744
57745
57746  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
57747    # The variable is not set by user, try to locate tool using the code snippet
57748    for ac_prog in icecc-create-env
57749do
57750  # Extract the first word of "$ac_prog", so it can be a program name with args.
57751set dummy $ac_prog; ac_word=$2
57752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57753$as_echo_n "checking for $ac_word... " >&6; }
57754if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57755  $as_echo_n "(cached) " >&6
57756else
57757  case $ICECC_CREATE_ENV in
57758  [\\/]* | ?:[\\/]*)
57759  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57760  ;;
57761  *)
57762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57763for as_dir in $PATH
57764do
57765  IFS=$as_save_IFS
57766  test -z "$as_dir" && as_dir=.
57767    for ac_exec_ext in '' $ac_executable_extensions; do
57768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57769    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57771    break 2
57772  fi
57773done
57774  done
57775IFS=$as_save_IFS
57776
57777  ;;
57778esac
57779fi
57780ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57781if test -n "$ICECC_CREATE_ENV"; then
57782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57783$as_echo "$ICECC_CREATE_ENV" >&6; }
57784else
57785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57786$as_echo "no" >&6; }
57787fi
57788
57789
57790  test -n "$ICECC_CREATE_ENV" && break
57791done
57792
57793  else
57794    # The variable is set, but is it from the command line or the environment?
57795
57796    # Try to remove the string !ICECC_CREATE_ENV! from our list.
57797    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
57798    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
57799      # If it failed, the variable was not from the command line. Ignore it,
57800      # but warn the user (except for BASH, which is always set by the calling BASH).
57801      if test "xICECC_CREATE_ENV" != xBASH; then
57802        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
57803$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
57804      fi
57805      # Try to locate tool using the code snippet
57806      for ac_prog in icecc-create-env
57807do
57808  # Extract the first word of "$ac_prog", so it can be a program name with args.
57809set dummy $ac_prog; ac_word=$2
57810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57811$as_echo_n "checking for $ac_word... " >&6; }
57812if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57813  $as_echo_n "(cached) " >&6
57814else
57815  case $ICECC_CREATE_ENV in
57816  [\\/]* | ?:[\\/]*)
57817  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57818  ;;
57819  *)
57820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57821for as_dir in $PATH
57822do
57823  IFS=$as_save_IFS
57824  test -z "$as_dir" && as_dir=.
57825    for ac_exec_ext in '' $ac_executable_extensions; do
57826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57827    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57829    break 2
57830  fi
57831done
57832  done
57833IFS=$as_save_IFS
57834
57835  ;;
57836esac
57837fi
57838ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57839if test -n "$ICECC_CREATE_ENV"; then
57840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57841$as_echo "$ICECC_CREATE_ENV" >&6; }
57842else
57843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57844$as_echo "no" >&6; }
57845fi
57846
57847
57848  test -n "$ICECC_CREATE_ENV" && break
57849done
57850
57851    else
57852      # If it succeeded, then it was overridden by the user. We will use it
57853      # for the tool.
57854
57855      # First remove it from the list of overridden variables, so we can test
57856      # for unknown variables in the end.
57857      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
57858
57859      # Check if we try to supply an empty value
57860      if test "x$ICECC_CREATE_ENV" = x; then
57861        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
57862$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
57863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57864$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
57866$as_echo "disabled" >&6; }
57867      else
57868        # Check if the provided tool contains a complete path.
57869        tool_specified="$ICECC_CREATE_ENV"
57870        tool_basename="${tool_specified##*/}"
57871        if test "x$tool_basename" = "x$tool_specified"; then
57872          # A command without a complete path is provided, search $PATH.
57873          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
57874$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
57875          # Extract the first word of "$tool_basename", so it can be a program name with args.
57876set dummy $tool_basename; ac_word=$2
57877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57878$as_echo_n "checking for $ac_word... " >&6; }
57879if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
57880  $as_echo_n "(cached) " >&6
57881else
57882  case $ICECC_CREATE_ENV in
57883  [\\/]* | ?:[\\/]*)
57884  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
57885  ;;
57886  *)
57887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57888for as_dir in $PATH
57889do
57890  IFS=$as_save_IFS
57891  test -z "$as_dir" && as_dir=.
57892    for ac_exec_ext in '' $ac_executable_extensions; do
57893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57894    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
57895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57896    break 2
57897  fi
57898done
57899  done
57900IFS=$as_save_IFS
57901
57902  ;;
57903esac
57904fi
57905ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
57906if test -n "$ICECC_CREATE_ENV"; then
57907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
57908$as_echo "$ICECC_CREATE_ENV" >&6; }
57909else
57910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57911$as_echo "no" >&6; }
57912fi
57913
57914
57915          if test "x$ICECC_CREATE_ENV" = x; then
57916            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
57917          fi
57918        else
57919          # Otherwise we believe it is a complete path. Use it as it is.
57920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
57921$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
57922          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
57923$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
57924          if test ! -x "$tool_specified"; then
57925            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
57926$as_echo "not found" >&6; }
57927            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
57928          fi
57929          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
57930$as_echo "$tool_specified" >&6; }
57931        fi
57932      fi
57933    fi
57934
57935  fi
57936
57937
57938
57939  if test "x$ICECC_CREATE_ENV" = x; then
57940    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
57941  fi
57942
57943
57944    # Use icecc-create-env to create a minimal compilation environment that can
57945    # be sent to the other hosts in the icecream cluster.
57946    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
57947    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
57948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
57949$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
57950    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
57951      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
57952          && ${ICECC_CREATE_ENV} --gcc ${CC} ${CXX} > ${icecc_create_env_log}
57953    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
57954      # For clang, the icecc compilerwrapper is needed. It usually resides next
57955      # to icecc-create-env.
57956
57957
57958
57959  # Publish this variable in the help.
57960
57961
57962  if [ -z "${ICECC_WRAPPER+x}" ]; then
57963    # The variable is not set by user, try to locate tool using the code snippet
57964    for ac_prog in compilerwrapper
57965do
57966  # Extract the first word of "$ac_prog", so it can be a program name with args.
57967set dummy $ac_prog; ac_word=$2
57968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
57969$as_echo_n "checking for $ac_word... " >&6; }
57970if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
57971  $as_echo_n "(cached) " >&6
57972else
57973  case $ICECC_WRAPPER in
57974  [\\/]* | ?:[\\/]*)
57975  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
57976  ;;
57977  *)
57978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
57979for as_dir in $PATH
57980do
57981  IFS=$as_save_IFS
57982  test -z "$as_dir" && as_dir=.
57983    for ac_exec_ext in '' $ac_executable_extensions; do
57984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
57985    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
57986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
57987    break 2
57988  fi
57989done
57990  done
57991IFS=$as_save_IFS
57992
57993  ;;
57994esac
57995fi
57996ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
57997if test -n "$ICECC_WRAPPER"; then
57998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
57999$as_echo "$ICECC_WRAPPER" >&6; }
58000else
58001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58002$as_echo "no" >&6; }
58003fi
58004
58005
58006  test -n "$ICECC_WRAPPER" && break
58007done
58008
58009  else
58010    # The variable is set, but is it from the command line or the environment?
58011
58012    # Try to remove the string !ICECC_WRAPPER! from our list.
58013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
58014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
58015      # If it failed, the variable was not from the command line. Ignore it,
58016      # but warn the user (except for BASH, which is always set by the calling BASH).
58017      if test "xICECC_WRAPPER" != xBASH; then
58018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
58019$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
58020      fi
58021      # Try to locate tool using the code snippet
58022      for ac_prog in compilerwrapper
58023do
58024  # Extract the first word of "$ac_prog", so it can be a program name with args.
58025set dummy $ac_prog; ac_word=$2
58026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58027$as_echo_n "checking for $ac_word... " >&6; }
58028if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
58029  $as_echo_n "(cached) " >&6
58030else
58031  case $ICECC_WRAPPER in
58032  [\\/]* | ?:[\\/]*)
58033  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
58034  ;;
58035  *)
58036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58037for as_dir in $PATH
58038do
58039  IFS=$as_save_IFS
58040  test -z "$as_dir" && as_dir=.
58041    for ac_exec_ext in '' $ac_executable_extensions; do
58042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58043    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
58044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58045    break 2
58046  fi
58047done
58048  done
58049IFS=$as_save_IFS
58050
58051  ;;
58052esac
58053fi
58054ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
58055if test -n "$ICECC_WRAPPER"; then
58056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
58057$as_echo "$ICECC_WRAPPER" >&6; }
58058else
58059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58060$as_echo "no" >&6; }
58061fi
58062
58063
58064  test -n "$ICECC_WRAPPER" && break
58065done
58066
58067    else
58068      # If it succeeded, then it was overridden by the user. We will use it
58069      # for the tool.
58070
58071      # First remove it from the list of overridden variables, so we can test
58072      # for unknown variables in the end.
58073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
58074
58075      # Check if we try to supply an empty value
58076      if test "x$ICECC_WRAPPER" = x; then
58077        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
58078$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
58079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
58080$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
58081        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
58082$as_echo "disabled" >&6; }
58083      else
58084        # Check if the provided tool contains a complete path.
58085        tool_specified="$ICECC_WRAPPER"
58086        tool_basename="${tool_specified##*/}"
58087        if test "x$tool_basename" = "x$tool_specified"; then
58088          # A command without a complete path is provided, search $PATH.
58089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
58090$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
58091          # Extract the first word of "$tool_basename", so it can be a program name with args.
58092set dummy $tool_basename; ac_word=$2
58093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58094$as_echo_n "checking for $ac_word... " >&6; }
58095if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
58096  $as_echo_n "(cached) " >&6
58097else
58098  case $ICECC_WRAPPER in
58099  [\\/]* | ?:[\\/]*)
58100  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
58101  ;;
58102  *)
58103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58104for as_dir in $PATH
58105do
58106  IFS=$as_save_IFS
58107  test -z "$as_dir" && as_dir=.
58108    for ac_exec_ext in '' $ac_executable_extensions; do
58109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58110    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
58111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58112    break 2
58113  fi
58114done
58115  done
58116IFS=$as_save_IFS
58117
58118  ;;
58119esac
58120fi
58121ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
58122if test -n "$ICECC_WRAPPER"; then
58123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
58124$as_echo "$ICECC_WRAPPER" >&6; }
58125else
58126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58127$as_echo "no" >&6; }
58128fi
58129
58130
58131          if test "x$ICECC_WRAPPER" = x; then
58132            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
58133          fi
58134        else
58135          # Otherwise we believe it is a complete path. Use it as it is.
58136          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
58137$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
58138          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
58139$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
58140          if test ! -x "$tool_specified"; then
58141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
58142$as_echo "not found" >&6; }
58143            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
58144          fi
58145          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
58146$as_echo "$tool_specified" >&6; }
58147        fi
58148      fi
58149    fi
58150
58151  fi
58152
58153
58154
58155  if test "x$ICECC_WRAPPER" = x; then
58156    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
58157  fi
58158
58159
58160      cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
58161          && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
58162    else
58163      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
58164    fi
58165    PATH="$old_path"
58166    # The bundle with the compiler gets a name based on checksums. Parse log file
58167    # to find it.
58168    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
58169    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
58170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
58171$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
58172    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
58173
58174    if test "x${COMPILE_TYPE}" = "xcross"; then
58175      # If cross compiling, create a separate env package for the build compiler
58176      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
58177$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
58178      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
58179      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
58180        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
58181            && ${ICECC_CREATE_ENV} --gcc ${BUILD_CC} ${BUILD_CXX} > ${icecc_create_env_log}
58182      elif test "x${BUILD_CC##*/}" = "xclang"; then
58183        cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
58184            && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log}
58185      else
58186        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
58187      fi
58188      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
58189      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
58190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
58191$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
58192      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
58193          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
58194    else
58195      BUILD_ICECC="${ICECC}"
58196    fi
58197
58198
58199  fi
58200
58201
58202# Can the C/C++ compiler use precompiled headers?
58203
58204
58205  ###############################################################################
58206  #
58207  # Can the C/C++ compiler use precompiled headers?
58208  #
58209  # Check whether --enable-precompiled-headers was given.
58210if test "${enable_precompiled_headers+set}" = set; then :
58211  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
58212else
58213  ENABLE_PRECOMPH=yes
58214fi
58215
58216
58217  USE_PRECOMPILED_HEADER=1
58218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
58219$as_echo_n "checking If precompiled header is enabled... " >&6; }
58220  if test "x$ENABLE_PRECOMPH" = xno; then
58221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
58222$as_echo "no, forced" >&6; }
58223    USE_PRECOMPILED_HEADER=0
58224  elif test "x$ICECC" != "x"; then
58225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
58226$as_echo "no, does not work effectively with icecc" >&6; }
58227    USE_PRECOMPILED_HEADER=0
58228  else
58229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58230$as_echo "yes" >&6; }
58231  fi
58232
58233  if test "x$ENABLE_PRECOMPH" = xyes; then
58234    # Check that the compiler actually supports precomp headers.
58235    if test "x$TOOLCHAIN_TYPE" = xgcc; then
58236      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
58237$as_echo_n "checking that precompiled headers work... " >&6; }
58238      echo "int alfa();" > conftest.h
58239      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
58240      if test ! -f conftest.hpp.gch; then
58241        USE_PRECOMPILED_HEADER=0
58242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58243$as_echo "no" >&6; }
58244      else
58245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58246$as_echo "yes" >&6; }
58247      fi
58248      rm -f conftest.h conftest.hpp.gch
58249    fi
58250  fi
58251
58252
58253
58254
58255# Setup use of ccache, if available
58256
58257  # Check whether --enable-ccache was given.
58258if test "${enable_ccache+set}" = set; then :
58259  enableval=$enable_ccache;
58260fi
58261
58262
58263  CCACHE=
58264  CCACHE_STATUS=
58265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
58266$as_echo_n "checking is ccache enabled... " >&6; }
58267  if test "x$enable_ccache" = xyes; then
58268    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
58269      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58270$as_echo "yes" >&6; }
58271      OLD_PATH="$PATH"
58272      if test "x$TOOLCHAIN_PATH" != x; then
58273        PATH=$TOOLCHAIN_PATH:$PATH
58274      fi
58275
58276
58277
58278  # Publish this variable in the help.
58279
58280
58281  if [ -z "${CCACHE+x}" ]; then
58282    # The variable is not set by user, try to locate tool using the code snippet
58283    for ac_prog in ccache
58284do
58285  # Extract the first word of "$ac_prog", so it can be a program name with args.
58286set dummy $ac_prog; ac_word=$2
58287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58288$as_echo_n "checking for $ac_word... " >&6; }
58289if ${ac_cv_path_CCACHE+:} false; then :
58290  $as_echo_n "(cached) " >&6
58291else
58292  case $CCACHE in
58293  [\\/]* | ?:[\\/]*)
58294  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
58295  ;;
58296  *)
58297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58298for as_dir in $PATH
58299do
58300  IFS=$as_save_IFS
58301  test -z "$as_dir" && as_dir=.
58302    for ac_exec_ext in '' $ac_executable_extensions; do
58303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58304    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
58305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58306    break 2
58307  fi
58308done
58309  done
58310IFS=$as_save_IFS
58311
58312  ;;
58313esac
58314fi
58315CCACHE=$ac_cv_path_CCACHE
58316if test -n "$CCACHE"; then
58317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
58318$as_echo "$CCACHE" >&6; }
58319else
58320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58321$as_echo "no" >&6; }
58322fi
58323
58324
58325  test -n "$CCACHE" && break
58326done
58327
58328  else
58329    # The variable is set, but is it from the command line or the environment?
58330
58331    # Try to remove the string !CCACHE! from our list.
58332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
58333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
58334      # If it failed, the variable was not from the command line. Ignore it,
58335      # but warn the user (except for BASH, which is always set by the calling BASH).
58336      if test "xCCACHE" != xBASH; then
58337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
58338$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
58339      fi
58340      # Try to locate tool using the code snippet
58341      for ac_prog in ccache
58342do
58343  # Extract the first word of "$ac_prog", so it can be a program name with args.
58344set dummy $ac_prog; ac_word=$2
58345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58346$as_echo_n "checking for $ac_word... " >&6; }
58347if ${ac_cv_path_CCACHE+:} false; then :
58348  $as_echo_n "(cached) " >&6
58349else
58350  case $CCACHE in
58351  [\\/]* | ?:[\\/]*)
58352  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
58353  ;;
58354  *)
58355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58356for as_dir in $PATH
58357do
58358  IFS=$as_save_IFS
58359  test -z "$as_dir" && as_dir=.
58360    for ac_exec_ext in '' $ac_executable_extensions; do
58361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58362    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
58363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58364    break 2
58365  fi
58366done
58367  done
58368IFS=$as_save_IFS
58369
58370  ;;
58371esac
58372fi
58373CCACHE=$ac_cv_path_CCACHE
58374if test -n "$CCACHE"; then
58375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
58376$as_echo "$CCACHE" >&6; }
58377else
58378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58379$as_echo "no" >&6; }
58380fi
58381
58382
58383  test -n "$CCACHE" && break
58384done
58385
58386    else
58387      # If it succeeded, then it was overridden by the user. We will use it
58388      # for the tool.
58389
58390      # First remove it from the list of overridden variables, so we can test
58391      # for unknown variables in the end.
58392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
58393
58394      # Check if we try to supply an empty value
58395      if test "x$CCACHE" = x; then
58396        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
58397$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
58398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
58399$as_echo_n "checking for CCACHE... " >&6; }
58400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
58401$as_echo "disabled" >&6; }
58402      else
58403        # Check if the provided tool contains a complete path.
58404        tool_specified="$CCACHE"
58405        tool_basename="${tool_specified##*/}"
58406        if test "x$tool_basename" = "x$tool_specified"; then
58407          # A command without a complete path is provided, search $PATH.
58408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
58409$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
58410          # Extract the first word of "$tool_basename", so it can be a program name with args.
58411set dummy $tool_basename; ac_word=$2
58412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
58413$as_echo_n "checking for $ac_word... " >&6; }
58414if ${ac_cv_path_CCACHE+:} false; then :
58415  $as_echo_n "(cached) " >&6
58416else
58417  case $CCACHE in
58418  [\\/]* | ?:[\\/]*)
58419  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
58420  ;;
58421  *)
58422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58423for as_dir in $PATH
58424do
58425  IFS=$as_save_IFS
58426  test -z "$as_dir" && as_dir=.
58427    for ac_exec_ext in '' $ac_executable_extensions; do
58428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
58429    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
58430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
58431    break 2
58432  fi
58433done
58434  done
58435IFS=$as_save_IFS
58436
58437  ;;
58438esac
58439fi
58440CCACHE=$ac_cv_path_CCACHE
58441if test -n "$CCACHE"; then
58442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
58443$as_echo "$CCACHE" >&6; }
58444else
58445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58446$as_echo "no" >&6; }
58447fi
58448
58449
58450          if test "x$CCACHE" = x; then
58451            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
58452          fi
58453        else
58454          # Otherwise we believe it is a complete path. Use it as it is.
58455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
58456$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
58457          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
58458$as_echo_n "checking for CCACHE... " >&6; }
58459          if test ! -x "$tool_specified"; then
58460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
58461$as_echo "not found" >&6; }
58462            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
58463          fi
58464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
58465$as_echo "$tool_specified" >&6; }
58466        fi
58467      fi
58468    fi
58469
58470  fi
58471
58472
58473
58474  if test "x$CCACHE" = x; then
58475    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
58476  fi
58477
58478
58479      PATH="$OLD_PATH"
58480      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
58481      CCACHE_STATUS="Active ($CCACHE_VERSION)"
58482    else
58483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58484$as_echo "no" >&6; }
58485      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
58486$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
58487    fi
58488  elif test "x$enable_ccache" = xno; then
58489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
58490$as_echo "no, explicitly disabled" >&6; }
58491    CCACHE_STATUS="Disabled"
58492  elif test "x$enable_ccache" = x; then
58493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58494$as_echo "no" >&6; }
58495  else
58496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
58497$as_echo "unknown" >&6; }
58498    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
58499  fi
58500
58501
58502
58503# Check whether --with-ccache-dir was given.
58504if test "${with_ccache_dir+set}" = set; then :
58505  withval=$with_ccache_dir;
58506fi
58507
58508
58509  if test "x$with_ccache_dir" != x; then
58510    # When using a non home ccache directory, assume the use is to share ccache files
58511    # with other users. Thus change the umask.
58512    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
58513    if test "x$CCACHE" = x; then
58514      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
58515$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
58516    fi
58517  fi
58518
58519  if test "x$CCACHE" != x; then
58520
58521  if test "x$CCACHE" != x; then
58522    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
58523      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
58524          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
58525      if test "x$HAS_BAD_CCACHE" != "x"; then
58526        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
58527      fi
58528      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
58529$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
58530      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
58531      PUSHED_FLAGS="$CXXFLAGS"
58532      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
58533      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58534/* end confdefs.h.  */
58535
58536int
58537main ()
58538{
58539
58540  ;
58541  return 0;
58542}
58543_ACEOF
58544if ac_fn_cxx_try_compile "$LINENO"; then :
58545  CC_KNOWS_CCACHE_TRICK=yes
58546else
58547  CC_KNOWS_CCACHE_TRICK=no
58548fi
58549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
58550      CXXFLAGS="$PUSHED_FLAGS"
58551      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
58552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58553$as_echo "yes" >&6; }
58554        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
58555
58556        CCACHE_SLOPPINESS=pch_defines,time_macros
58557      else
58558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58559$as_echo "no" >&6; }
58560        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
58561      fi
58562    fi
58563
58564    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
58565        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
58566
58567    if test "x$SET_CCACHE_DIR" != x; then
58568      mkdir -p $CCACHE_DIR > /dev/null 2>&1
58569      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
58570    fi
58571  fi
58572
58573  fi
58574
58575
58576###############################################################################
58577#
58578# And now the finish...
58579#
58580###############################################################################
58581
58582# Check for some common pitfalls
58583
58584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58585    file_to_test="$SRC_ROOT/LICENSE"
58586    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
58587      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
58588    fi
58589  fi
58590
58591
58592  # Did user specify any unknown variables?
58593
58594  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
58595    # Replace the separating ! with spaces before presenting for end user.
58596    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
58597    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
58598$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
58599  fi
58600
58601
58602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
58603$as_echo_n "checking if build directory is on local disk... " >&6; }
58604
58605  # df -l lists only local disks; if the given directory is not found then
58606  # a non-zero exit code is given
58607  if test "x$DF" = x; then
58608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58609      # msys does not have df; use Windows "net use" instead.
58610      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
58611      if test "x$IS_NETWORK_DISK" = x; then
58612        OUTPUT_DIR_IS_LOCAL="yes"
58613      else
58614        OUTPUT_DIR_IS_LOCAL="no"
58615      fi
58616    else
58617      # No df here, say it's local
58618      OUTPUT_DIR_IS_LOCAL="yes"
58619    fi
58620  else
58621    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
58622      OUTPUT_DIR_IS_LOCAL="yes"
58623    else
58624      OUTPUT_DIR_IS_LOCAL="no"
58625    fi
58626  fi
58627
58628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
58629$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
58630
58631
58632
58633  # Check if the user has any old-style ALT_ variables set.
58634  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
58635
58636  # Before generating output files, test if they exist. If they do, this is a reconfigure.
58637  # Since we can't properly handle the dependencies for this, warn the user about the situation
58638  if test -e $OUTPUT_ROOT/spec.gmk; then
58639    IS_RECONFIGURE=yes
58640  else
58641    IS_RECONFIGURE=no
58642  fi
58643
58644
58645# At the end, call the custom hook. (Dummy macro if no custom sources available)
58646
58647
58648# We're messing a bit with internal autoconf variables to put the config.status
58649# in the output directory instead of the current directory.
58650CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
58651
58652# Create the actual output files. Now the main work of configure is done.
58653cat >confcache <<\_ACEOF
58654# This file is a shell script that caches the results of configure
58655# tests run on this system so they can be shared between configure
58656# scripts and configure runs, see configure's option --config-cache.
58657# It is not useful on other systems.  If it contains results you don't
58658# want to keep, you may remove or edit it.
58659#
58660# config.status only pays attention to the cache file if you give it
58661# the --recheck option to rerun configure.
58662#
58663# `ac_cv_env_foo' variables (set or unset) will be overridden when
58664# loading this file, other *unset* `ac_cv_foo' will be assigned the
58665# following values.
58666
58667_ACEOF
58668
58669# The following way of writing the cache mishandles newlines in values,
58670# but we know of no workaround that is simple, portable, and efficient.
58671# So, we kill variables containing newlines.
58672# Ultrix sh set writes to stderr and can't be redirected directly,
58673# and sets the high bit in the cache file unless we assign to the vars.
58674(
58675  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
58676    eval ac_val=\$$ac_var
58677    case $ac_val in #(
58678    *${as_nl}*)
58679      case $ac_var in #(
58680      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
58681$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
58682      esac
58683      case $ac_var in #(
58684      _ | IFS | as_nl) ;; #(
58685      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
58686      *) { eval $ac_var=; unset $ac_var;} ;;
58687      esac ;;
58688    esac
58689  done
58690
58691  (set) 2>&1 |
58692    case $as_nl`(ac_space=' '; set) 2>&1` in #(
58693    *${as_nl}ac_space=\ *)
58694      # `set' does not quote correctly, so add quotes: double-quote
58695      # substitution turns \\\\ into \\, and sed turns \\ into \.
58696      sed -n \
58697	"s/'/'\\\\''/g;
58698	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
58699      ;; #(
58700    *)
58701      # `set' quotes correctly as required by POSIX, so do not add quotes.
58702      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
58703      ;;
58704    esac |
58705    sort
58706) |
58707  sed '
58708     /^ac_cv_env_/b end
58709     t clear
58710     :clear
58711     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
58712     t end
58713     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
58714     :end' >>confcache
58715if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
58716  if test -w "$cache_file"; then
58717    if test "x$cache_file" != "x/dev/null"; then
58718      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
58719$as_echo "$as_me: updating cache $cache_file" >&6;}
58720      if test ! -f "$cache_file" || test -h "$cache_file"; then
58721	cat confcache >"$cache_file"
58722      else
58723        case $cache_file in #(
58724        */* | ?:*)
58725	  mv -f confcache "$cache_file"$$ &&
58726	  mv -f "$cache_file"$$ "$cache_file" ;; #(
58727        *)
58728	  mv -f confcache "$cache_file" ;;
58729	esac
58730      fi
58731    fi
58732  else
58733    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
58734$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
58735  fi
58736fi
58737rm -f confcache
58738
58739test "x$prefix" = xNONE && prefix=$ac_default_prefix
58740# Let make expand exec_prefix.
58741test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
58742
58743# Transform confdefs.h into DEFS.
58744# Protect against shell expansion while executing Makefile rules.
58745# Protect against Makefile macro expansion.
58746#
58747# If the first sed substitution is executed (which looks for macros that
58748# take arguments), then branch to the quote section.  Otherwise,
58749# look for a macro that doesn't take arguments.
58750ac_script='
58751:mline
58752/\\$/{
58753 N
58754 s,\\\n,,
58755 b mline
58756}
58757t clear
58758:clear
58759s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
58760t quote
58761s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
58762t quote
58763b any
58764:quote
58765s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
58766s/\[/\\&/g
58767s/\]/\\&/g
58768s/\$/$$/g
58769H
58770:any
58771${
58772	g
58773	s/^\n//
58774	s/\n/ /g
58775	p
58776}
58777'
58778DEFS=`sed -n "$ac_script" confdefs.h`
58779
58780
58781ac_libobjs=
58782ac_ltlibobjs=
58783U=
58784for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
58785  # 1. Remove the extension, and $U if already installed.
58786  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
58787  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
58788  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
58789  #    will be set to the directory where LIBOBJS objects are built.
58790  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
58791  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
58792done
58793LIBOBJS=$ac_libobjs
58794
58795LTLIBOBJS=$ac_ltlibobjs
58796
58797
58798
58799: "${CONFIG_STATUS=./config.status}"
58800ac_write_fail=0
58801ac_clean_files_save=$ac_clean_files
58802ac_clean_files="$ac_clean_files $CONFIG_STATUS"
58803{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
58804$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
58805as_write_fail=0
58806cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
58807#! $SHELL
58808# Generated by $as_me.
58809# Run this file to recreate the current configuration.
58810# Compiler output produced by configure, useful for debugging
58811# configure, is in config.log if it exists.
58812
58813debug=false
58814ac_cs_recheck=false
58815ac_cs_silent=false
58816
58817SHELL=\${CONFIG_SHELL-$SHELL}
58818export SHELL
58819_ASEOF
58820cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
58821## -------------------- ##
58822## M4sh Initialization. ##
58823## -------------------- ##
58824
58825# Be more Bourne compatible
58826DUALCASE=1; export DUALCASE # for MKS sh
58827if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
58828  emulate sh
58829  NULLCMD=:
58830  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
58831  # is contrary to our usage.  Disable this feature.
58832  alias -g '${1+"$@"}'='"$@"'
58833  setopt NO_GLOB_SUBST
58834else
58835  case `(set -o) 2>/dev/null` in #(
58836  *posix*) :
58837    set -o posix ;; #(
58838  *) :
58839     ;;
58840esac
58841fi
58842
58843
58844as_nl='
58845'
58846export as_nl
58847# Printing a long string crashes Solaris 7 /usr/bin/printf.
58848as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
58849as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
58850as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
58851# Prefer a ksh shell builtin over an external printf program on Solaris,
58852# but without wasting forks for bash or zsh.
58853if test -z "$BASH_VERSION$ZSH_VERSION" \
58854    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
58855  as_echo='print -r --'
58856  as_echo_n='print -rn --'
58857elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
58858  as_echo='printf %s\n'
58859  as_echo_n='printf %s'
58860else
58861  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58862    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58863    as_echo_n='/usr/ucb/echo -n'
58864  else
58865    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58866    as_echo_n_body='eval
58867      arg=$1;
58868      case $arg in #(
58869      *"$as_nl"*)
58870	expr "X$arg" : "X\\(.*\\)$as_nl";
58871	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
58872      esac;
58873      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
58874    '
58875    export as_echo_n_body
58876    as_echo_n='sh -c $as_echo_n_body as_echo'
58877  fi
58878  export as_echo_body
58879  as_echo='sh -c $as_echo_body as_echo'
58880fi
58881
58882# The user is always right.
58883if test "${PATH_SEPARATOR+set}" != set; then
58884  PATH_SEPARATOR=:
58885  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
58886    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
58887      PATH_SEPARATOR=';'
58888  }
58889fi
58890
58891
58892# IFS
58893# We need space, tab and new line, in precisely that order.  Quoting is
58894# there to prevent editors from complaining about space-tab.
58895# (If _AS_PATH_WALK were called with IFS unset, it would disable word
58896# splitting by setting IFS to empty value.)
58897IFS=" ""	$as_nl"
58898
58899# Find who we are.  Look in the path if we contain no directory separator.
58900as_myself=
58901case $0 in #((
58902  *[\\/]* ) as_myself=$0 ;;
58903  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58904for as_dir in $PATH
58905do
58906  IFS=$as_save_IFS
58907  test -z "$as_dir" && as_dir=.
58908    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
58909  done
58910IFS=$as_save_IFS
58911
58912     ;;
58913esac
58914# We did not find ourselves, most probably we were run as `sh COMMAND'
58915# in which case we are not to be found in the path.
58916if test "x$as_myself" = x; then
58917  as_myself=$0
58918fi
58919if test ! -f "$as_myself"; then
58920  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
58921  exit 1
58922fi
58923
58924# Unset variables that we do not need and which cause bugs (e.g. in
58925# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
58926# suppresses any "Segmentation fault" message there.  '((' could
58927# trigger a bug in pdksh 5.2.14.
58928for as_var in BASH_ENV ENV MAIL MAILPATH
58929do eval test x\${$as_var+set} = xset \
58930  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
58931done
58932PS1='$ '
58933PS2='> '
58934PS4='+ '
58935
58936# NLS nuisances.
58937LC_ALL=C
58938export LC_ALL
58939LANGUAGE=C
58940export LANGUAGE
58941
58942# CDPATH.
58943(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
58944
58945
58946# as_fn_error STATUS ERROR [LINENO LOG_FD]
58947# ----------------------------------------
58948# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
58949# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
58950# script with STATUS, using 1 if that was 0.
58951as_fn_error ()
58952{
58953  as_status=$1; test $as_status -eq 0 && as_status=1
58954  if test "$4"; then
58955    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
58956    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
58957  fi
58958  $as_echo "$as_me: error: $2" >&2
58959  as_fn_exit $as_status
58960} # as_fn_error
58961
58962
58963# as_fn_set_status STATUS
58964# -----------------------
58965# Set $? to STATUS, without forking.
58966as_fn_set_status ()
58967{
58968  return $1
58969} # as_fn_set_status
58970
58971# as_fn_exit STATUS
58972# -----------------
58973# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
58974as_fn_exit ()
58975{
58976  set +e
58977  as_fn_set_status $1
58978  exit $1
58979} # as_fn_exit
58980
58981# as_fn_unset VAR
58982# ---------------
58983# Portably unset VAR.
58984as_fn_unset ()
58985{
58986  { eval $1=; unset $1;}
58987}
58988as_unset=as_fn_unset
58989# as_fn_append VAR VALUE
58990# ----------------------
58991# Append the text in VALUE to the end of the definition contained in VAR. Take
58992# advantage of any shell optimizations that allow amortized linear growth over
58993# repeated appends, instead of the typical quadratic growth present in naive
58994# implementations.
58995if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
58996  eval 'as_fn_append ()
58997  {
58998    eval $1+=\$2
58999  }'
59000else
59001  as_fn_append ()
59002  {
59003    eval $1=\$$1\$2
59004  }
59005fi # as_fn_append
59006
59007# as_fn_arith ARG...
59008# ------------------
59009# Perform arithmetic evaluation on the ARGs, and store the result in the
59010# global $as_val. Take advantage of shells that can avoid forks. The arguments
59011# must be portable across $(()) and expr.
59012if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
59013  eval 'as_fn_arith ()
59014  {
59015    as_val=$(( $* ))
59016  }'
59017else
59018  as_fn_arith ()
59019  {
59020    as_val=`expr "$@" || test $? -eq 1`
59021  }
59022fi # as_fn_arith
59023
59024
59025if expr a : '\(a\)' >/dev/null 2>&1 &&
59026   test "X`expr 00001 : '.*\(...\)'`" = X001; then
59027  as_expr=expr
59028else
59029  as_expr=false
59030fi
59031
59032if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
59033  as_basename=basename
59034else
59035  as_basename=false
59036fi
59037
59038if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
59039  as_dirname=dirname
59040else
59041  as_dirname=false
59042fi
59043
59044as_me=`$as_basename -- "$0" ||
59045$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
59046	 X"$0" : 'X\(//\)$' \| \
59047	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
59048$as_echo X/"$0" |
59049    sed '/^.*\/\([^/][^/]*\)\/*$/{
59050	    s//\1/
59051	    q
59052	  }
59053	  /^X\/\(\/\/\)$/{
59054	    s//\1/
59055	    q
59056	  }
59057	  /^X\/\(\/\).*/{
59058	    s//\1/
59059	    q
59060	  }
59061	  s/.*/./; q'`
59062
59063# Avoid depending upon Character Ranges.
59064as_cr_letters='abcdefghijklmnopqrstuvwxyz'
59065as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
59066as_cr_Letters=$as_cr_letters$as_cr_LETTERS
59067as_cr_digits='0123456789'
59068as_cr_alnum=$as_cr_Letters$as_cr_digits
59069
59070ECHO_C= ECHO_N= ECHO_T=
59071case `echo -n x` in #(((((
59072-n*)
59073  case `echo 'xy\c'` in
59074  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
59075  xy)  ECHO_C='\c';;
59076  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
59077       ECHO_T='	';;
59078  esac;;
59079*)
59080  ECHO_N='-n';;
59081esac
59082
59083rm -f conf$$ conf$$.exe conf$$.file
59084if test -d conf$$.dir; then
59085  rm -f conf$$.dir/conf$$.file
59086else
59087  rm -f conf$$.dir
59088  mkdir conf$$.dir 2>/dev/null
59089fi
59090if (echo >conf$$.file) 2>/dev/null; then
59091  if ln -s conf$$.file conf$$ 2>/dev/null; then
59092    as_ln_s='ln -s'
59093    # ... but there are two gotchas:
59094    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
59095    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
59096    # In both cases, we have to default to `cp -pR'.
59097    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
59098      as_ln_s='cp -pR'
59099  elif ln conf$$.file conf$$ 2>/dev/null; then
59100    as_ln_s=ln
59101  else
59102    as_ln_s='cp -pR'
59103  fi
59104else
59105  as_ln_s='cp -pR'
59106fi
59107rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
59108rmdir conf$$.dir 2>/dev/null
59109
59110
59111# as_fn_mkdir_p
59112# -------------
59113# Create "$as_dir" as a directory, including parents if necessary.
59114as_fn_mkdir_p ()
59115{
59116
59117  case $as_dir in #(
59118  -*) as_dir=./$as_dir;;
59119  esac
59120  test -d "$as_dir" || eval $as_mkdir_p || {
59121    as_dirs=
59122    while :; do
59123      case $as_dir in #(
59124      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
59125      *) as_qdir=$as_dir;;
59126      esac
59127      as_dirs="'$as_qdir' $as_dirs"
59128      as_dir=`$as_dirname -- "$as_dir" ||
59129$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
59130	 X"$as_dir" : 'X\(//\)[^/]' \| \
59131	 X"$as_dir" : 'X\(//\)$' \| \
59132	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
59133$as_echo X"$as_dir" |
59134    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
59135	    s//\1/
59136	    q
59137	  }
59138	  /^X\(\/\/\)[^/].*/{
59139	    s//\1/
59140	    q
59141	  }
59142	  /^X\(\/\/\)$/{
59143	    s//\1/
59144	    q
59145	  }
59146	  /^X\(\/\).*/{
59147	    s//\1/
59148	    q
59149	  }
59150	  s/.*/./; q'`
59151      test -d "$as_dir" && break
59152    done
59153    test -z "$as_dirs" || eval "mkdir $as_dirs"
59154  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
59155
59156
59157} # as_fn_mkdir_p
59158if mkdir -p . 2>/dev/null; then
59159  as_mkdir_p='mkdir -p "$as_dir"'
59160else
59161  test -d ./-p && rmdir ./-p
59162  as_mkdir_p=false
59163fi
59164
59165
59166# as_fn_executable_p FILE
59167# -----------------------
59168# Test if FILE is an executable regular file.
59169as_fn_executable_p ()
59170{
59171  test -f "$1" && test -x "$1"
59172} # as_fn_executable_p
59173as_test_x='test -x'
59174as_executable_p=as_fn_executable_p
59175
59176# Sed expression to map a string onto a valid CPP name.
59177as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
59178
59179# Sed expression to map a string onto a valid variable name.
59180as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
59181
59182
59183exec 6>&1
59184## ----------------------------------- ##
59185## Main body of $CONFIG_STATUS script. ##
59186## ----------------------------------- ##
59187_ASEOF
59188test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
59189
59190cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59191# Save the log message, to keep $0 and so on meaningful, and to
59192# report actual input values of CONFIG_FILES etc. instead of their
59193# values after options handling.
59194ac_log="
59195This file was extended by OpenJDK $as_me jdk9, which was
59196generated by GNU Autoconf 2.69.  Invocation command line was
59197
59198  CONFIG_FILES    = $CONFIG_FILES
59199  CONFIG_HEADERS  = $CONFIG_HEADERS
59200  CONFIG_LINKS    = $CONFIG_LINKS
59201  CONFIG_COMMANDS = $CONFIG_COMMANDS
59202  $ $0 $@
59203
59204on `(hostname || uname -n) 2>/dev/null | sed 1q`
59205"
59206
59207_ACEOF
59208
59209case $ac_config_files in *"
59210"*) set x $ac_config_files; shift; ac_config_files=$*;;
59211esac
59212
59213
59214
59215cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59216# Files that config.status was made for.
59217config_files="$ac_config_files"
59218
59219_ACEOF
59220
59221cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59222ac_cs_usage="\
59223\`$as_me' instantiates files and other configuration actions
59224from templates according to the current configuration.  Unless the files
59225and actions are specified as TAGs, all are instantiated by default.
59226
59227Usage: $0 [OPTION]... [TAG]...
59228
59229  -h, --help       print this help, then exit
59230  -V, --version    print version number and configuration settings, then exit
59231      --config     print configuration, then exit
59232  -q, --quiet, --silent
59233                   do not print progress messages
59234  -d, --debug      don't remove temporary files
59235      --recheck    update $as_me by reconfiguring in the same conditions
59236      --file=FILE[:TEMPLATE]
59237                   instantiate the configuration file FILE
59238
59239Configuration files:
59240$config_files
59241
59242Report bugs to <build-dev@openjdk.java.net>.
59243OpenJDK home page: <http://openjdk.java.net>."
59244
59245_ACEOF
59246cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59247ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
59248ac_cs_version="\\
59249OpenJDK config.status jdk9
59250configured by $0, generated by GNU Autoconf 2.69,
59251  with options \\"\$ac_cs_config\\"
59252
59253Copyright (C) 2012 Free Software Foundation, Inc.
59254This config.status script is free software; the Free Software Foundation
59255gives unlimited permission to copy, distribute and modify it."
59256
59257ac_pwd='$ac_pwd'
59258srcdir='$srcdir'
59259AWK='$AWK'
59260test -n "\$AWK" || AWK=awk
59261_ACEOF
59262
59263cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59264# The default lists apply if the user does not specify any file.
59265ac_need_defaults=:
59266while test $# != 0
59267do
59268  case $1 in
59269  --*=?*)
59270    ac_option=`expr "X$1" : 'X\([^=]*\)='`
59271    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
59272    ac_shift=:
59273    ;;
59274  --*=)
59275    ac_option=`expr "X$1" : 'X\([^=]*\)='`
59276    ac_optarg=
59277    ac_shift=:
59278    ;;
59279  *)
59280    ac_option=$1
59281    ac_optarg=$2
59282    ac_shift=shift
59283    ;;
59284  esac
59285
59286  case $ac_option in
59287  # Handling of the options.
59288  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
59289    ac_cs_recheck=: ;;
59290  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
59291    $as_echo "$ac_cs_version"; exit ;;
59292  --config | --confi | --conf | --con | --co | --c )
59293    $as_echo "$ac_cs_config"; exit ;;
59294  --debug | --debu | --deb | --de | --d | -d )
59295    debug=: ;;
59296  --file | --fil | --fi | --f )
59297    $ac_shift
59298    case $ac_optarg in
59299    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
59300    '') as_fn_error $? "missing file argument" ;;
59301    esac
59302    as_fn_append CONFIG_FILES " '$ac_optarg'"
59303    ac_need_defaults=false;;
59304  --he | --h |  --help | --hel | -h )
59305    $as_echo "$ac_cs_usage"; exit ;;
59306  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
59307  | -silent | --silent | --silen | --sile | --sil | --si | --s)
59308    ac_cs_silent=: ;;
59309
59310  # This is an error.
59311  -*) as_fn_error $? "unrecognized option: \`$1'
59312Try \`$0 --help' for more information." ;;
59313
59314  *) as_fn_append ac_config_targets " $1"
59315     ac_need_defaults=false ;;
59316
59317  esac
59318  shift
59319done
59320
59321ac_configure_extra_args=
59322
59323if $ac_cs_silent; then
59324  exec 6>/dev/null
59325  ac_configure_extra_args="$ac_configure_extra_args --silent"
59326fi
59327
59328_ACEOF
59329cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59330if \$ac_cs_recheck; then
59331  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
59332  shift
59333  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
59334  CONFIG_SHELL='$SHELL'
59335  export CONFIG_SHELL
59336  exec "\$@"
59337fi
59338
59339_ACEOF
59340cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59341exec 5>>config.log
59342{
59343  echo
59344  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
59345## Running $as_me. ##
59346_ASBOX
59347  $as_echo "$ac_log"
59348} >&5
59349
59350_ACEOF
59351cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59352_ACEOF
59353
59354cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59355
59356# Handling of arguments.
59357for ac_config_target in $ac_config_targets
59358do
59359  case $ac_config_target in
59360    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
59361    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
59362    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
59363    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
59364    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
59365
59366  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
59367  esac
59368done
59369
59370
59371# If the user did not use the arguments to specify the items to instantiate,
59372# then the envvar interface is used.  Set only those that are not.
59373# We use the long form for the default assignment because of an extremely
59374# bizarre bug on SunOS 4.1.3.
59375if $ac_need_defaults; then
59376  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
59377fi
59378
59379# Have a temporary directory for convenience.  Make it in the build tree
59380# simply because there is no reason against having it here, and in addition,
59381# creating and moving files from /tmp can sometimes cause problems.
59382# Hook for its removal unless debugging.
59383# Note that there is a small window in which the directory will not be cleaned:
59384# after its creation but before its name has been assigned to `$tmp'.
59385$debug ||
59386{
59387  tmp= ac_tmp=
59388  trap 'exit_status=$?
59389  : "${ac_tmp:=$tmp}"
59390  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
59391' 0
59392  trap 'as_fn_exit 1' 1 2 13 15
59393}
59394# Create a (secure) tmp directory for tmp files.
59395
59396{
59397  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
59398  test -d "$tmp"
59399}  ||
59400{
59401  tmp=./conf$$-$RANDOM
59402  (umask 077 && mkdir "$tmp")
59403} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
59404ac_tmp=$tmp
59405
59406# Set up the scripts for CONFIG_FILES section.
59407# No need to generate them if there are no CONFIG_FILES.
59408# This happens for instance with `./config.status config.h'.
59409if test -n "$CONFIG_FILES"; then
59410
59411
59412ac_cr=`echo X | tr X '\015'`
59413# On cygwin, bash can eat \r inside `` if the user requested igncr.
59414# But we know of no other shell where ac_cr would be empty at this
59415# point, so we can use a bashism as a fallback.
59416if test "x$ac_cr" = x; then
59417  eval ac_cr=\$\'\\r\'
59418fi
59419ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
59420if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
59421  ac_cs_awk_cr='\\r'
59422else
59423  ac_cs_awk_cr=$ac_cr
59424fi
59425
59426echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
59427_ACEOF
59428
59429
59430{
59431  echo "cat >conf$$subs.awk <<_ACEOF" &&
59432  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
59433  echo "_ACEOF"
59434} >conf$$subs.sh ||
59435  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
59436ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
59437ac_delim='%!_!# '
59438for ac_last_try in false false false false false :; do
59439  . ./conf$$subs.sh ||
59440    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
59441
59442  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
59443  if test $ac_delim_n = $ac_delim_num; then
59444    break
59445  elif $ac_last_try; then
59446    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
59447  else
59448    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
59449  fi
59450done
59451rm -f conf$$subs.sh
59452
59453cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59454cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
59455_ACEOF
59456sed -n '
59457h
59458s/^/S["/; s/!.*/"]=/
59459p
59460g
59461s/^[^!]*!//
59462:repl
59463t repl
59464s/'"$ac_delim"'$//
59465t delim
59466:nl
59467h
59468s/\(.\{148\}\)..*/\1/
59469t more1
59470s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
59471p
59472n
59473b repl
59474:more1
59475s/["\\]/\\&/g; s/^/"/; s/$/"\\/
59476p
59477g
59478s/.\{148\}//
59479t nl
59480:delim
59481h
59482s/\(.\{148\}\)..*/\1/
59483t more2
59484s/["\\]/\\&/g; s/^/"/; s/$/"/
59485p
59486b
59487:more2
59488s/["\\]/\\&/g; s/^/"/; s/$/"\\/
59489p
59490g
59491s/.\{148\}//
59492t delim
59493' <conf$$subs.awk | sed '
59494/^[^""]/{
59495  N
59496  s/\n//
59497}
59498' >>$CONFIG_STATUS || ac_write_fail=1
59499rm -f conf$$subs.awk
59500cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59501_ACAWK
59502cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
59503  for (key in S) S_is_set[key] = 1
59504  FS = ""
59505
59506}
59507{
59508  line = $ 0
59509  nfields = split(line, field, "@")
59510  substed = 0
59511  len = length(field[1])
59512  for (i = 2; i < nfields; i++) {
59513    key = field[i]
59514    keylen = length(key)
59515    if (S_is_set[key]) {
59516      value = S[key]
59517      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
59518      len += length(value) + length(field[++i])
59519      substed = 1
59520    } else
59521      len += 1 + keylen
59522  }
59523
59524  print line
59525}
59526
59527_ACAWK
59528_ACEOF
59529cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59530if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
59531  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
59532else
59533  cat
59534fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
59535  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
59536_ACEOF
59537
59538# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
59539# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
59540# trailing colons and then remove the whole line if VPATH becomes empty
59541# (actually we leave an empty line to preserve line numbers).
59542if test "x$srcdir" = x.; then
59543  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
59544h
59545s///
59546s/^/:/
59547s/[	 ]*$/:/
59548s/:\$(srcdir):/:/g
59549s/:\${srcdir}:/:/g
59550s/:@srcdir@:/:/g
59551s/^:*//
59552s/:*$//
59553x
59554s/\(=[	 ]*\).*/\1/
59555G
59556s/\n//
59557s/^[^=]*=[	 ]*$//
59558}'
59559fi
59560
59561cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59562fi # test -n "$CONFIG_FILES"
59563
59564
59565eval set X "  :F $CONFIG_FILES      "
59566shift
59567for ac_tag
59568do
59569  case $ac_tag in
59570  :[FHLC]) ac_mode=$ac_tag; continue;;
59571  esac
59572  case $ac_mode$ac_tag in
59573  :[FHL]*:*);;
59574  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
59575  :[FH]-) ac_tag=-:-;;
59576  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
59577  esac
59578  ac_save_IFS=$IFS
59579  IFS=:
59580  set x $ac_tag
59581  IFS=$ac_save_IFS
59582  shift
59583  ac_file=$1
59584  shift
59585
59586  case $ac_mode in
59587  :L) ac_source=$1;;
59588  :[FH])
59589    ac_file_inputs=
59590    for ac_f
59591    do
59592      case $ac_f in
59593      -) ac_f="$ac_tmp/stdin";;
59594      *) # Look for the file first in the build tree, then in the source tree
59595	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
59596	 # because $ac_f cannot contain `:'.
59597	 test -f "$ac_f" ||
59598	   case $ac_f in
59599	   [\\/$]*) false;;
59600	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
59601	   esac ||
59602	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
59603      esac
59604      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
59605      as_fn_append ac_file_inputs " '$ac_f'"
59606    done
59607
59608    # Let's still pretend it is `configure' which instantiates (i.e., don't
59609    # use $as_me), people would be surprised to read:
59610    #    /* config.h.  Generated by config.status.  */
59611    configure_input='Generated from '`
59612	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
59613	`' by configure.'
59614    if test x"$ac_file" != x-; then
59615      configure_input="$ac_file.  $configure_input"
59616      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
59617$as_echo "$as_me: creating $ac_file" >&6;}
59618    fi
59619    # Neutralize special characters interpreted by sed in replacement strings.
59620    case $configure_input in #(
59621    *\&* | *\|* | *\\* )
59622       ac_sed_conf_input=`$as_echo "$configure_input" |
59623       sed 's/[\\\\&|]/\\\\&/g'`;; #(
59624    *) ac_sed_conf_input=$configure_input;;
59625    esac
59626
59627    case $ac_tag in
59628    *:-:* | *:-) cat >"$ac_tmp/stdin" \
59629      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
59630    esac
59631    ;;
59632  esac
59633
59634  ac_dir=`$as_dirname -- "$ac_file" ||
59635$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
59636	 X"$ac_file" : 'X\(//\)[^/]' \| \
59637	 X"$ac_file" : 'X\(//\)$' \| \
59638	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
59639$as_echo X"$ac_file" |
59640    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
59641	    s//\1/
59642	    q
59643	  }
59644	  /^X\(\/\/\)[^/].*/{
59645	    s//\1/
59646	    q
59647	  }
59648	  /^X\(\/\/\)$/{
59649	    s//\1/
59650	    q
59651	  }
59652	  /^X\(\/\).*/{
59653	    s//\1/
59654	    q
59655	  }
59656	  s/.*/./; q'`
59657  as_dir="$ac_dir"; as_fn_mkdir_p
59658  ac_builddir=.
59659
59660case "$ac_dir" in
59661.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
59662*)
59663  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
59664  # A ".." for each directory in $ac_dir_suffix.
59665  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
59666  case $ac_top_builddir_sub in
59667  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
59668  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
59669  esac ;;
59670esac
59671ac_abs_top_builddir=$ac_pwd
59672ac_abs_builddir=$ac_pwd$ac_dir_suffix
59673# for backward compatibility:
59674ac_top_builddir=$ac_top_build_prefix
59675
59676case $srcdir in
59677  .)  # We are building in place.
59678    ac_srcdir=.
59679    ac_top_srcdir=$ac_top_builddir_sub
59680    ac_abs_top_srcdir=$ac_pwd ;;
59681  [\\/]* | ?:[\\/]* )  # Absolute name.
59682    ac_srcdir=$srcdir$ac_dir_suffix;
59683    ac_top_srcdir=$srcdir
59684    ac_abs_top_srcdir=$srcdir ;;
59685  *) # Relative name.
59686    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
59687    ac_top_srcdir=$ac_top_build_prefix$srcdir
59688    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
59689esac
59690ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
59691
59692
59693  case $ac_mode in
59694  :F)
59695  #
59696  # CONFIG_FILE
59697  #
59698
59699_ACEOF
59700
59701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59702# If the template does not know about datarootdir, expand it.
59703# FIXME: This hack should be removed a few years after 2.60.
59704ac_datarootdir_hack=; ac_datarootdir_seen=
59705ac_sed_dataroot='
59706/datarootdir/ {
59707  p
59708  q
59709}
59710/@datadir@/p
59711/@docdir@/p
59712/@infodir@/p
59713/@localedir@/p
59714/@mandir@/p'
59715case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
59716*datarootdir*) ac_datarootdir_seen=yes;;
59717*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
59718  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
59719$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
59720_ACEOF
59721cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59722  ac_datarootdir_hack='
59723  s&@datadir@&$datadir&g
59724  s&@docdir@&$docdir&g
59725  s&@infodir@&$infodir&g
59726  s&@localedir@&$localedir&g
59727  s&@mandir@&$mandir&g
59728  s&\\\${datarootdir}&$datarootdir&g' ;;
59729esac
59730_ACEOF
59731
59732# Neutralize VPATH when `$srcdir' = `.'.
59733# Shell code in configure.ac might set extrasub.
59734# FIXME: do we really want to maintain this feature?
59735cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
59736ac_sed_extra="$ac_vpsub
59737$extrasub
59738_ACEOF
59739cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
59740:t
59741/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
59742s|@configure_input@|$ac_sed_conf_input|;t t
59743s&@top_builddir@&$ac_top_builddir_sub&;t t
59744s&@top_build_prefix@&$ac_top_build_prefix&;t t
59745s&@srcdir@&$ac_srcdir&;t t
59746s&@abs_srcdir@&$ac_abs_srcdir&;t t
59747s&@top_srcdir@&$ac_top_srcdir&;t t
59748s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
59749s&@builddir@&$ac_builddir&;t t
59750s&@abs_builddir@&$ac_abs_builddir&;t t
59751s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
59752$ac_datarootdir_hack
59753"
59754eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
59755  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
59756
59757test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
59758  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
59759  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
59760      "$ac_tmp/out"`; test -z "$ac_out"; } &&
59761  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
59762which seems to be undefined.  Please make sure it is defined" >&5
59763$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
59764which seems to be undefined.  Please make sure it is defined" >&2;}
59765
59766  rm -f "$ac_tmp/stdin"
59767  case $ac_file in
59768  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
59769  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
59770  esac \
59771  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
59772 ;;
59773
59774
59775
59776  esac
59777
59778done # for ac_tag
59779
59780
59781as_fn_exit 0
59782_ACEOF
59783ac_clean_files=$ac_clean_files_save
59784
59785test $ac_write_fail = 0 ||
59786  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
59787
59788
59789# configure is writing to config.log, and then calls config.status.
59790# config.status does its own redirection, appending to config.log.
59791# Unfortunately, on DOS this fails, as config.log is still kept open
59792# by configure, so config.status won't be able to write to it; its
59793# output is simply discarded.  So we exec the FD to /dev/null,
59794# effectively closing config.log, so it can be properly (re)opened and
59795# appended to by config.status.  When coming back to configure, we
59796# need to make the FD available again.
59797if test "$no_create" != yes; then
59798  ac_cs_success=:
59799  ac_config_status_args=
59800  test "$silent" = yes &&
59801    ac_config_status_args="$ac_config_status_args --quiet"
59802  exec 5>/dev/null
59803  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
59804  exec 5>>config.log
59805  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
59806  # would make configure fail if this is the last instruction.
59807  $ac_cs_success || as_fn_exit 1
59808fi
59809if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
59810  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
59811$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
59812fi
59813
59814
59815# After AC_OUTPUT, we need to do final work
59816
59817
59818  # Try to move config.log (generated by autoconf) to the configure-support directory.
59819  if test -e ./config.log; then
59820    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
59821  fi
59822
59823  # Rotate our log file (configure.log)
59824  if test -e "$OUTPUT_ROOT/configure.log.old"; then
59825    $RM -f "$OUTPUT_ROOT/configure.log.old"
59826  fi
59827  if test -e "$OUTPUT_ROOT/configure.log"; then
59828    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
59829  fi
59830
59831  # Move configure.log from current directory to the build output root
59832  if test -e ./configure.log; then
59833    echo found it
59834    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
59835  fi
59836
59837  # Make the compare script executable
59838  $CHMOD +x $OUTPUT_ROOT/compare.sh
59839
59840
59841# Finally output some useful information to the user
59842
59843  # Finally output some useful information to the user
59844
59845  printf "\n"
59846  printf "====================================================\n"
59847  if test "x$no_create" != "xyes"; then
59848    if test "x$IS_RECONFIGURE" != "xyes"; then
59849      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
59850    else
59851      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
59852    fi
59853  else
59854    if test "x$IS_RECONFIGURE" != "xyes"; then
59855      printf "A configuration has been successfully checked but not created\n"
59856    else
59857      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
59858    fi
59859  fi
59860  if test "x$CONFIGURE_COMMAND_LINE" != x; then
59861    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
59862  else
59863    printf "using default settings.\n"
59864  fi
59865
59866  printf "\n"
59867  printf "Configuration summary:\n"
59868  printf "* Debug level:    $DEBUG_LEVEL\n"
59869  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
59870  printf "* JDK variant:    $JDK_VARIANT\n"
59871  printf "* JVM variants:   $with_jvm_variants\n"
59872  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
59873  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
59874
59875  printf "\n"
59876  printf "Tools summary:\n"
59877  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
59878    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
59879  fi
59880  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
59881  if test "x$TOOLCHAIN_VERSION" != "x"; then
59882    print_version=" $TOOLCHAIN_VERSION"
59883  fi
59884  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
59885  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
59886  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
59887
59888  printf "\n"
59889  printf "Build performance summary:\n"
59890  printf "* Cores to use:   $JOBS\n"
59891  printf "* Memory limit:   $MEMORY_SIZE MB\n"
59892  if test "x$CCACHE_STATUS" != "x"; then
59893    printf "* ccache status:  $CCACHE_STATUS\n"
59894  fi
59895  printf "\n"
59896
59897  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
59898    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
59899    printf "will result in longer build times.\n"
59900    printf "\n"
59901  fi
59902
59903  if test "x$FOUND_ALT_VARIABLES" != "x"; then
59904    printf "WARNING: You have old-style ALT_ environment variables set.\n"
59905    printf "These are not respected, and will be ignored. It is recommended\n"
59906    printf "that you clean your environment. The following variables are set:\n"
59907    printf "$FOUND_ALT_VARIABLES\n"
59908    printf "\n"
59909  fi
59910
59911  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
59912    printf "WARNING: Your build output directory is not on a local disk.\n"
59913    printf "This will severely degrade build performance!\n"
59914    printf "It is recommended that you create an output directory on a local disk,\n"
59915    printf "and run the configure script again from that directory.\n"
59916    printf "\n"
59917  fi
59918
59919  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
59920    printf "WARNING: The result of this configuration has overridden an older\n"
59921    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
59922    printf "proper build. Failure to do so might result in strange build problems.\n"
59923    printf "\n"
59924  fi
59925
59926  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
59927    printf "WARNING: The result of this configuration was not saved.\n"
59928    printf "You should run without '--no-create | -n' to create the configuration.\n"
59929    printf "\n"
59930  fi
59931
59932
59933
59934  # Locate config.log.
59935  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
59936    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
59937  elif test -e "./config.log"; then
59938    CONFIG_LOG_PATH="."
59939  fi
59940
59941  if test -e "$CONFIG_LOG_PATH/config.log"; then
59942    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
59943    if test $? -eq 0; then
59944      printf "The following warnings were produced. Repeated here for convenience:\n"
59945      # We must quote sed expression (using []) to stop m4 from eating the [].
59946      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
59947      printf "\n"
59948    fi
59949  fi
59950
59951